Stop nginx from caching asset

Cliff Wells cliff at develix.com
Thu Jun 11 04:20:31 MSD 2009


On Wed, 2009-06-10 at 16:33 -0700, merlin corey wrote:
> Replace CTRL with APPLE on Macsen, and there are ways with various
> browsers to turn off caching (web developer toolbar in firefox).
> Another technique is to simply symlink file.js to versioned files like
> file.js.123456789 this way if you need to ensure you get the latest
> copy, you just point to it directly (rather than with the symlink).

Or just request the file with a serialized query string (aka
cache-busting):

file.js?id=123456789

Personally I use FF and the Web Developer extension to disable caching
in my browser when I'm developing to avoid these sort of issues.   It's
by far the simplest solution:

https://addons.mozilla.org/en-US/firefox/addon/60


Cliff

> 
> -- Merlin
> 
> On Wed, Jun 10, 2009 at 10:29 AM, Kevin
> Worthington<kworthington at gmail.com> wrote:
> > To force your browser to not load from its cache, use either Shift +
> > click the refresh button (or F5) -OR- Ctrl + click the refresh button
> > (or F5)
> > --
> > Kevin Worthington
> >
> >
> >
> >
> > On Wed, Jun 10, 2009 at 7:09 AM, Fernando Perez<lists at ruby-forum.com> wrote:
> >> Hi,
> >>
> >> This is driving me nuts. I am updating some js and css files and in my
> >> browser I am still seeing the old files, how can I force my browser or
> >> Nginx to send the new ones?
> >>
> >> Thanks.
> >> --
> >> Posted via http://www.ruby-forum.com/.
> >>
> >>
> >
> >
> 
-- 
http://www.google.com/search?q=vonage+sucks






More information about the nginx mailing list