Cache headers modified by Google Frontend

313 views
Skip to first unread message

Francois Masurel

unread,
Jan 25, 2014, 12:26:16 PM1/25/14
to google-a...@googlegroups.com
Hi everybody,

Do you know why cache headers are modified by Google Frontend servers?

Google prohibits my dynamically served static resources to be cached on proxy and user sides.

For example, Google set the Expires header to this:
Expires: Fri, 01 Jan 1990 00:00:00 GMT

And Pragma and Cache-Control to this:
Pragma: no-cache
Cache-Control: no-cache, must-revalidate

In my code, both Pragma and Cache-Control are set to public (plus max-age for Cache-Control).

Example of problematic resource:

What is strange is that the same exact code works perfectly fine in other apps like this one:

Anybody knows what's going on? What can I do to fix it?

Thanx for your help.

François

Vinny P

unread,
Jan 26, 2014, 2:23:43 PM1/26/14
to google-a...@googlegroups.com
Hi Francois,

As Nicolas said in this post: https://groups.google.com/forum/#!topic/google-appengine/k3LrZodr-WA the caching seems to be working correctly. I can see the proper Cache-Control and Pragma headers in the response when I use Chrome's Developer Tools screen. Are you still experiencing errors?

If you're still seeing errors on your end, try this tool: http://www.hurl.it/?url=http://dev.pronocities.com/theme/com.pronocities.theme.base/858/logo_mail.png (Press the Launch Request button when the page loads). You'll be able to see the response headers that Hurl.it gets back from the request.


 
 
-----------------
-Vinny P
Technology & Media Advisor
Chicago, IL

App Engine Code Samples: http://www.learntogoogleit.com
 
 


--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.

Francois Masurel

unread,
Jan 26, 2014, 3:20:50 PM1/26/14
to google-a...@googlegroups.com
Hi Vinny,

Thanx for trying to help, I really appreciate what you do in this group.

The cache problem seems related to the fact that I'm connected on the site as an adminstrator.

In incognito mode or connected with another "basic" account, it works fine, resources are properly cached.

Connected with an "admin" account, caching seems to be disabled, at least on Chrome and Firefox.

Anybody could confirm such behavior?

Thanx again for your help.

François

Barry Hunter

unread,
Jan 27, 2014, 9:30:45 AM1/27/14
to google-appengine


Connected with an "admin" account, caching seems to be disabled, at least on Chrome and Firefox.

I've seen this too. 

I believe its a 'feature' - ie so the admin shouldnt see stale pages. To make it easier to edit pages in CMS's etc. 

But it might also be to help ensure that your 'secret' information in X-AppEngine-Estimated-CPM-US-Dollars header etc, is not accidently cached in proxy servers. 



btw, a nice tool for checking caching headers is redbot.org

 
it highlights that your eTag, and if-modified-since checks (which I dont think are implemented by the edge-cache) might not be completely functional. 

Francois Masurel

unread,
Jan 27, 2014, 9:35:16 AM1/27/14
to google-a...@googlegroups.com
Hi Barry,

You're right, it's must be a feature to avoid AppEngine "admin" headers being cached by proxies, should have thought about it by myself :-)

Thanx a lot for helping.

François
Reply all
Reply to author
Forward
0 new messages