[openstreetmap/openstreetmap-website] A Static JS file can never receive a 304 Not Modified (#2263)

alexkemp9 notifications at github.com
Sun Jun 16 21:49:42 UTC 2019

(***Note before:*** This is the inverse of the [previous problem](https://github.com/openstreetmap/openstreetmap-website/issues/2262))    
(The other JS files had cache+expire, no eTag nor LM)    
(This JS file has NO cache+expire, and full eTag+LM)    

Conducting a simple refresh (f5) on a recently downloaded [test map page](https://www.openstreetmap.org/way/17236956) causes only half (10 out of 21) of the files to give a `304 Not Modified`. Obviously *Not Good* both for the user (slow) plus OSM (increased bandwidth + load).

Some of those files may well be dynamic, but some are clearly static. Because of the wide range of *Response Header* symptoms + my ignorance these are individual filetype reports to allow those with a working knowledge of the code to decipher it all. Please also note that since these tests the [`Last-Modified` value](https://github.com/openstreetmap/operations/issues/305) has been re-enabled & `eTag` disabled.

*The meat*    
(probably) a static JS file.    

1 x JS    
eg https://piwik.openstreetmap.org/piwik.js

- `cache-control`: none
- `eTag`: strong    
- `Expires`: none
- `Last-Modified`: yes    
- Request: (If-None-Match + If-Modified-Since are both present, but no cache, so no 304)    

The tiles supplied by *toothless* (eg https://b.tile.openstreetmap.org/18/130245/85447.png) are all dynamic yet all have a strong `eTag` (matched by the `If-None-Match`) + `Expires` and thus get cached + a 304.

See bottom of [this Diary page](https://www.openstreetmap.org/user/alexkemp/diary/368814) for fuller details.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20190616/88469432/attachment.html>

More information about the rails-dev mailing list