DevX
DevX

Reputation: 1864

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 mainly chrome and occasionally firefox for testing.

Upvotes: 1

Views: 216

Answers (4)

Britney Spears
Britney Spears

Reputation: 11

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

Upvotes: 1

James Gaunt
James Gaunt

Reputation: 14783

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.

Upvotes: 1

troynt
troynt

Reputation: 1912

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/

Upvotes: 2

Vincent Mimoun-Prat
Vincent Mimoun-Prat

Reputation: 28551

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.

Upvotes: 0

Related Questions