Added no-cache headers to pick and bulk-accept views.
Also added a TODO since IE7 seems to ignore the headers.
Patch by: Lennard de Rijk
Reviewed by: to-be-reviewed
--- a/app/soc/views/models/base.py Sat Feb 14 21:32:25 2009 +0000
+++ b/app/soc/views/models/base.py Sat Feb 14 22:04:14 2009 +0000
@@ -583,7 +583,11 @@
context = {'json': json}
template = 'soc/json.html'
- return helper.responses.respond(request, template, context)
+ response = responses.respond(request, template, context)
+ # TODO IE7 seems to ignore the headers
+ response['Pragma'] = 'no-cache'
+ response['Cache-Control'] = 'no-cache, must-revalidate'
+ return response
def _editPost(self, request, entity, fields):
"""Performs any required processing on the entity to post its edit page.
--- a/app/soc/views/models/org_app.py Sat Feb 14 21:32:25 2009 +0000
+++ b/app/soc/views/models/org_app.py Sat Feb 14 22:04:14 2009 +0000
@@ -208,7 +208,11 @@
context = {'json': json}
template = 'soc/json.html'
- return responses.respond(request, template, context)
+ response = responses.respond(request, template, context)
+ # TODO IE7 seems to ignore the headers
+ response['Pragma'] = 'no-cache'
+ response['Cache-Control'] = 'no-cache, must-revalidate'
+ return response
view = View()