Categories
Web

Google Chrome View Source

IMHO view source from Google Chrome acts really odd.

When you click view source a new tab opens and the page is loaded all over again.

Maybe there is a very valid reason for this. But I cant find one. To me this can even be problem.

Examples:

  • If you pass values via POST you cant get the results as Chrome does not re-POST it just issues a new request using GET and a new session. (I found a couple “Notice: Undefined variable” on some of my code, but this was my problem as I wasnt doing proper verifications) But anyway you never get the POST values and see the source for your page.
  • If you have a counter or random dinamic content you will never get to see exactly what you get on the rendered html you have on the initial tab.

A work around is to use “inspect element” but its not the same. Its great for some things but its not the same.

If someone finds a valid reason for this “view source” behaviour I would love to know.

By Hugo Gameiro

I run Masto.host, a fully managed hosting solution for Mastodon instances and Nuvens.pt, a Portuguese hosting service for websites.
mastodon | email