Mercurial > p > roundup > code
comparison roundup/cgi/client.py @ 1579:07a6b8587bc2
removed Pragma: no-cache...
...so that Mozilla and its ilk only load pages once per request!
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Thu, 10 Apr 2003 04:32:46 +0000 |
| parents | b975da59cd11 |
| children | caae7d8934dc |
comparison
equal
deleted
inserted
replaced
| 1578:ba13c04814f0 | 1579:07a6b8587bc2 |
|---|---|
| 1 # $Id: client.py,v 1.111 2003-03-26 06:46:17 richard Exp $ | 1 # $Id: client.py,v 1.112 2003-04-10 04:32:46 richard Exp $ |
| 2 | 2 |
| 3 __doc__ = """ | 3 __doc__ = """ |
| 4 WWW request handler (also used in the stand-alone server). | 4 WWW request handler (also used in the stand-alone server). |
| 5 """ | 5 """ |
| 6 | 6 |
| 222 # figure out the context and desired content template | 222 # figure out the context and desired content template |
| 223 self.determine_context() | 223 self.determine_context() |
| 224 # possibly handle a form submit action (may change self.classname | 224 # possibly handle a form submit action (may change self.classname |
| 225 # and self.template, and may also append error/ok_messages) | 225 # and self.template, and may also append error/ok_messages) |
| 226 self.handle_action() | 226 self.handle_action() |
| 227 | |
| 227 # now render the page | 228 # now render the page |
| 228 | |
| 229 # we don't want clients caching our dynamic pages | 229 # we don't want clients caching our dynamic pages |
| 230 self.additional_headers['Cache-Control'] = 'no-cache' | 230 self.additional_headers['Cache-Control'] = 'no-cache' |
| 231 self.additional_headers['Pragma'] = 'no-cache' | 231 # Pragma: no-cache makes Mozilla and its ilk double-load all pages!! |
| 232 # self.additional_headers['Pragma'] = 'no-cache' | |
| 232 | 233 |
| 233 # expire this page 5 seconds from now | 234 # expire this page 5 seconds from now |
| 234 date = rfc822.formatdate(time.time() + 5) | 235 date = rfc822.formatdate(time.time() + 5) |
| 235 self.additional_headers['Expires'] = date | 236 self.additional_headers['Expires'] = date |
| 236 | 237 |
