On Tue, Oct 12, 2010 at 11:32:11AM -0700, writeson wrote:
> I'm building Pylons (version 0.9.7) intranet applications (a few
> actually) and I think I'm having problems with the static file caching
> system. When I'm developing and demonstrating applications, I often
> jump between one application and another. These applications have some
> identically named external stylesheet (*.css) and external JavaScript
> (*.js) files. Here's the problem I'm seeing; when I go from one
> application to another it appears to me the proper static files aren't
> being loaded and I have to perform a CTRL-F5 (Firefox) to force the
> page to reload the static files. I've read the Pylons docs on how the
> ETag caching works and I would have thought this would make the static
> pages reload even though the file names are exactly the same. Am I
> mistaken about this?

This works if the browser bothers to ask the server whether your
resource changed.  But if the server set an expiration header saying the
resource isn't going to change for the next hour/day/whatever, the
browser won't even check and will happily continue using the old data.

> If so, is there a way to static files reload
> automatically if they have changed? Something like adding a "?
> mtime=<mtime of file>" to the url of the static file name.

I would like to know the answer to this question as well.

Marius Gedminas
-- 
There's an old story about the person who wished his computer were as easy to
use as his telephone. That wish has come true, since I no longer know how to
use my telephone.
        -- Bjarne Stroustrup

Attachment: signature.asc
Description: Digital signature

Reply via email to