Identify HTML file with Chrome 'Inspect element"

1

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.

Nick Garnett

Posted 2011-04-28T11:59:34.030

Reputation: 11

HTML file's URL is in the addressbar, right? – gronostaj – 2013-05-27T06:37:23.563

Answers

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.

BigChief

Posted 2011-04-28T11:59:34.030

Reputation: 491

Thanks BigChief, as I suspected, some more work involved... – Nick Garnett – 2011-04-29T07:03:17.123

@Nick Garnett: Most likely. If this answers your question, go ahead and accept it if you don't mind. – BigChief – 2011-05-01T15:15:16.973