tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shubham Gupta <shubha...@directi.com>
Subject Caching in Tomcat
Date Wed, 29 Jun 2011 17:50:12 GMT
Hi guys,
In order to implement infinite caching, we have put an 'Expires' & a 
'Max-Age' header to a large value, but still the browser makes a 
conditional GET for files having a relatively new 'Last-Modified' time. 
Is this a normal behaviour ?

If we remove the 'Last-Modified' & the 'Etag' header, then it always 
fetches the file from cache. Since there is no 'Last-Modified' header, 
it doesn't have an 'If-Modified-Since' header when making a condititonal 
GET (on pressing F5). Therefore, the whole file is sent back (Response: 
200 OK).

Since we noticed that for files having relatively old timestamps 
conditional GETs are being sent less frequently, we are planning to set 
the 'Last-Modified' header to a really old value (say 1970).

Does doing this have any disadvantage & is it an efficient way to 
implement infinite caching or we are missing out something here ?

-- 
/Shubham Gupta/

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message