I am trying to change the Headers in the response.

My frustration, is that I can change the ETAG header and it is
returned by the browser at the next request but  I can't seem to get
the Cache Control or Expire header accepted by the browser

Does anybody have a clue why?  Is this a browser issue and if so does
anybody have a work around?   The Etag is very useful because it
reduces the work on the servers, but still requires the client
(browser) to connect to the server.  I want to add a Cache-Control
header which would remove the need for the client to connect to the
server at all, until the header had expired.

A snippet of code is below:-

response=HttpResponse(status=304)
response["Etag"] = "test Etag"  #  This works. It gets picked up and
returned in the next request by Firefox

response["Cache-Control"]="max-age=120"  #  This does not work.
Firefox keeps returning max-age=0

response["Expires"]= "Mon, 18 Feb 2009 13:36:08 GMT" # This does not
work. Firefox calls the server.

 return response
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to