0

I am a web developer and I often feel need to disable browser cache for certain domain names which I am currently developing on as I don't want javascript to cache. Is there a web browser plugin which I can make use of or It is as trivial as changing certain HTTP headers in apache/php configuration.

I work on LAMP stack.

Shiv Deepak
  • 3,122
  • 5
  • 34
  • 49
  • Which web browser are you using? Firefox, Chrome? – Martin Rothenberger Feb 29 '12 at 09:42
  • You could set up your development web server to disable all caching, so you can test while you develop. If a file gets pushed to production, you can change the reference to that file using a [`?` notation](http://stackoverflow.com/questions/4206224/better-way-to-prevent-browser-caching-of-javascript-files). – CodeCaster Feb 29 '12 at 10:01
  • @MartinRothenberger I switch between Safari and Chrome. – Shiv Deepak Feb 29 '12 at 10:18

1 Answers1

0

You could serve the javascript files trough a PHP script like: src="get_script.php?name=jquery.js" and send the proper headers in get_script.php.

Or you could disable the cache on your browser: http://en.wikipedia.org/wiki/Wikipedia:Bypass_your_cache

Or set the headers in your apache: http://www.askapache.com/htaccess/using-http-headers-with-htaccess.html

Yaniro
  • 1,595
  • 9
  • 14