««Nov 2008»»
SMTWTFS
       1
2345678
9101112131415
16171819202122
23242526272829
30

Search TipicalCharlie

 


Most Popular Tags

   

Blog Status

  • 3 yrs 32 wks 3 days old
  • Updated: 11 Nov 2008
  • 70 entries
  • 136 comments
Tipical Charlie
Welcome to Tipical Charlie, a repository of all kinds of tips related to computing, from web developer and technologist, Charlie Arehart.
I'll mostly share my own tips that I've found others enjoyed hearing about. I'll welcome tips from others, too.
(Wondering where I came up with the name?)

When "View>Source" in Internet Explorer doesn't work

posted Tuesday, 26 April 2005

Ever had "View>Source" fail to work in IE? This can be a maddening situation. You're viewing a site (your own or someone else's) and you desire to see the underlying HTML, Javascript, etc, so you do a "view>source". Sometimes in IE this will do nothing. It's just ignored.

And it seems nothing will fix it (certainly not a restart). Even right-clicking on the page to choose "view source" does nothing.

You may, as I have, feel you must resort to opening another browser to view the page (like the excellent Firefox), but what if you must (or simply prefer to) use IE for some reason. It can be terribly disruptive for this not to work. (Let's not have any debate about why this proves that one should be using Firefox instead of IE. To each his own.)

The problem (and solution), it turns out, is that the temporary files directory used by IE has become full in some sense. Doesn't really make sense to me, on the surface. But sure enough, if you delete the temp files (Tools>Internet Options>General>Temporary Internet Files>Delete Files), you'll find that you can magically do "view>source" again.

Of course, one may feel that deleting all files like that is overkill, like swatting a gnat with a hammer. Surely the loss of the cached image and other files will have a negative effect on some of your browsing. (Note that this "delete files" doesn't delete cookies, if that concerns you.)

You could, instead, go into the temporary internet files directory yourself and delete some large files to make room. (See my tip on using AgentRansack for a quick way to find the largest files in a directory. I hadn't mentioned that it can do that sort of file searching as well.) To learn what directory holds them, see tools>internet options>general>temporary internet files>settings.

links: digg this    del.icio.us    technorati    reddit




1. a reader left...
Saturday, 30 April 2005 2:12 am

After spending an entire day (today) wrestling with Microsoft's implmentation of the textRange, all I can say is "Microsoft, Grrr...!"

Mike Rankin


2. Brian Perrin left...
Friday, 17 November 2006 10:15 am

Unfortunately, clearing cache/deleting temporary files doesn't solve the problem for me. I still can't View>Source. Any other ideas? Thanks!


3. Charlie Arehart left...
Friday, 17 November 2006 5:16 pm

well, no, other than to ask if you've looked in the temp files dir to see if indeed it's been cleared out. this really has been the solution for me in the past. Also, grasping at straws here, have you tried closing IE (all instances open) after this change? Can't imagine it's needed (hasn't been for me), but may be worth a try. other than that, I've got no more ideas. hope it helps.


4. Bob left...
Sunday, 19 November 2006 8:56 pm

Brian,

Don't know what version of IR you're using but MS Release Notes say View Source has been disabled in IE 7.


5. Bob left...
Sunday, 19 November 2006 9:10 pm

By the way, as a workaround, just copy the desired file(s) of interest from Temporary Internet Files folder (probably most recently modified) into another folder, right click in the new location and open with your HTML editor of choice. Should also work for earlier versions of IE.


6. Charlie Arehart left...
Monday, 20 November 2006 10:37 am

Brian, about "view source" and IE 7, look more closely. It doesn't say that "view source" is not supported, but rather it's the "view source protocol". In other words, there was a time when you could use "view-source:" in the address bar to point to a URL and it would open that page's source in the browser's default editor. Actually, that feature was removed from IE 6 SP2 as well.

Interesting to note: I just tried it in Firefox (1.5.0.8 and 2.0) and it worked fine.

As for your other idea about finding a file in the temp folder, it can of of course be a challenge since usually there are multiple folders in which a file can be placed, but good point for folks to consider when desperate.


7. Charlie Arehart left...
Monday, 20 November 2006 10:38 am

Sorry, should have addressed that last comment to "Bob".


8. Bob left...
Thursday, 23 November 2006 3:11 am

Charlie, Thanks for the clarification. I wasn't aware of the "protocol" and, since right-click View Source stopped working for me after installing IE7, assumed that's what the release note was referring to. Interesting that I've tried the other suggestions, restarted the computer and no luck. Now I wonder if the new install messed with some registry setting that locks me out.


9. Elijha left...
Thursday, 30 November 2006 6:28 am

I have had the same problem with IE in the past with the filling cache, though I haddn't run into it in years (probably due to moving most of my intensive developement to Fire fox with Web Tools). But since upgrading to IE 7 I've noticed a number of pages with the source unviewable, some I have made are fine others are not. Interestingly the best example I can come up with is Googles main search page can have the sourced viewed but the main Google Adsense page cannot? This seems very strange and I doubt it it a cache problem with IE - possibly some sort of problem with pages using certain java codings?


10. Charlie Arehart left...
Friday, 1 December 2006 11:44 am

test


11. Charlie Arehart left...
Tuesday, 5 December 2006 11:29 pm

Elijha, this is curious. I'd ask which "main" Adsense page you could not view? I tried both the front page when you're not logged in (/adsense), and when you are (/adsense/report/overview) and both permitted me to do a view source in IE 7. But if those are what you were viewing, then perhaps there's some transient issue.


12. Kevin F left...
Tuesday, 2 January 2007 10:59 am

I can't view source on any website since installing IE7. It says "Windows cannot access the specified device, path, or file. You may not have the appropriate permissions to access the item." I've deleted the contents of the temp folder with no luck.

I also can't launch Outlook Express with my keyboard shortcut when IE7 is the active window. It gives the same error as above. It's not a bad problem but worth a mention.


13. Charlie Arehart left...
Tuesday, 2 January 2007 12:07 pm

I'm afraid I have nothing to offer you, Kevin, as again I've found this is not the case. I don't know when it is and is not. I suppose it could be related to the same original issue I wrote about in the blog entry, but since you say you emptied the temp folder, it's either different or requires a different solution. I'm not aware of it.

I'll also say this is one of the many reasons why I have not updated to IE 7 yet. I'd rather these sort of kinks be worked out (and knowledge shared among folks first.) I know that many got it because their Windows Update did it for them. That's why I never use the "express" option and instead always do a "custom" update. Small consolation to you now, but perhaps it will help others in the future.


14. missing ie6 left...
Saturday, 6 January 2007 2:57 pm

The same thing happened to me. I disabled all the add-ins and view source started working WITHOUT a restart. I then switched all the add-ins back on and view source is still working. I miss IE6!


15. Kevin F left...
Tuesday, 9 January 2007 7:44 am

Thanks Charlie. It's a shame it's not working as it seems like a step in the right direction for IE. I will use 'custom' update in future.

I disabled all add-ons, restarted IE7 and still the same problems. I started IE7 with add-ons disabled and still the same problems.

Take a leaf from Charlie's book folks and don't install IE7 'till it's fixed!

Cheers.


16. Al J left...
Tuesday, 30 January 2007 6:41 pm

I had the "Windows cannot access the specified device, path, or file. You may not have the appropriate permissions to access the item" alert as well. The disabling of addons worked for me though I had to close IE and restart it. Thanks "Missing IE6" for the tip.


17. A J left...
Tuesday, 27 February 2007 7:54 pm

Further to my comment above I had a relapse into IE 7 view source not working again and this time none of the above solutions worked. Per chance I stumbled across a posting where someone mentioned Zone Alarm alerting to IE7 trying to record user clicks. Of course I clicked "deny" when that happened to me but that put IE7 into the restricted zone of Zone Alarm which must prevent IE7 opening any other programs. Simply changing the zone to "trusted" enabled my view source again. Hope that helps someone else.


18. Charlie Arehart left...
Wednesday, 28 February 2007 7:28 pm

Great. Thanks for sharing, AJ. :-)


19. Charlie Arehart left...
Thursday, 1 March 2007 10:11 am

Wow, I just found an older but info-packed article on this topic:

http://www.mredkj.com/tutorials/tips_ie.html


20. gon2oz left...
Thursday, 10 May 2007 6:59 am

I followed AJ's advice, went in to Zone Alarm, and raised ie7 to "trusted" status. Worked instantly, and problem solved. Well done AJ. Now I can get back to work.


21. Jackie C. left...
Monday, 14 May 2007 12:12 pm

I began receiving the same error message, "Windows cannot access the specified defice, path, or file" when I was trying to view the source of a web page. I played around with everyone's suggestions above but didn't get anywhere. I use Zone Alarm Security Suite which had just announced that it had "learned" my system and was moving me to High Security. That seems to be when the error message began. Instead of moving IE to "trusted zone"... I just deleted it all together from the Program Control list in Zone Alarm. I then opened up a website in Internet Explored, went to VIEW >Source, and it opened up in Notepad. I went back to ZoneAlarm and see that IE is back in the list with a ? in Trust Level. All seems to be working fine now.


22. Mohan kumar left...
Wednesday, 19 September 2007 7:42 am

Unfortunately i am getting an alert message "Access Denied" when i click view source in IE (V6.0)


23. Vladimir P. left...
Tuesday, 2 October 2007 9:56 pm

Do you have an icon called "Notepad" on your Desktop? If so, just to rename it to something else (not "Notepad"). It worked for me!!!


24. Samuel Henderson left...
Tuesday, 30 October 2007 4:20 pm

Greetings,

I just stumbled across this page while troubleshooting this annoying issue. I believe I may be able to add another cause to this problem.

It seems that on my computer at least, if there is a script problem somewhere on the page, the 'view source' option does nothing. This was especially maddening for me, as I wanted to view the source of my page to troubleshoot the error.

The error was an unterminated string constant (which only IE7 seems to find). I found (accidentally) that by pressing refresh button a bunch of times very fast, the error went away and I was able to view source. I am quite perplexed, but the error was not critical enough to halt all scripts so I'm about ready to just shrug my shoulders and chalk it up to an IE bug...

The code in question that was causing the unterminated string constant error was this:

<script src="foo.js"></script> which is odd because "foo.js" has no errors... Meh.


25. Charlie Arehart left...
Tuesday, 30 October 2007 5:29 pm :: http://www.carehart.org

Thanks for sharing, Samuel.


26. Richard Madigan left...
Tuesday, 15 July 2008 2:54 pm

I found another cause of "View > Source" failing to work on certain Web pages. If the page contains a conditional comment (e.g., to make IE use a special style sheet), and the path to the style sheet is root relative, "View > Source" fails. If the path is changes to relative, "View > Source" works. Kind of a pain, as I am using Dreamweaver and need to use root relative paths for these conditional comments in my templates to ensure the path to the style sheet is always correct. Dreamweaver ignores comments when updating path info after a file has been moved. Hope this makes sense and helps someone out.


27. MachDev left...
Sunday, 26 October 2008 5:30 pm

Good one!!! You have just saved me hours trying to figure this one out!