How do I stop js files being cached in IE?

Posted by DoctaJonez on Stack Overflow See other posts from Stack Overflow or by DoctaJonez
Published on 2010-05-28T11:04:24Z Indexed on 2010/05/28 11:11 UTC
Read the original article Hit count: 256

Hello stackers!

I've created a page that uses the CKEditor javascript rich edit control.

It's a pretty neat control, especially seeing as it's free, but I'm having serious issues with the way it allows you to add templates.

To add a template you need to modify the templates js file in the CKEditor templates folder. The documentation page describing it is here.

This works fine until I want to update a template or add a new one (or anything else that requires me to modify the js file).

Internet Explorer caches the js file and doesn't pick up the update. Emptying the cache allows the update to be picked up, but this isn't an acceptable solution. Whenever I update a template I do not want to tell all of the users across the organisation to empty their IE cache. There must be a better way!

Is there a way to stop IE caching the js file? Or is there another solution to this problem?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about internet-explorer