Search this site:

2010-03-01

view-source URI scheme


Accidentally discovered some tricks in Firefox. I was viewing the source code of a web page in Firefox. In recent versions of Firefox, I am able to click on hyper-links in the source code view to link to another page, just like normal web pages do. I thought it was a internal feature of Firefox and didn't ever check out it works.

Until today when I accidentally dragged the hyperlinks from the source code windows to a normal Firefox windows, and WOW, the source codes was displayed! An URI staring with view-source: was shown in the location bar like this:

view-source:http://notes.theorbis.net/

By Googling I know that it is an special URI scheme for showing the source code of a web page, although some of the browsers may not not support this. Tested with Firefox 3.6, Chrome 5.0.335.1 dev on Windows 7 and it works well. IE was reported to drop such support since version 6 in Windows XP SP2 due to so called "security reasons". Well... I really wonder what're the security reasons and how secure it can be by dropping the support... Come on... Web page source codes are never secrets...

Fantastics! This is yet another useful little tricks when I would like to view the source code of the page without having it to be loaded, for example when performing penetration tests or when peeking suspicious web sites!

How about making a simple Firefox extension adding some shortcuts for this?


No comments:

Post a Comment

HTML Tags allowed (e.g. <b>, <i>, <a>)

Disclaimer

ALL CONTENTS AND INFORMATION IN THIS WEB SITE ARE PROVIDED "AS IT" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED. THE ACCURACY AND AVAILABILITY OF THE CONTENTS, INFORMATION AND THE WEB SITE ITSELF ARE NOT GUARANTEED. THE AUTHOR TAKES NO RESPONSIBILITIES ON ANY COSTS OR DAMAGES (DIRECT OR INDIRECT) ARISING OUT OF OR IN CONNECTION WITH THE ACCESS, USAGE OR INABILITY OF USAGE OF THIS WEB SITE.