View Full Version : Firefox cache Javascript issue

27 Jun 2008, 11:31 AM

My application has several Javascript pages. They work fine with both Firefox and IE. However, when I update my Javascript page (for example, a page called user.js that contains user name and password fields and the new user.js page adds role field to it), I won't see the update on Firefox unless I clean the browser cache. IE7 seems to pick it up just fine.

My question is - Is there a place that I can ask Firefox not to cache my Javascript pages?


27 Jun 2008, 3:56 PM
What you can do is append something to the end to force it to refresh:

<script type="text/javascript" src="myscript.js?v=1.1"></script>

1 Jul 2008, 12:30 PM
Works like a charm. Thank.