Home > Misc > Cannot View HTML source

Cannot View HTML source

April 2nd, 2004

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.

Misc

  1. Joel Ross
    April 2nd, 2004 at 16:50 | #1

    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!

  2. Anonymous
    April 2nd, 2004 at 19:16 | #2

    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

  3. Anonymous
    April 2nd, 2004 at 21:00 | #3

    Wow, I never knew you could do view-source: in IE like that. very cool!

  4. Anonymous
    April 2nd, 2004 at 21:36 | #4

    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.

  5. Anonymous
    May 10th, 2004 at 02:44 | #5

    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

  6. Anonymous
    May 19th, 2004 at 23:35 | #6

    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

  7. Anonymous
    June 3rd, 2004 at 02:01 | #7

    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

  8. Anonymous
    June 3rd, 2004 at 20:47 | #8

    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!

  9. Megan
    June 4th, 2004 at 05:56 | #9

       Thanks…who knew blogs could be insanely useful

  10. Anonymous
    June 5th, 2004 at 20:11 | #10

    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”

  11. Robert Harrold
    June 10th, 2004 at 02:52 | #11

    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.

  12. Anonymous
    June 17th, 2004 at 17:52 | #12

    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.

  13. Anonymous
    June 18th, 2004 at 08:25 | #13

    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.

  14. Anonymous
    June 18th, 2004 at 08:34 | #14

    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.

  15. Anonymous
    June 20th, 2004 at 15:51 | #15

    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???…

  16. Anonymous
    July 3rd, 2004 at 20:26 | #16

    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

  17. Anonymous
    July 16th, 2004 at 11:20 | #17

    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!

  18. Anonymous
    July 27th, 2004 at 08:14 | #18

    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!

  19. molodoy
    August 10th, 2004 at 11:08 | #19

    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 =)

  20. Anonymous
    October 10th, 2004 at 10:24 | #20

    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”

  21. Deb
    October 28th, 2004 at 18:25 | #21

    (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).

  22. Anonymous
    November 27th, 2004 at 12:51 | #22

    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.

  23. Anonymous
    December 12th, 2004 at 13:02 | #23

    thanks

  24. Anonymous
    December 12th, 2004 at 13:07 | #24

    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.

  25. Anonymous
    March 16th, 2005 at 13:39 | #25

    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!

  26. Sonia
    April 20th, 2005 at 02:07 | #26

    Thank you for the tip! You rawk!

  27. Anonymous
    May 20th, 2005 at 11:22 | #27

    Mind boggling but true…

    Thanks a lot!

  28. Anonymous
    June 2nd, 2005 at 02:34 | #28

    Yup. Having the notepad icon on my desktop stopped it from showing the source. Thanks for this blog/thread :)

  29. Anonymous
    April 4th, 2006 at 19:25 | #29

    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.

  30. August 18th, 2009 at 03:05 | #30

    Renamed the ‘notepad’ to ‘note pad’ on desktop is workable. Tks all of u.

  1. No trackbacks yet.