How to setup environment for front end coding?
I'm getting around to doing a few front end coding in CSS and javascript.
But the caching of css, javascript, and html files is killing me slowly. Whenever I make a change, I try everything to get the updated files to refresh, but the old version keep coming back. Of course, this is a great feature in the production version, but in development, it's driving me nuts.
I found an extension "CSS Refresh" that does a good job of refreshing CSS, but html and javascript can still be a problem.
I'm using m开发者_开发百科ainly chrome and occasionally firefox for testing.
Did you try disabling cache in Firefox?
If you are looking for an addon https://addons.mozilla.org/en-US/firefox/addon/10338/
Or as another user stated use Web Developer Toolbar https://addons.mozilla.org/en-US/firefox/addon/60/
I find the only way to guarantee a refresh when you release a new version of a web application is to rename the relevant files. Ideally use some sort of version number on the javascript/css (e.g. script.1.0.3.4.js).
With a bit of effort you can automate all this into the build process using the feature to auto increment an assembly's version.
I find this quite helpful when doing JavaScript developing in chrome:
Another interesting option is to open a new incognito window (ctrl+shift+n). This window won't use any stored cookies, cached content, or dns resolutions.
Source: https://superuser.com/questions/220179/cache-refresh-in-chrome/220186#220186
On Firefox you have the Web Developper toolbar than can disable caching for a particular website. I also recommend the Firebug extension if you are not already using it.
精彩评论