| ||Ask HN: Why does 'View Source' issue a new HTTP request?|
173 points by koolba on Dec 19, 2016 | hide | past | web | favorite | 93 comments |
|I've noticed that both Firefox and Chrome issue a new HTTP request when you view the source for a web page that you've already loaded. It's particularly annoying when the page itself is slow to load or if it won't load at all.|
Why is that? Wouldn't they have the existing source for the originally received page cached already? Is it based on Cache-Control headers?
This has been on my mind for a while (usually comes up when looking at what's behind slow web apps) and came up again with Piwik on the front page. Their website was semi-down (HN hug of death) but eventually loaded. I wanted to see what their GA equivalent tracking code looks like but the page failed to load as rather than showing the cached copy, it tried to fetch a new one.
| Apply to YC