Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to launch a browser in view source mode?

Tags:

html

browser

I want to open a file in a web browser (anyone will do) and I want to see it in the view source mode instead of in the standard browser window. This can be done in two steps, by opening the file and then go to the view source window (different shortcuts in each browser), but I want to directly go to the view source window. I have not found any such command line argument for Firefox nor Chrome.

Is this possible just with the base browser functionality?

like image 459
JorgeLarre Avatar asked May 14 '10 00:05

JorgeLarre


People also ask

What is view page source in browser?

The process is straightforward. Open the page in a new browser window and then highlight a section of the page using the mouse. Right-click and then select INSPECT from the dropdown menu. This will open the developer tools and show you the HTML code associated with the particular element or page section.

What is the shortcut of View Source Chrome?

Chrome – CTRL + U. Or you can click on the weird-looking key with three horizontal lines in the upper right hand corner. Then click on "Tools" and select "View Source."

Why can I not view page source?

Too many files in the Internet cache Make sure your Internet cache and history are cleared out. Having too much information in the cache or corrupt files could cause various issues to occur in Internet Explorer. How to clear Internet browser history.


1 Answers

In Chrome and Firefox you can use the view-source URI scheme by prefixing your URLs with view-source: as in the following example:

view-source:http://stackoverflow.com/questions/2831226/
like image 139
Daniel Vassallo Avatar answered Oct 10 '22 03:10

Daniel Vassallo