zillo32 / vosao

Automatically exported from code.google.com/p/vosao
GNU Lesser General Public License v2.1
0 stars 0 forks source link

Add "304 - Not Modified" (browser caching) for all files served by Vosao #497

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I think it would be a good idea to add browser caching to any file (such as an 
image, css, js file) served by Vosao. This should reduce the load, increase the 
speed, reduce bandwidth consumption and increase page rank (Google factors in 
page load speed, and browser caching is one of the checks).

Would it be also possible to set the expiry time for it too?

By the way, apache (and most HTTP servers) do 304 by default. I found out that 
Vosao doesn't do it when I ran the google page speed checker.

Original issue reported on code.google.com by rqu...@ebstrada.com.au on 26 Jul 2011 at 11:03

GoogleCodeExporter commented 8 years ago
Shouldn't be too hard to implement for static resources like those mentioned 
above right? Not overly concerned about pages being cached, just big resources 
like images and js.

Original comment by rqu...@ebstrada.com.au on 26 Jul 2011 at 11:06

GoogleCodeExporter commented 8 years ago
See attached screenshot for explanation.

Original comment by rqu...@ebstrada.com.au on 26 Jul 2011 at 11:13

Attachments:

GoogleCodeExporter commented 8 years ago
Possible the problem in locale. There is a logic for cache control. It check 

if(DateUtil.toHeaderString(file.getLastModifiedTime()).equals(
                request.getHeader("If-Modified-Since"))){

But, request.getHeader("If-Modified-Since") maybe a non valid string format, 
e.g. ???, 17 ??? 2011...

Original comment by kirill.s...@gmail.com on 16 May 2012 at 1:22