Solved

Refreshin Screen

Posted on 2000-02-26
6
154 Views
Last Modified: 2010-05-18
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  
0
Comment
Question by:iowa1
6 Comments
 
LVL 1

Expert Comment

by:sysedco
ID: 2562336
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

0
 

Author Comment

by:iowa1
ID: 2563148
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
0
 
LVL 3

Expert Comment

by:messentary
ID: 2563726
sysedco has your answer, however, I would put a dummy date in the expires tag.  something like january 1, 1970.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Expert Comment

by:xyzffff
ID: 2568029
add
<%
Response.CacheControl = "no-cache"
%>
or
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
to your file.
0
 
LVL 1

Accepted Solution

by:
Assen earned 50 total points
ID: 2568251
Hi iowa1

Here you can see some examples:

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


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


<meta HTTP-EQUIV="Refresh" CONTENT="5; URL=index.html">


<meta HTTP-EQUIV="Expires" CONTENT="Tues 15 july 1999">

<meta HTTP-EQUIV="Refresh" CONTENT="5">

The 1 refreshes browser every time you visit; 2- simple no-cashe ; 3- refreshes after 5 sec with index.htm; 4- put the expire date; 5- it is like 3 but refreshes present page.

You can make some changes at (IE5):
Tools/InternetOptions/General/Settings

You can contact with your Administrator, he can make your page to expire on every visit.

Regards
0
 

Author Comment

by:iowa1
ID: 2578767
Thanks,  
   I have not had a chance to check the messages.  Sorry it took so long to reply.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now