Use history.back () Returns this webpage requires data that you entered earlier in order to properly display

Cause: The
  form submission page using the session_start function. As we retreat browsing is cached pages, and the function will force the current page will not be cached.
Solve:
PHP:
  This page submission in a POST prompted, point to the other pages later, back through JavaScript, IE will display the prompt. There was also encountered many times, but did not take too much notice, Baidu, the original session at play.
When the back button or page through IE in history.go (-1), we see that the page will be cached, but after using session_start, this function will force the current page is not cached, resulting in "Warning: website already expired".
  Solving method :
after session_start plus a header ( "Cache-control: private "); Note Before this procedure can not have any output.
Bank note before your PHP program output and can not have any gaps

  Solve Method Two :

Session based solutions
before session_start plus session_cache_limiter ( 'private'); // not clear the form, only take effect during the session
session_cache_limiter there are two other parameters of meaning:
session_cache_limiter ( 'nocache'); // clear the form
session_cache_limiter ( 'public'); // not clear the form, use the session as not 
  solve method three :
 change the configuration file php.ini. The file to session.cache_limiter = session.cache_limiter = nocache or session.cache_limiter = none, then re-start apache.

 Because the package using the frame session, so I use the third method

java:
using history.back javascript is () during the return, and sometimes will prompt "page has expired", mostly because the target page submission form for the post, but the response page after the form has been submitted, the form can not be found specific reference

Number, and "error", concrete solutions:
First, in the target page to be returned, add <% response.setHeader ( "cache-control ", "public");%>
Second, the form of the target page method = "post" removed, or changed method = "get".

 

Turn: https://www.cnblogs.com/yangjing1314/p/4698838.html

 

Guess you like

Origin www.cnblogs.com/wangzhaobo/p/11023297.html