Cannot View HTML source
It’s been a while since I ran into this “bug”, but the other day I trying to figure out why the images in my email were not showing up. So I did what any normal human would do on a Wednesday and tried to do a “View Source” on the HTML content. When I clicked on the view source option in the context menu however I got no source. I didn’t even get an error. Then I tried IE. No love there either. Then something happened to me that very rarely happens; I remembered something from more than a week ago. This very thing has happened to me before, about 2 years ago.
The answer? In order to be able to view source again you have to clear out your temporary internet files! The answer to this riddle has always baffled me. Why does the fact that your temporary internet files allocation has reach capacity effect your ability to see the source of the page that is clearly stored on your machine someplace? One would think that once you reach the allocated capacity, that IE would begin deleting the oldest content to make more room. Not the case when making room for view source I guess.
So after deleting the temp files all was good again.

Awesome tip! I run into this all of the time – mostly when I debug, so I’ve learned to use the running documents window in VS.NET, but this will definitely help!
You can also filter the page through the view-source moniker, which will retrieve the page and then display it in Notepad. For example, type the following into your IE address bar:
view-source:http://www.microsoft.com
- Aaron
Wow, I never knew you could do view-source: in IE like that. very cool!
I don’t know how well it would help with postbacks and all, but it presents at least another avenue when the menu items don’t work as advertised.
thank you, I spent a few hours trying to troubleshoot why my computer was opening local sources but not all internet sources (and in no set pattern). I am left wondering why a billion dollar company like Microlimp does not have the intelligence to delete the old in order to make way for the new (the obvious work-around).
Once again – thanx
Andrew
Hey I am Having sort of the same problem except none of the steps you are listing are working. When I go view Sorce on any web page it opens note pad but nothing is ever in it.
Here are some other funny things
in my c:windows\system folded notepad.exe had an Icon But its all in caps NOTEPAD
Now the other Icons sucha as the ones in acessories say notepad but are blanck Icons and look like a standard blue and white exe file.
PLEASE Help me
Josh
Thanks a bilion!!!
This recently started happening to me and it was a huge pain. I’m in the middle of a huge web app development and was unable to view source.
There is another cause that can occurr. Last year I had this problem and it was due to my putting a shortcut on my desktop to Notepad called “Notepad”.
For some reason IE will look to this shortcut and try to load it as a program instead of Notepad itself. Very f’d up.
The solution: Rename the shortcut to “Notpad”
Tre Bizzare!
Thanks again, you just made my world sane again.
Craig
Thanks! I couldn’t for the life of me figure out why it wouldn’t let me view the source … Dev is much easier when you can view the source!
Thanks…who knew blogs could be insanely useful
Thanks, Thanks,Thanks
putting a shortcut on my desktop to Notepad called “Notepad”.
For some reason IE will look to this shortcut and try to load it as a program instead of Notepad itself. Very f’d up.
The solution: Rename the shortcut to “Notpad”
Thank you very much to “Rubio.” I learned a lot about editing (to no avail) my registry, reloading W2K, looking all over the internet for help…then I read the blog from Rubio about having notepad on my desktop. His suggestion worked. I just removed the Notepad shortcut from my desktop and finally my IE works with the view option… I wonder if any other files on the desktop might cause similar problems with other programs/settings.
Anyway, thank Rubio.
Dear friends,
I’ve encountered this problem for months and couldn’t find any solution for it. I had tried everything, including all of the suggestions above as well as from other forums, and still can’t view source.
Any suggestion is greatly appreciated.
Thanks.
Khanh
PS: IE 6.0 with XPSP2 is what I’m currently using.
Try this. Go to Internet Explorer – Tools – Internet Options – Delet FIles – And Make SURE thet the Delete All Offline Content Box is checked. It took my PC about 10 minutes to complete deleting the files and now everything appears to be working. And I can now save graphic images and photos as file formats other than bmp.
Go figure. Good luck.
I forgot to mention in the previous post the following information:
IE Version 6.0.2800.1106
Win2K Pro Build:2195 Service Pak 4
These 2 problems (Unable to View Source Code and Saving Image Files and Photos other than to BMP format only took me months to figure out. I really hope it helps solve your problem too.
That is not complete information about this “viewsource” bug.
I’ve found some pages that somehow do not allow IE to make a “viewsource:url” request.
Nothing Happens when you press “View Source”. At all.
But other pages are okay.
I was thinking about and I noticed that they answer with similar HTTP-HEADER, which is:
http://www.molodoy.net/modules/news/index.php
HTTP/1.1 200 OK
Cache-Control: no-store, no-cache, max-age=1, s-maxage=1, must-revalidate, post-check=0, pre-check=0
Connection: close
Date: Sun, 20 Jun 2004 13:36:19 GMT
Pragma: no-cache
ETag: 300909a30597d76f8590cd4a60a340aa
Server: Apache/1.3.31 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2634a mod_ssl/2.8.18 OpenSSL/0.9.7d PHP-CGI/0.1b
Content-Type: text/html
Expires: Sat, 18 Aug 2002 05:30:00 GMT
Last-Modified: Sun, 20 Jun 2004 13:36:19 GMT
Client-Date: Sun, 20 Jun 2004 13:36:13 GMT
Client-Response-Num: 1
X-Powered-By: PHP/4.3.7
I think the most interesting thing is “Cache-control: and following…” and Expiration Date.
And another one:
i won’t tell you the url, but the HTTP answer is:
HTTP/1.1 200 OK
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection: close
Date: Sun, 20 Jun 2004 13:38:24 GMT
Pragma: no-cache
Server: Apache/1.3.29
Content-Type: text/html
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Last-Modified: Sun, 20 Jun 2004 13:38:24GMT
Cache-control again!
I tried to do everything. To copy the source one-by-one, including HTTP-HEADER….
My pages allow to “View HTML-source”!
and the exmple URL, i gave – does NOT!
why is it happening???…
I think the most interesting thing is “Cache-control: and following…” and Expiration Date.
And another one:
i won’t tell you the url, but the HTTP answer is:
HTTP/1.1 200 OK
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection: close
Date: Sun, 20 Jun 2004 13:38:24 GMT
Pragma: no-cache
Server: Apache/1.3.29
Content-Type: text/html
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Last-Modified: Sun, 20 Jun 2004 13:38:24GMT
Genius! This one has been driving me crazy for months. Had to resort to using Netscape and Opera in order to view any source code. Thanks!
got another bug. the notepad in start>all programs>accessories is displayed in all caps – NOTEPAD. also, it doesn’t have the normal icon.
when i double-click on some files which should open in notepad (*.cpp for example), nothing happens. right-clicking on the file then selecting “Open With” would display notepad in all caps without the normal icon.
please help!
try to find your notepad.exe in windows directory. then replace it by original notepad.exe which you can get from another computer.
I can to send you this file by e-mail. Ask me about this in ICQ 900910, because I don’t think I’ll be here one more time.
sorry for my english =)
Look at the following registry key or create it if it does not exist:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\View Source Editor\Editor Name]
Then set the value of “Editor Name” to the programme (full path) you wish to use, e.g. “c:\windows\notepad.exe”
(Windows XP MSIE 6 SP2)
In my case (unable to view source code), all of the above remedies failed me. My problem turned out to be that msie had forgotten where my browser’s cache was (or it somehow got moved) and nothing was going into the cache! Resetting the cache location in msie fixed it. tools->internet options->settings->move folder
-thanks to all who posted here and got me on the right track (temporary internet files).
Hi, in my case I could not view source even though I’ve tried all the posted remedies on the web. In my case, in the c:\windows\system32\ folder, the original “notepad.exe” had been renamed “notpad.exe” and an impostor executable had taken it’s place. i’m not all to sure what it did (spyware?) but i ended up just deleting it and renaming the original.
thanks
What I meant to say is clearing out the temporary files in the following path: C>Documents and Settings>Username Folder>Local Settings>Temporary Internet Files. NOT C>WINDOWS>Temp>Temporary Internet Files. Just a help to those who do get it the first time around. This website for diagnosis is EXCELLENT – THANKS TO WHOMEVER MADE IT.
Hi ppl out here. Erm… my internet temporary files seems to be missing too. Haix… and so I can’t clear any thing in it. And so I still can’t view html source. Anyone can help me to figure out where has my temp internet files gone to? Thnx!
Thank you for the tip! You rawk!
Mind boggling but true…
Thanks a lot!
Yup. Having the notepad icon on my desktop stopped it from showing the source. Thanks for this blog/thread
I had this same problem and the Host Headers pointed me to the correct direction except I found that the cache-control didn’t do anything. I found that on our servers, sites that were being served with a “compress content on demand” feature, that is, serving gzip content-encoding formatted html, IE on a PC couldn’t view source. All other browsers could. Turning this feature off allowed IE to view the source again.
Renamed the ‘notepad’ to ‘note pad’ on desktop is workable. Tks all of u.