Etag & If-None-Match Trouble

2,629 views
Skip to first unread message

Steve

unread,
Nov 3, 2010, 8:26:39 PM11/3/10
to Google App Engine
Can anyone tell me what the secret is to get Google Chrome (9/dev) or
IE8 to send If-None-Match headers? I've gone to a lot of work to
organize my application so it sends ETags and short-circuits doing
work when an etag matches the "If-None-Match" header. Firefox works
beautifully and I send out lots of cheap 304s. But, I'm getting bald
spots from ripping my hair out trying to get Chrome or IE to do the
same.

Has anybody conquered this before?

Thanks!

Steve

风笑雪

unread,
Nov 3, 2010, 11:16:53 PM11/3/10
to google-a...@googlegroups.com
Just simply compare Etag and If-None-Match,then send 304 status when
matching, it works on Chrome 6, Firefox 3.5 and Opera 10.5:
http://bitbucket.org/keakon/yui/src/tip/yui.py#cl-820

For those browsers which have no affect at all, you can try deploy to
app server since the dev server always send "Cache-Control: no-cache"
and "Expires: Fri, 01 Jan 1990 00:00:00 GMT" to prevent cache.

----------
keakon

> --
> You received this message because you are subscribed to the Google Groups "Google App Engine" group.
> To post to this group, send email to google-a...@googlegroups.com.
> To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
>
>

Steve

unread,
Nov 3, 2010, 11:28:38 PM11/3/10
to Google App Engine
Hi,

I'm afraid maybe my question was not clear. I can send the 304s with
no problem. My trouble is that I cannot get IE8 or Chrome9(dev) to
send the If-None-Match header in the request.

I've since installed Opera and Safari. Opera, like Firefox, performs
well and sends the If-None-Match. Safari performs like Chrome and IE
and doesn't send it.

Is there some magical combination of other response headers required
(last modified, cache control, expires??) necessecary to get IE and
Chrome to save the etag and issue conditional requests?

You mentioned Chrome 6 worked as expected. I'll have to try
installing an older version. I don't have the no-cache or expires
trouble because I'm specifically sending 'Cache-Control: public, must-
revalidate' and removing the expires header.

Thanks,
Steve

Steve

unread,
Nov 4, 2010, 12:32:51 AM11/4/10
to Google App Engine
I found Chrome 7 on one of my machines so I tested it. It works
correctly. Also my IE8 started working after I bypassed the proxy.
So now only my Chrome9 and Safari are misbehaving. Maybe it's a
webkit bug and not a brainless appengine user (me) that's causing the
problem.

--Steve
Reply all
Reply to author
Forward
0 new messages