Is it possible to change Chrome's view-source behaviour to use the current request instead of starting a new one?
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
and get $2,000 discount on your first invoice
--------------------------------------------------
Take control of your privacy with Proton's trusted, Swiss-based, secure services.
Choose what you need and safeguard your digital life:
Mail: https://go.getproton.me/SH1CU
VPN: https://go.getproton.me/SH1DI
Password Manager: https://go.getproton.me/SH1DJ
Drive: https://go.getproton.me/SH1CT
Music by Eric Matyas
https://www.soundimage.org
Track title: Romantic Lands Beckon
--
Chapters
00:00 Is It Possible To Change Chrome'S View-Source Behaviour To Use The Current Request Instead Of St
00:51 Accepted Answer Score 11
01:42 Answer 2 Score 2
02:06 Thank you
--
Full question
https://superuser.com/questions/243967/i...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#googlechrome
#avk47
ACCEPTED ANSWER
Score 11
Is there a way to change the way Google Chrome's view-source works, so that it does not initialize a new request?
No, this is the way Chrome works by design.
When you "view source", you're really opening a new tab that opens the page again and displays the source rather than renders the page. Many web pages are dynamic and modify their HTML content (eg. using JavaScript/XMLHttpRequest) so we cannot display the current HTML - this is why a new request is made.
If you want to view the current state of a dynamic page, you should use the inspector. "File icon -> Developer -> JavaScript console"
I don't see how this is a security bug or a bug at all - the behavior is by design - closing as such.
ANSWER 2
Score 2
I don't think you can change the behavior of view-source:
URLs, or the View page source command, you can get to the source as received for this page: first, open the Developer tools (WebKit's "Web Inspector"), found at > Tools > Developer tools. Now click on Resources and (if necessary) scroll down the list on the left until you find the resource of interest. And there you go: the source as it was transmitted in the original HTTP response.