jalmenarez / minify

Automatically exported from code.google.com/p/minify
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Allow Expires + conditional GET #37

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Minify::serve() should still support conditional GETs when 'setExpires' is 
used. (requested by vadibart)

Some pages naturally elicit user refreshes (e.g. eBay bidding) and at 
least one major browser (IE7) will send a conditional GET when a standard 
refresh is used (F5 or the refresh button). In this case a 304 response, 
when appropriate, would definitely be desired. 

Considering some sites send Last-Modifieds with short max-ages, this would 
also support that. In fact, serve() should probably just have a 'maxAge' 
option and set Expires and Cache-Control: max-age based on that (instead 
of 'setExpires').

So we'll modify ConditionalGet.php and use it for every request. On the 
plus side the serve() code will end up cleaner.

Original issue reported on code.google.com by mrclay....@gmail.com on 17 Jul 2008 at 11:07

GoogleCodeExporter commented 9 years ago
In R156 'maxAge' now replaces 'setExpires' and doesn't prevent conditional GETs.

Original comment by mrclay....@gmail.com on 22 Jul 2008 at 11:40