Skip to content Skip to sidebar Skip to footer

Unable To Change Session Variable Through Ajax In Ie

I'm getting some weird behavior from IE when trying to change a session variable on the server using AJAX. It works fine in FF, Chrome, Safari, and all the others I've tested but n

Solution 1:

I had the same problem, but with Pylons, what I did was create a middleware that set the following configuration in my response headers.

headers["Cache-Control"] = "no-cache"
headers["Pragma"] = "no-cache"
headers["Expires"] = -

Here is a description on what this does.

Solution 2:

Django already has this built into it's response objects.

response = HttpResponse(data, mimetype='application/javascript')
response['Cache-Control'] = 'no-cache'
response['Pragma'] = 'no-cache'
response["Expires"] = ''return response

Post a Comment for "Unable To Change Session Variable Through Ajax In Ie"