When using Internet Explorer 8 to test my web application I often find it doesn't reload the page, so I don't see my changes. This has resulted in a lot of wasted time and frustration wondering why my fix "didn't work" - when in fact the browser never loaded the fixed version.

I've tried the Refresh button. I've tried F5, Control-F5, Control-R, Control-Shift-R, holding Control while clicking the Refresh button, everything I could think of - it doesn't actually load the new contents from the server. I've confirmed this with Fiddler.

How do I tell IE "I don't care what you think you have cached, I want to reload the page - no really, I mean it this time, honest-to-God, I want you to actually go to the server and download everything again"?

link|improve this question

36% accept rate
1  
Use a private browsing window, maybe? – Josh Lee Dec 9 '09 at 23:54
3  
Is it possible that your web server is serving the old page (via cache) instead of the new version? Doesn't matter how many times you reload in that case. – Michael Todd Dec 9 '09 at 23:56
1  
Michael, no, I verified in Fiddler that IE is not getting the page contents from the server. – EMP Dec 10 '09 at 0:06
Control+F5 goes past the Cache, it's odd if it doesn't.... – Tom Wijsman Jul 14 '10 at 19:41
feedback

migrated from stackoverflow.com Dec 10 '09 at 3:28

This question came from our site for professional and enthusiast programmers.

11 Answers

up vote 29 down vote accepted

Go to Tools\Internet Options, then click on the Settings button in Browsing History, then select the Every time I visit the webpage radio button.

link|improve this answer
Thanks, this is what I ended up doing. I wonder if that hurts general browsing performance though. Also, if I ever need to get an end-user to do this it's not ideal (confusion, browser settings locked down, etc.). I'd love some simple way of doing a one-time reload, but I guess that doesn't exist in IE. – EMP Dec 10 '09 at 0:08
3  
If this is what you did, mark it as the answer – Earlz Dec 10 '09 at 0:15
4  
It may hurt general browsing performance, but only if you do your general browsing with IE... – Joel Mueller Dec 10 '09 at 1:07
Ev: The user-facing side of this is usually fixed by changing the URLs for all scripts and stylesheets every time you touch the code, typically by adding a ?version-number query string suffix. – bobince Dec 10 '09 at 1:53
"Every time I visit the webpage" likely doesn't do what you think it does. See fiddler2.com/redir/?id=httpperf – EricLaw -MSFT- Jan 5 '10 at 20:33
show 1 more comment
feedback

Ctrl+F5 in IE reloads the page ignoring the cache

link|improve this answer
As it does in Firefox as well. – Zhaph - Ben Duguid Dec 10 '09 at 0:41
The OP says that doesn't work for him. (Well, maybe he's wrong.) – Michael Ratanapintha Dec 10 '09 at 0:42
7  
No, it doesn't. I know it ignores the cache some of the time, but not all the time. – EMP Dec 10 '09 at 0:56
4  
Ctrl+f5 always reloads the page from the server. What it doesn't necessarily do is reload the extra files that page references – Chris Dec 10 '09 at 1:53
Fair enough - but I need it to reload EVERYTHING. – EMP Dec 10 '09 at 5:55
show 2 more comments
feedback

The web developer toolbar has a button to easily clear the cache. I usually use that in the case you describe.

It isn't ideal, since you may not really want to clear your entire cache, but since I don't use IE for general browsing, it works for me.

link|improve this answer
feedback

Since it's stated that IE8 is the browser, you can press F12 to open the development tools and select the Cache menu at the top and then always refresh from server to bypass cache.

In short, Press F12. Click Cache -> Always Refresh from Server

You can simply clear your cache here as well, if that is the desired action. The always refresh option is not a global option and will not hinder overall performance in IE.

IE7 also has development tools, but they must be installed separately. You can also use the IE8 dev tools to run the browser in IE7 mode.

link|improve this answer
feedback

Incidentally, the problem will possibly exist for your website viewers as well. I saw the following idea in an AJAX book...

Use PHP to add a random token to the current URL so that the browser is tricked into thinking it's a separate page.

link|improve this answer
feedback

IE is very eager to cache pages, even when you tell it not to via cache headers. Microsoft KB 234067 explains the requisite incantations. In short, you need to deliver the following headers.

Pragma: no-cache
Cache-Control: no-cache
Expires: <some time in the past>

Setting Expires = -1 (as recommended in the KB article) should work for most frameworks; browsers are required to treat invalid date formats as being in the past (RFC 2616).

link|improve this answer
1  
Untrue. IE6+ fully respects all cache-prohibiting headers. fiddler2.com/redir/?id=httpperf – EricLaw -MSFT- Jan 5 '10 at 20:31
feedback

I've had the same problem myself. I believe the only way to do it is to clear the cache (Safety -> Delete Browsing History). Only check "Temporary Internet Files".

Hope this helps.

link|improve this answer
feedback

I know this may seem a bit odd... but one thing I've noticed lately, is that you do sometimes get different results depending on HOW you "refresh". I've seen the following behaviour:

F5 > loads from cache without refresh,
Alt+D, ENTER > really refreshes bypassing the cache.
(alt+d can be replaced with clicking in the address bar)

link|improve this answer
feedback

I agree that adding a random token to the url is the most reliable solution and once it's implemented the user doesn't have to do anything.

Aside from the random token approach what I tend to always do to force a complete reload (request) of the page and all of its dependant files I just place my cursor at the end of the url and press Enter. Works every time... and I use IE 8.

link|improve this answer
feedback

Hold down either the alt or ctrl key as you click refresh button.

link|improve this answer
feedback

This still happens in IE9. Amazingly, the answer is Ctrl-Shift-Refresh button

link|improve this answer
feedback

protected by Community Oct 5 '11 at 0:52

This question is protected to prevent "thanks!", "me too!", or spam answers by new users. To answer it, you must have earned at least 10 reputation on this site.

Not the answer you're looking for? Browse other questions tagged or ask your own question.