How can I disable cache in IE8 ? We are doing Javascript development and testing it in IE8, but we have to clear the cache every time we make changes to the Javascript files
hit "Fn F12" to open developer tools
click Cache
choose "Always refresh from server"
Every time you refresh it should be clearing the cache, but there are also quick access cache clearing from the cache menu or the shortcuts that are active when the dev tools are open.
*Note- you must leave the dev tools window open, it doesn't have to be up front, but it has to remain open for the cache to remain disabled.
Ctrl+F5 Should cause a full page refresh including all that cached javascript.
Occasionally though, you'll still need a cache clear, because even Ctrl+F5 won't work, for reasons beyond comprehension IE can't even get "refresh" right 100% of the time.
Load you JavaScript this way.
<html>
...
<script type="text/javascript">
document.write('<script src="yourscript.js?'+Math.random()+'"></script>');
</script>
...
</html>
Edit: In case this is not obvious, remove this code as soon you will go into production!
Maybe a easier way not to have user refresh the browser is just to rename the js files (and css). This is what worked for me... as the server didn't like a random number after the .js file
Go to Internet Options. On the General tab, under Browsing History click Settings. Select the "Every time I visit the webpage" radio button.
This doesn't "disable" the cache per se, but it should fix your underlying problem - the JS files should be reloaded every time.
If your javascript files are served exclusivley from a sub-directory, you could enable immediate content expiration for that directory in IIS. I recently had this problem serving content from a sub-directory and this was the fastest, simplest solution that I found.