[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-relays] Atlas is now Relay Search!



> On 15 Nov 2017, at 03:12, Iain R. Learmonth <irl@xxxxxxxxxxxxxx> wrote:
> 
> I think there may be some issues, with such a large change some breakage
> may occur if you have different versions of the JavaScript files and the
> templates in your cache.
> 
> The Last-Modified dates seem to work, and If-Modified-Since seems to
> work too. Maybe Safari is just doing something weird and not
> invalidating the cache.

The canonical way to solve this issue is to use a cache-breaker parameter
in the resource URL.

So your current resource references probably look like:
https://atlas.torproject.org/resource.js

But a cache-breaker would look like:
https://atlas.torproject.org/resource.js?v1.1

Then when you change any code in the file, you update the version:
https://atlas.torproject.org/resource.js?v1.2

This usually doesn't require any web server support, because the
parameter is ignored by the server, which serves the most recent
version regardless. It's just there to tell the cache that the code has
been updated.

Of course, this is annoying to update if your site embeds a reference
to the resource on every page, rather than listing URLs in a config.

T
_______________________________________________
tor-relays mailing list
tor-relays@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays