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.
After spending an entire day (today) wrestling with Microsoft's
implmentation of the textRange, all I can say is "Microsoft, Grrr...!"
Unfortunately, clearing cache/deleting temporary files doesn't solve the
problem for me. I still can't View>Source. Any other ideas? Thanks!
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.
Brian,
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.
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.
Sorry, should have addressed that last comment to "Bob".
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.
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?
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.
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'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.
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!
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 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.
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.
Wow, I just found an older but info-packed article on this topic:
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.
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.
Unfortunately i am getting an alert message "Access Denied" when i click
view source in IE (V6.0)
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!!!
Greetings,
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.
Good one!!! You have just saved me hours trying to figure this one out!