Cache-Control header & the Google Frontend Server

868 views
Skip to first unread message

MP

unread,
Oct 5, 2008, 7:31:52 PM10/5/08
to Google App Engine
Symptoms:

I noticed when I sign out of my app, it takes me to a page which
indicates I am still logged in, which is confusing. When I click
signout in my app, I want it to take me to a page that indicates I am
signed out. This problem occurs with the Google Frontend Server, but
not with the Development Server.

Diagnosis:

It looks like the culprit is browser cacheing... my browser caches the
"signed in" version of the page and serves it after I signout. If I
refresh the page again, it returns to the correct state of 'signed
out'.

My attempt at a solution was to set "Cache-Control" to "no-cache" in
the response headers of all my dynamic pages. This seems to work fine
when I do not have a session cookie stored. However, when the browser
has a session cookie, it seems that the Google Frontend overwrites
"Cache-Control" with "private, max-age=86400". This is what breaks my
signout procedure.

Question:

Can I stop the Google Frontend from overriding my Cache-Control header
when the browser has a cookie?

MP

unread,
Oct 5, 2008, 7:57:30 PM10/5/08
to Google App Engine
I found a temporary solution, adding the following meta tag to my html
head:

<meta http-equiv="Cache-Control" content="no-cache" />

This works, but there should be a more elegant solution.

Sylvain

unread,
Oct 6, 2008, 5:22:17 AM10/6/08
to Google App Engine

Jon

unread,
Oct 5, 2008, 10:08:29 PM10/5/08
to Google App Engine
Reply all
Reply to author
Forward
0 new messages