How do I cancel the Refresh page popup "Retry" dialog?
looking for a lot of similar questions do not have the answer I want, please see clearly and then answer.
For example, in the process of login, after successful turn to a page success.jsp,
At this point, let's say that the Refresh page will have a retry dialog box, so how do you not let it appear?
Some people say with GET request, sorry, user login is impossible with GET request, data unsafe ...
------To solve the idea----------------------
the same question, help the top
------To solve the idea----------------------
with Ajax, there's no such thing.
------To solve the idea----------------------
just to have a POST request to a page, to refresh the page there will be a "retry" phenomenon
The workaround:
The request page sends a request to an intermediate page (or servlet), and the intermediate page processes the request. Put the results in session
then use Response.sendredirect (...) to jump to success.jsp
when the success.jsp is refreshed, there is no "retry".
but this method consumes server-side memory very much, preferably emptying the session in time
------To solve the idea----------------------
discuss
The 7 floor method is feasible. But it is not possible to do so.
------------------------------
------To solve the idea----------------------
"Retry" is specified in the HTML standard, assuming that you want to remove, there are the following methods:
1. It is recommended that the HTML Standards Committee remove the "retry" and wait for them to change the standard
2. Develop a browser, do not adhere to the HTML standard, do not "retry"
3. Tell the user. This page cannot be refreshed.
I usually use the method 3.
------To solve the idea----------------------
There are forms submitted pages as little as possible with the refresh it ... Otherwise, there will be unexpected results sometimes.
------To solve the idea----------------------
you need to completely replace the current page with enough talent.
------To solve the idea----------------------
change the form submission to a link
------To solve the idea----------------------
change the form submission to window.location.href= .....? ...??????????????? Username=***.value&password=***.value
once submitted to Ali Project test. They gave us this as a serious bug, which was pretty depressing at the time.
------To solve the idea----------------------
JSP is submitted to the servlet before jumping to the JSP.
------To solve the idea----------------------
submitting pages with Ajax is also not very good. Recommended masking refresh.
------To solve the idea----------------------
prevent repeated submissions, almost all of the web framework has overcome this problem. The principle is 7 floor said, first processing the request and then 302 jump
Suppose success.jsp to show something and don't want to mess it up, just put it in the URL.
------To solve the idea----------------------
this should be the case, for example landing page is login.do,post back to login.do, assuming that struts, can be used Actionmessages Returns the check number, assuming the login is successful, use Location.href to turn. This avoids the problem of refreshing .
Should you order a Serverbutton, in the press refresh will be submitted once again.
The simplest way to do this is to use Response.Redirect (Request.Url.ToString ()) in your commit event; Jump to the current page
Then the solution is coming, since the submission form will not be rejected. Then we'll do a form refresh. First we have to find out what is going to be repeatedly submitted when the page is refreshed. This involves a server object request, which is called for the moment. The people who do web development are very familiar with it. The data that is submitted, whether it is a post or a Get method or even a mixed commit, is stored in this object. Then take out its data items and make a hidden field in the form. Action is set to _self and the commit is run, then the effect will be the same as pressing F5 and then clicking on the unlucky "retry" effect.
because when you click on the server control and then refresh, you will be prompted to retry or cancel, the operation is finished with JavaScript, the complex operation can be completed with Ajax
response.write (" <script>window.location.href= ' Test.aspx '; </script> "
because you are using the server control. The control has viewstate=true enabled, you try to change it to fales see if the value is still not in
<%@ page set enableviewstate=" true ";
<%@ page enableviewstate=" true "&NBSP;%>
Copyright notice: This article blog original articles, blogs, without consent, may not be reproduced.
F5 when the page is refreshed, "to show this page again, Web browser, you have ever sent a message to submit again ..." Click Retry ", and how to prevent this dialog box solution from appearing,