7 Feb 2012 8:35 AM #1
How to clear cache automatically?
I am deploying my application in production server so that all of the users can use.But whenever i update the code in the application,until the user refreshes, the changes i have made wont reflect on their system.So Please can anyone tell me, how to clear cache automtaically?
waiting for reply...
Thanks in advance.
7 Feb 2012 8:49 AM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
You don't have access to the browser like that really. You can do an Ajax call and execute the code to live update code but I wouldn't, I would just prompt that a new version is available and give the option to refresh the page.Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services firstname.lastname@example.org
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!
When posting code, please use BBCode's CODE tags.
8 Feb 2012 1:30 AM #3
can u please b still clear in explaining....
13 Feb 2012 7:18 AM #4
I think the best way is to set up your build process, so that for production builds
* all JS is merged, minified and stored in a single file with a unique suffix (like md5 hash)
* all CSS is processed the same way
* The index.html is built so that it references the CSS and JS file with the correct suffix
That takes some effort, but is definitely worth it to avoid such problems like you mentioned.