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

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

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

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

报告相同问题?