I've got a page having a form which i use for site search. The shape uses Publish verb to submit data to find. The search engine results are displayed underneath the form after it's posted.

So that they can solve the "Page has expired" problem on IE I personally use the so known as PRG pattern (http://en.wikipedia.org/wiki/Publish/Redirect/Get). and so i return django.cutting corners.redirect() from my view's publish() method that redirects towards the same URL.

The issue is that in production I see different session ids connected using the GET demands sent following the 302 response. and also, since I store my form within the session to have the ability to split the outcomes directly into pages, I recieve sporadic results.

I run django under apache/mod_wsgi. apache is set up to operate for the most part 3 processes.

It doesn't happen immediately after I restart httpd, also it appears it begins happening after the quantity of memory consumed by httpd processes reaches some limit.

I take a look by frequently pressing the submit button, the shape will get populated in the session in order to begin to see the search strings which i have joined. when session changes, the shape is came back blank. so, if this begins happening, the shape will get effectively populated 2 occasions consecutively, so when I press submit for that third time that it returns blank, meaning the server came back new session snacks. this appears to possess something related to the ServerLimit setting.

What's wrong? Any ideas?

thanks

Konstantin

You're Using Django Periods Application Correct?

If that's the situation it stores the present session ID inside a cookie whose title is specified using the setting SESSION_COOKIE_NAME also it defaults to sessionid. As you are not going through this problem in Opera, In my opinion it ought to be safe to visualize that the session handling and storage within Django is working fine.

Probably the most likely reason here's that IE is losing/removing the sessionid cookie, leading to it begin a new session following the redirect. A fast google about them appears to verify this.

You can observe some related information at:

Now, to be able to really solve your condition. Django doesn't set a session cookie unless of course it really needs too (i.e. Should you set Session Data). When the only placed you set session data is incorporated in the view whenever you Publish, then IE will discard the cookie setting the sessionid.

So a simple and quick bandaid is always to just avoid wasting junk data (or default values?) towards the session throughout the Reach display the shape initially prior to the Publish, which will IE can get the sessionid cookie, and things should work.

IE opens a brand new connection if this will get a 302 redirect. For this reason the 302 solves your page has expired problem. But which means you're serving a brand new "session".

You will need another mechanism to trace the session over the 302 apart from being based mostly on the bond.

Perhaps you have attempted utilizing a HTTP 303 See Other response rather than a 302?

http://tumblr.jonthornton.com/publish/7902581999/stopping-form-re-submission-with-http-303-redirects