doujiang6944 2012-11-01 04:51
浏览 26
已采纳

如何在不使用缓存的情况下禁用“文档已过期”

What I'm doing is simple:
page1 (POST)-> model2 -> Page2 -> Page3

When accessing Page2 by clicking 'Back' button of browser from Page3,
I get "Webpage has expired"(IE) or "Document Expired"(FF) which I don't want to show to users.

As far as I know, one solution is making the "Cache-Control" private or public,
but I need to generate some one-time key in model2
which will be posted to Page3(in another site) later.
When back to Page2, the one-time key must be regenerated too,
so cache seems not to be a solution for me.

Using GET to pass parameters from Page1 to Page2 works fine,
the one-time key is regenerated everytime and no warning from the browser
except one little problem : the parameters are shown in the url.
Tried to solve that by using a redirect right after get,
but that leads back to the cache problem: I can't get the one-time key regenerated.

So is there any way that will not show parameters in url from Page1 to Page2
and will not show "Document Expired" from Page3 to Page2 when click the 'back' button?

  • 写回答

1条回答 默认 最新

  • doulie0178 2012-11-01 05:30
    关注

    Post them via ajax before you navigate to the next page

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 为什么eprime输出的数据会有缺失?
  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
  • ¥15 错误 LNK2001 无法解析的外部符号
  • ¥50 安装pyaudiokits失败
  • ¥15 计组这些题应该咋做呀
  • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
  • ¥15 让node服务器有自动加载文件的功能
  • ¥15 jmeter脚本回放有的是对的有的是错的
  • ¥15 r语言蛋白组学相关问题