By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,873 Members | 1,040 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,873 IT Pros & Developers. It's quick & easy.

How to set when "Check for newer versions of stored pages" happens

P: n/a
In Internet Explorer under the tools/internet options menu on the general
tab, there is a settings button under Temporary internet files. In there the
user can specify when to "Check for newer versions of stored pages." I want
to make sure that my pages are refreshed every time they visit regardless of
this setting. Is there a way to do this? Thanks ... Ed

Feb 8 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi Ed,

You can try adding headers to your pages so that servers and browsers don't
store them, but there's no guarantee they'll honour this. Here's some code
to try:

Private Sub Page_Load _
(ByVal sender As System.Object, ByVal e As _
System.EventArgs) Handles MyBase.Load
Response.Expires = 0
Response.AddHeader("Pragma", "no-cache")
Response.AddHeader("cache-control", "no-store")
Response.ExpiresAbsolute = DateTime.Now.ToString
End Sub

Ken
Microsoft MVP [ASP.NET]

"Ed Staffin" <Ed*******@discussions.microsoft.com> wrote in message
news:D8**********************************@microsof t.com...
In Internet Explorer under the tools/internet options menu on the general
tab, there is a settings button under Temporary internet files. In there
the
user can specify when to "Check for newer versions of stored pages." I
want
to make sure that my pages are refreshed every time they visit regardless
of
this setting. Is there a way to do this? Thanks ... Ed

Feb 8 '06 #2

P: n/a
I'm also running into the same issue. I'm beta testing a product for a client
on our server. I'm using master pages in asp.net 2.0, and a menu control
populated from sql server. My first screen is a login screen. The user logs
in, which takes her to the default.aspx page. She visits a page on the site,
and then logs off. Then she (who is an admin) logs in as someone else.
Instead of taking her to the default.aspx page, it takes her back to the page
she last visited.

The only temporary solution that works is to have her change her IE settings
so that the browser checks for newer pages "Every visit to the page." I say
temporary because I really can't have her ask her users to change their
browser settings.

I've put your code in every Page_Load of the master pages, and
Page_LoadComplete of the default.aspx page and login.aspx page, but I'm still
having the same problem.

Is there anything else that you might know of that will help? This will be a
problem in every web project using asp.net 2.0!

"Ken Cox - Microsoft MVP" wrote:
Hi Ed,

You can try adding headers to your pages so that servers and browsers don't
store them, but there's no guarantee they'll honour this. Here's some code
to try:

Private Sub Page_Load _
(ByVal sender As System.Object, ByVal e As _
System.EventArgs) Handles MyBase.Load
Response.Expires = 0
Response.AddHeader("Pragma", "no-cache")
Response.AddHeader("cache-control", "no-store")
Response.ExpiresAbsolute = DateTime.Now.ToString
End Sub

Ken
Microsoft MVP [ASP.NET]

"Ed Staffin" <Ed*******@discussions.microsoft.com> wrote in message
news:D8**********************************@microsof t.com...
In Internet Explorer under the tools/internet options menu on the general
tab, there is a settings button under Temporary internet files. In there
the
user can specify when to "Check for newer versions of stored pages." I
want
to make sure that my pages are refreshed every time they visit regardless
of
this setting. Is there a way to do this? Thanks ... Ed


Apr 3 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.