PDA

View Full Version : Firefox cache Javascript issue



tll
27 Jun 2008, 11:31 AM
Hi,

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?

Thanks.

evant
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>

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