[OpenLayers-Dev] Caching layerimages by browsers
claude.philipona at camptocamp.com
Sat Mar 6 16:38:50 EST 2010
> So, you can improve the caching situation by having your server (or
> gateway cache) use appropriate headers on responses.
In a deep analysis of OL cache browser use in firefox using the
firefox extension "Page Seed", we found out that Firefox is actually
not always using properly the cache browser with OL preseeded tile
system, even though the headers are properly set on the http server.
The Firefox disk cache hash functions can generate collisions for URLs
that differ only slightly, which is the case with preesed tiles image
in OL. Example of url in OL:
Due to a URL conflict, the Firefox browser cache can store only one of
these resources at a time. Changing the URLs of some resources can fix
this problem. Consult the Page Speed documentation for information on
how to disambiguate these URLs.
We found out that we are facing this kind of FF limitation with OL
preseeded layers served thru varnish or Squid
More info from:
Avoid URLs that cause cache collisions in Firefox.
The Firefox disk cache hash functions can generate collisions for
URLs that differ only slightly, namely only on 8-character boundaries.
When resources hash to the same key, only one of the resources is
persisted to disk cache; the remaining resources with the same key have
to be re-fetched across browser restarts. Thus, if you are using
fingerprinting or are otherwise programmatically generating file URLs,
to maximize cache hit rate, avoid the Firefox hash collision issue by
ensuring that your application generates URLs that differ on more than
More information about the Dev