What causes the if-none-match request header field to become huge?
I have a problem with the If-none-match header which is sent to a Django CMS App, running through Apache2/mod_wsgi.
When editing the most used page, various users' browsers (Chrome and FF) get an error from Apache complaining that the if-none-match field is too long.
On inspection (through wireshark) the browser is sending about 8KiB if etags in this one header line. Clearing the browser's cache or restarting does not clear the problem.
I'm not sure what is at fault here.
Is the correct interpretation of the field's values as follows:
The browser is claiming to know about a few hundred previous versions of the page (which is credible, as the error only occurs on heavily 'get'ed rapidly-changing pages).
Is there a way of clearing out etags from FF or Chrome?
Thanks,
Chr开发者_Go百科is.
It may be best for you to just prevent Django from generating ETags in the first place. Since Django only generates them after a page has rendered, they don't save you server resources--just bandwidth. If your bottleneck isn't bandwidth, you can just disable them by setting USE_ETAGS = False
in your settings file.
Details are here: http://docs.djangoproject.com/en/1.2/ref/settings/#std:setting-USE_ETAGS
精彩评论