Some websites try the somewhat lame technique of using Javascript based “obfuscation” for their HTML. At other times, IE will just refuse to view source if your system is low on memory (according to IE’s reckoning that is) or if your temp space is full. Here is a handy bookmarklet to view source in any browser.
Some websites try the somewhat lame technique of using Javascript based “obfuscation” for their HTML. At other times, IE will just refuse to view source if your system is low on memory (according to IE’s reckoning that is) or if your temp space is full. Following are a couple of handy bookmarklets to view source in any browser.
Drag this link to your browser bar
The following bookmarklet will work with any browser on any platform using the view:source directive. It prompts you for the URL you wish to view source of (defaults to the current URL for convenience) and opens the usual source viewer associated with your browser. Note that this may not work for non-IE browsers on Macs (because Mac doesn’t support the view:source directive) so you will be forwarded to http://sniptools.com/viewsource/ instead which shows you the text.
Drag this link to your browser bar
In Mozilla, you can use the DOM inspector.
(1) Open page in Mozilla DOM Inspector.
(2) Right click on top node.
(3) Copy XML.
(4) Paste in text editor.
It’s that simple!
Thanks Mandy, didn’t know about that!
love the IE View source link. good idea
Hi,
“IE View Source” is almost identical our DHTML Snoop: http://www.codehouse.com/javascript/favelets/dhtml_snoop/
The “Generic View Source” bookmarklet is a good idea, yet I think it might be better if it automatically brought up the page without the prompt dialog, like “IE View Source.” I had actually tried to do this myself at one point, but ran out of time and patience, and so put it on the back burner.
Thanks for the link, Codehouse. The GENERIC VIEW SOURCE is easily modified I imagine to remove the PROMPT, given that the audience for this kind of stuff is most likely tech-literate. Interesting website btw.
Thank you. You’re quite welcome for the link. I often post stuff for the website when half asleep, which may account for why I had difficulty getting the view-source favelet to work, but I do remember it being problematic. Provided nobody beats me to the punch, I will try to tackle the problem again later this month. One problem with using the view-source URL prefix is that Opera doesn’t support it. I haven’t tested whether Safari does. My hunch is not.
Hi. Made a view-source favelet without the prompt, in case anyone’s interested.
http://www.codehouse.com/javascript/favelets/view_source/
Hi, Thank you for such an infromative website. Very interesting and easy to comprehend! Thanx!
why Generic view source code is not working in windows XP. please send me answer asap
Prasad, if you have SP2 installed, your IE may be hardened beyond what you expect it to. Please make sure the popup blocker is not blocking. The bookmarklet is setup to show page source in a NEW WINDOW, so it requires a popup, technically. Works on IE here for me, even with Maxthon or Slimbrowser skins.