Link to home
Start Free TrialLog in
Avatar of iowa1
iowa1

asked on

Refreshin Screen

I have a site on my web hosts server.  I frequently make changes to the site because it is under construction.  When I make the changes on my computer localy, and then upload the changes to my server, I run into a "snag".  when I pull the page up, it looks the same as it did before the changes.  Of course, when I manually refresh the screen, everything is fine.  I am concerned about the returning visitors that will not know to refresh their screen Every time they visit. I want to make sure that they have not missed any updates.

How do I set up my site so that their browser knows when to update it's files?  I am thinking that someone out their is going to say using cookies.  If I do this, then I am concerned about the individual who has their cookie capability disabled.  Also, I need to learn how to use them too.


What should I do?


Thanks  
Avatar of sysedco
sysedco

Over 95 percent of the users will refresh automatically when they:

1) Restart their browser
2) Come to your site anew
3) Haven't been to your site for 24 hrs

If this is not good enough, you can prevent the browser from caching your page with this HTML code in the HEAD area:

<meta http-equiv="Expires" content="0">

This will force browsers to refresh on every visit to your page.

<meta http-equiv="Pragma" content="no-cache;>

This keeps the page from being cached at all.

These options should work well in over 98% of the browsers out there.

Tom Carpenter
http://www.sysedco.com
http://www.techrover.com

Avatar of iowa1

ASKER

I need a little more guidence.  I did a little experiment.  I deleted a file from the server.  I then fired up a new browser window.  I tried to acccess the file and it appeared, even though I deleted it from the server.  Once the browser was refreshed, everything was fine.  So what this showed was that The browser did not show the changes, even though I restarted my browser.

Why is it that the browser will show the correct page after 24 hours?  I have not tried it that way, and I want to be ceartin that the browser is refreshed for the customer at least every 24 hours.  Can I be assured that this will definitely happen like you say?  I don't want the browser to stop caching every time due to the time it may take the page to load.


Thanks


Give some more feedback please, and I will give you the question
sysedco has your answer, however, I would put a dummy date in the expires tag.  something like january 1, 1970.
add
<%
Response.CacheControl = "no-cache"
%>
or
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
to your file.
ASKER CERTIFIED SOLUTION
Avatar of Assen
Assen

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of iowa1

ASKER

Thanks,  
   I have not had a chance to check the messages.  Sorry it took so long to reply.