I usually have Fiddler running constantly in the background. If a page is slow to load and I want to see the HTML, I would find the actual HTTP request in fiddler and grab the HTML that way. Alternatively, the element inspector doesn't re-issue the request, but it will show the compiled HTML, so after DOM augmentation etc
Ask HN: Why does 'View Source' issue a new HTTP request?
11–20 of 97 posts
Re: Ask HN: Why does 'View Source' issue a new HTTP request?
#12Earlier quoted context omitted.
Often the dom has been changed, and you want to know what the server actually sent
You can still do that with the inspect menu; if you look at the network history in Chrome, you can see the headers sent, the headers received and the body sent / received.
That only works if you have it open before the page loaded. It doesn't save information about network requests that occurred before the inspector was opened.
Re: Ask HN: Why does 'View Source' issue a new HTTP request?
#13It's a bug: https://bugzilla.mozilla.org/show_bug.cgi?id=307089 Or, it's a memory saving feature. To implement "View source from cache" requires keeping around the raw page HTML, which you might not otherwise need after parsing - except you probably will for all the developer tools to work, so this probably should just be considered bug.
Re: Ask HN: Why does 'View Source' issue a new HTTP request?
#14I think it may just be because in both cases it opens in a new tab with the view-source modifier, it treats it like you just opened a copy of the page in a new tab? I believe if you open the inspector instead it does not issue a new request.
> I think it may just be because in both cases it opens in a new tab with the view-source modifier, it treats it like you just opened a copy of the page in a new tab? Interesting. I never payed attention to the resource prefix. Are those standardized at all? Both Firefox and Chrome use the same "view-source:" prefix. > I believe if you open the inspector instead it does not issue a new request. The inspector shows th…
Re: Ask HN: Why does 'View Source' issue a new HTTP request?
#15Re: Ask HN: Why does 'View Source' issue a new HTTP request?
#16Re: Ask HN: Why does 'View Source' issue a new HTTP request?
#17I seem to recall that it wasn't always the case.
Re: Ask HN: Why does 'View Source' issue a new HTTP request?
#18I usually have Fiddler running constantly in the background. If a page is slow to load and I want to see the HTML, I would find the actual HTTP request in fiddler and grab the HTML that way. Alternatively, the element inspector doesn't re-issue the request, but it will show the compiled HTML, so after DOM augmentation etc
Is there anything comparable to Fiddler for macOS? I heard you can run it in VM but that's just too much brute force for me.
Re: Ask HN: Why does 'View Source' issue a new HTTP request?
#19I usually have Fiddler running constantly in the background. If a page is slow to load and I want to see the HTML, I would find the actual HTTP request in fiddler and grab the HTML that way. Alternatively, the element inspector doesn't re-issue the request, but it will show the compiled HTML, so after DOM augmentation etc
Is there anything comparable to Fiddler for macOS? I heard you can run it in VM but that's just too much brute force for me.