Blog‎ > ‎

Google Sites, headers, time stamps, etag's, (non) efficient caching

posted Nov 23, 2013, 7:15 AM by Sami Lehtinen   [ updated Nov 23, 2013, 7:15 AM ]
It's interesting that Google Sites uses only one last modified timestamp per site. It also directly derives etag from it. This basically leads to situation where pages are reloaded from Google servers, even if nothing has changed. Expiry time is set to 5 seconds, which is ok. Because after that checking etag would tell if page has changed or not. But in this case, if any page of the site has been changed, etag is updated for all pages of the site. Etag content is quite clear, it looks to be last modification stamp with some extra data.

Last-Modified:    Sat, 23 Nov 2013 15:11:48 GMT  
ETag:             "1385219508146|#public|0|de|||0"  
Expires:          Sat, 23 Nov 2013 15:12:19 GMT  
Date:             Sat, 23 Nov 2013 15:12:14 GMT  
Cache-Control:    public, max-age=5

This is totally working and nice solution AFAIK. Except the fact that this data is shared with all pages of the site.