View Source Bug Fixed and a Tip

Mozilla has, without a doubt, raised the bar with Firefox 1.5. Amongst the countless enhancements and bug fixes, though, I found something to make particular mention of, that of view source and bug 262915.

Before, the view-source pseudo protocol (i.e. accessing view source from the location bar instead of by shortcut) would open a new browser window. For a single-window/tab user like myself, this bug was annoying — to say the least. But now with that particular bug fixed, page source can remain in a tab, alongside all other open tabs. And here's where the tip comes in...

Combine keyword searching (we recommend the keyword 'vs' for, wait for it, view source) with this bookmarklet and navigate to any page you'd like to view the source of. Replace the URL in the location bar with 'vs' (or applicable keyword) and hit enter to view source in a tab.

Finally, I'm looking for a way to keep the original site in a tab and open the source in an adjacent tab. Any way to accomplish this with one bookmarklet?

Update 2005-12-03: A Blogzilla visitor created the extension View Source Choice, which addresses the request above.

» posted by jonathan on November 30, 2005 at 08:52 PM


I have a bookmarklet called "vs" that also works in Firefox 1.0 and before. What it does, is set the location via javascript to "view-source:" + current location, so it opens in the same tab or window.$9NEqX3

To answer your question: if you set "Force links that open a new window to open in a new tab", you can use this:


Hope that helps.

# posted by Jan!

hmm... have u tried the WebDeveloper extension?? you can see the source in a new tab or window... play with the options...

have fun!

# posted by La_Mafia63

What about the bug that occurs when you close Firefox but for some reason it doesn't close completely and you can't reopen without creating another user profile or restarting? You can't even do use the task mgr to close it. (windows)

# posted by Robyn

I just wrote a small extension View Source in Tab

You can view page source in a tab by middle clicking on the View Page Source in View menu and context menu, and on View Frame Source menu.

# posted by LouCypher

LouCypher, interested in making a patch so that you can do that without an extension?

# posted by np

Tell me this though - why is it that View Source hits the server? I'm trying to view source on gmail, and the view source shows the response you would get if you hit the page with a non-JS browser. It doesn't show what I actually see on screen.

# posted by Raymond Camden

Post a Comment

This discussion has been closed.