4 ms·
This is the way it should be in every browser, actually. View source (as in the raw non-corrected source) can take up a considerable amount of space since it's
by Etzos 10y ago
This is the way it should be in every browser, actually. View source (as in the raw non-corrected source) can take up a considerable amount of space since it's only ever needed when someone is viewing the source. Otherwise the "source" gets transformed internally to be compliant with what the browser can understand and render.
Unless you were talking about some other kind of view source?
- Joeboy 10y agoThe problem I have right now is that when I view the source of a page I'm working on, I get the source of the login page instead. I don't think that is justifiable behaviour.
- yazaddaruvala 10y ago#spaproblems
- Joeboy 10y agoIt's not a spa, these are #websitewithloginproblems.
- yazaddaruvala 10y agoThat is surprising, that would imply that view-source isn't using the same cookies as the regular browsing experience. Which seems like a bug.
- Forlien 10y agoThis seems strange. If you view page source on this comments page while logged in to Hacker News, does the source show you as not logged in? When I do that, my source contains the link to my profile (user?id=Forlien) at the top so I know it's giving me the logged-in version.
- Joeboy 10y agoActually no, it shows me as logged in (I can see the logout link). Whereas with the site I'm working on locally, I get the login page. curl with appropriate options copied from firefox gets me the full page. I don't know why I get different results with the two sites.
- JetSpiegel 10y agoYou can open the dev tools, copy the request as cURL and run that in another terminal?
- Joeboy 10y agoYes that works, although it generates an option that my curl doesn't like (--1.0) so I have to edit that out (or find the option to change it in FF). Better than the strategy I suggested, but still a lot clunkier than Ctrl-U. Grumble.
- Etzos 10y agoConsidering the potential size of pages and that this would mean the browser would have to keep around all of the unmodified source for all of those, I think it's a decently justified position. I will say that it would be nice if there was a way for them to recognize when the devtools are open and use that as a signal to keep around the source of the current page. But otherwise it would certainly cause significant memory bloat for each tab open.
- kbaker 10y agoYeah but couldn't they stick some 'yes, please cache the source, I am debugging' option in about:config? Then it only takes up space when someone needs it.