页面到期 [英] page expiration

查看:46
本文介绍了页面到期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,很简单的问题:


如何让页面立即过期?


我不想要用户能够重新访问它。


尝试<%response.expires = 0%>,没有用。


不明白如何使用System.Web.HttpCachePolicy


???


谢谢

kpg

Hi all, easy question:

How can I make a page expire immediately?

I don''t want the user to be able to re-visit it.

Tried <% response.expires = 0 %>, did not work.

Don''t understand how to use the System.Web.HttpCachePolicy

???

Thanks
kpg

推荐答案

将Response.Expires设置为0只是为了使浏览器不会缓存

页面,这根本不是解决问题的方法。


你是说如果有人看到某个页面,那么如果他们刷新或

返回它,你想让他们看到别的东西或被重定向?

" kpg" < IP *** @ thereforeiam.com>在消息中写道

新闻:%2 **************** @ TK2MSFTNGP10.phx.gbl ...
Setting Response.Expires to 0 just makes it so the browser doesn''t cache the
page, which doesn''t sound at all like the solution to your problem.

Are you saying that if someone sees a certain page, then if they refresh or
return to it, you want them to see something else or be redirected?
"kpg" <ip***@thereforeiam.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
大家好,简单的问题:

如何让页面立即过期?

我不希望用户能够重新访问它。

尝试<%response.expires = 0%>,无效。

不明白如何使用System.Web.HttpCachePolicy
???

kpg
Hi all, easy question:

How can I make a page expire immediately?

I don''t want the user to be able to re-visit it.

Tried <% response.expires = 0 %>, did not work.

Don''t understand how to use the System.Web.HttpCachePolicy

???

Thanks
kpg



>将Response.Expires设置为0只是为了使浏览器不会缓存
> Setting Response.Expires to 0 just makes it so the browser doesn''t cache
页面,这根本不是解决问题的方法。
你是说如果有人看到某个页面,那么如果他们刷新
或返回它,你想让他们看到别的东西或被重定向吗?
the page, which doesn''t sound at all like the solution to your problem.

Are you saying that if someone sees a certain page, then if they refresh
or return to it, you want them to see something else or be redirected?




用户登录后,我显示一个显示项目列表的页面

之前

已保存。当用户选择一个时,我将它们重定向到一个页面,其中加载了所选的

数据以开始处理。如果他们点击

后退按钮(历史记录)

浏览器并尝试重新访问项目列表页面我想表明它已经

已过期。

除非他们注销

然后重新开启,否则他们无法返回此页面。


如果页面没有被缓存,那么请求将到达服务器

,我可以显示一条消息。我的问题是我把一个response.expires = 0

,我仍然得到了缓存页面。也许我错了。我在< head>之前将它添加到

html页面的顶部。我也尝试在页面加载事件中添加一个

response.expires = 0,效果相同(无)。


希望清除它。


谢谢,

kpg



After the user logs on I show a page that displays a list of items
previously
saved. When the user picks one I redirect them to a page with the selected
data loaded to begin processing. If they hit the back button (history) of
the
browser and try to revisit the item list page I want to show that it has
expired.
There should be no way for them to return to this page unless they logoff
and then back on.

If the page were not cached then the request would come to the server
and I could display a message. My problem is I put a response.expires =0
and I still got the cached page. Maybe I was using it wrong. I added it to
the top of the html page before the <head>. I also tried adding a
response.expires = 0 into the page load event with the same effect (none).

Hope that clears it up.

Thanks,
kpg


当他们访问页面时,输入一个变量在会议上表明他们已经存活了
。当他们回来时,会话将具有

值并且您可以显示相应的消息。

sayed

When they visit the page, put a variable on the session to indicate
that they have vitited. When they come back, the session will have the
value and you can display an appropriate message.
sayed


这篇关于页面到期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆