Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How to set when "Check for newer versions of stored pages" happens

Reply
Thread Tools

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

 
 
=?Utf-8?B?RWQgU3RhZmZpbg==?=
Guest
Posts: n/a
 
      02-08-2006
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

 
Reply With Quote
 
 
 
 
Ken Cox - Microsoft MVP
Guest
Posts: n/a
 
      02-08-2006
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" <(E-Mail Removed)> wrote in message
news(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
 
 
 
=?Utf-8?B?UmljaGFyZA==?=
Guest
Posts: n/a
 
      04-03-2006
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" <(E-Mail Removed)> wrote in message
> news(E-Mail Removed)...
> > 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
> >

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there anyway Vpython and pyODE can be made to work with newer versions of Python 2.6.1 etc. without a lot of changes to source code? Casey Hawthorne Python 1 01-24-2009 09:27 PM
Newer versions of Hpricot issue a warning. bbiker Ruby 1 12-28-2006 06:10 AM
What happens when type conversion between signed and unsigned happens? NM C++ 6 09-20-2006 05:39 PM
Norton Antivirus 8.1 Corporate versus newer versions like Norton 2005? aroma@metisoft.com Computer Security 3 07-26-2005 01:07 AM
newer versions of header files Glenn M C++ 1 05-05-2004 03:27 PM



Advertisments