Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Does anyone know a way to identify specific HTML files when using 'Inspect Element' for Chrome? I can edit locally but unlike CSS there are no associated filenames with HTML editing.

share|improve this question
    
HTML file's URL is in the addressbar, right? –  gronostaj May 27 '13 at 6:37

1 Answer 1

You can only associate a filename with an HTML file from a browser / editor if they're stitching it together on the client, such as with an <iframe> element or (unobfuscated) Javascript.

Commonly pages will be constructed on the server side, such as with PHP, ASP or (a long time ago) SSI. If this is what is going on, you'll never see the original files which build the page. In addition the URL can be rewritten, as with mod_rewrite, making it impossible to discern the original filename.

If the site is under your control, check .htaccess for the rewriting rules to try to figure out how the URL is being rewritten. That should point you to the main file being used for the page, which you can then read to determine what other files are being pulled in.

If not, you're probably out of luck unless the URL is particularly informative.

share|improve this answer
    
Thanks BigChief, as I suspected, some more work involved... –  Nick Garnett Apr 29 '11 at 7:03
    
@Nick Garnett: Most likely. If this answers your question, go ahead and accept it if you don't mind. –  BigChief May 1 '11 at 15:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.