5👍
What happens is, the browser asks for the new URL and via 302 gets redirected back to the previous one, which is in the cache and thus not refreshed. Adding a random integer, like Piotr is suggesting will solve the problem. For randomness you can use simple timestamp.
Implication of performing forward as you are doing makes your app unRESTful and prohibits user bookmarking the results – i wonder if it is really what you would like to do.
It might be worth a try to try and use 303 or 307 status code instead of 302, maybe that behaves differently.
See also:
http://en.wikipedia.org/wiki/HTTP_302
http://en.wikipedia.org/wiki/Representational_State_Transfer
1👍
I’d say you’re doing it wrong. The same URL should be the same page. Everything with HTTP and web browsers assume this, and when you don’t follow this convention you’re going to get yourself into trouble. Just add the search parameters and sort orders as query parameters to the URL.
- [Django]-How to unittest "new style" Django middleware
- [Django]-Access to fields of prefetch_related on reverse relation
0👍
How about redirecting to
http://website.fr/search/?ignoredvar=<random int>
Please provide the full http conversation If you need a better solution.
The conversation can be traced using firebug or live http headers.
Btw. The above solution is the only one I know for similar bug in a flash on IE.
- [Django]-Django: follow relations backwards
- [Django]-DRF – ModelSerializer with a non-model write_only field
- [Django]-Wagtail: Can i use the API for fetching read-only drafts of pages for review?
- [Django]-Django run another class-based view (CBV) in a CBV?