How can I avoid the expiration of the page?

When can I get an expired page error in IE? (Doesn't it seem to be added to FF?)

and

I am trying to avoid page expiration in the following scenario:

page1: use post and output page2.

page2: use the message, but with enctype = multipart and output page3

page3: use post and output page4.

page4: no form.

When I navigate through each page, I can use the back button on each page, except on page 4. It seems that it is impossible to return to the page after the page with the form with enctype = multipart? In this scenario, I always lose the page on page 3. Can someone explain why this is and how to allow the user to use the back button on each page no matter which method (POST / GET) is used (if possible )?

I know that you could solve this problem by implementing the PRG template , but this is not quite an option.

Note that a page with enctype = multipart must have an input of type = file in order to trigger this behavior. If I delete all the input files, I can use the reverse and direct without any problems.

Thanks!

+4
source share
2 answers

It's impossible. Your best bet is really PRG. You can store the data of interest in the session before the redirection and delete it from the session after the redirection. To prevent the (very rare) case of an edge that the user presents 2 of these forms at exactly the same moment, save it in some map or associative array in the session by a unique key query request and pass this key as a parameter to the URL or pathinfo from the URL redirection address, and then remove the data associated with the key from the session.

+1
source

Today I ran into this problem. This seems like a bug in IE, as it works fine in Firefox and Chrome. Like the OP, using the PRG pattern in my case is not an option.

The only work that I could encounter was to add target = "_ blank" to the tag on page 3, which forces page 4 to open in a new browser window / tab (thereby leaving page 3 still open in the original window / tab, so that it is still available to the user.) Unfortunately, depending on your specific requirements, this may not be an acceptable solution for all cases.

0
source

Source: https://habr.com/ru/post/1333047/


All Articles