【问题标题】:How to go back to previous page without session expire error by IEIE如何在没有会话过期错误的情况下返回上一页
【发布时间】:2013-02-18 17:07:26
【问题描述】:

我见过很多使用返回按钮返回上一页的例子,但没有一个描述如何避免页面过期错误。

我有 JSP 页面(b.jsp),下面的代码可以返回到上一个 JSP 页面(a.jsp)

  <input type="button" name="cancel_button1" value="Cancel"            onclick="history.back()"></input>

但是当我点击这个按钮时,我看到的是这个错误,而不是之前的 JSP 页面

网页已过期 最可能的原因: •此网页的本地副本已过期,网站要求您重新下载。

如何避免此错误。我听说过缓存,但我不知道在哪里放置 JSP 页面以及如何放置。 任何建议都会很有帮助

【问题讨论】:

  • 你可以得到你的答案here

标签: jsp session caching


【解决方案1】:

解决方案在给定的链接上提供。

http://forums.modx.com/thread/48212/solved-webpage-has-expired-issue

在您的 JSP 中使用以下代码

<%
    response.setHeader("Cache-Control", "no-cache");
    response.setDateHeader("Expires", 0);
%>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2022-10-31
    • 2013-10-17
    • 2015-09-24
    • 2013-04-25
    • 2016-11-06
    • 1970-01-01
    • 2012-07-21
    • 1970-01-01
    相关资源
    最近更新 更多