|  | |  |
02-10-2005, 05:59 PM
|
#1 (permalink)
| | Registered User
Join Date: Feb 2005
Posts: 2
| html code to refresh webpages when visited is there an html code that enables pages on my website refresh automatically when a visitor goes to specific pages on my site? It has to refresh just once...when the page loads. |
| |
02-10-2005, 06:24 PM
|
#2 (permalink)
| | Moderator
Join Date: May 2002 Location: us.ca
Posts: 4,532
| HTML Code: <META HTTP-EQUIV="Refresh" CONTENT="3;URL=mypage.html"> that would refresh your page 'mypage.html' every 3 seconds. you just want it to refresh once?
i don't understand you just want it to refresh once when the page loads. a page load is essentially a refresh anyway.
__________________ Mike |
| |
02-11-2005, 02:29 AM
|
#3 (permalink)
| | Registered User
Join Date: Feb 2005
Posts: 2
| what am i doing wrong? I placed this code on my page <META HTTP-EQUIV="Expires" CONTENT="0"> ...but for some reason it doesnt load up my updates on the page. am i doing something wrong? |
| |
02-20-2005, 05:11 AM
|
#4 (permalink)
| | PHP Pilgrim
Join Date: Aug 2004 Location: London
Posts: 170
| You mean you want something on the page to change dynamically upon a visit? Like what happens with a counter?
Well explain what exactly and we can further help. It sounds like you want something beyond HTML.
__________________ Davy - Programming since 1998 [CV] Currently working on: n/a Status: n/a |
| |
02-20-2005, 07:22 AM
|
#5 (permalink)
| | Senior Grasshopper
Join Date: Jun 2003 Location: FL
Posts: 317
| So the browser is caching the page for too long?
(wow, haven't seen DavH around here in awhile)
-r |
| |
03-05-2005, 10:05 AM
|
#6 (permalink)
| | Registered User
Join Date: Mar 2005
Posts: 1
| Copied from a tutorial I found on another website while looking for the same thing: Expiration
If you want to have your page "expire," here's how to set it: <META HTTP-EQUIV="expires" CONTENT="thu, 31 DEC 2002 00:04:00 EST">
What this means in the real world is that your visitors' browsers will use the cached version of your page, if available, until the specified date and time are reached, at which time the page will reload from the server the next time it's visited. To force your visitors' browsers to reload your page from the server (i.e. always use the most recent content) on every visit, use the following: <META HTTP-EQUIV="expires" CONTENT="0"> META Cache-Control
This tag keeps your page from being automatically cached by servers or browsers. AOL, for example, usually stores cached pages on its servers, which means that AOL users may view cached (i.e. old) copies of pages without being able to see the updated versions. Although caching pages speeds loading times, if your page is updated frequently, I suggest you use the no-cache tag to make sure your visitors always get the most recent version of your page: <META HTTP-EQUIV="Cache-Control" CONTENT ="no-cache">
The following tag works specifically on Netscape browsers: <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
What I think berg meant was indeed that he wants to prevent his visitors to use cache versions of his site, so that they always get the most recently updated versions of the pages.
There's also some javascript coding which according to another website is the preferred way, but I don't really see how these ways differ to the visitor, so perhaps that's just a matter of taste.
Then again, I'm not a real expert, I just play one on IRC  |
| |
02-19-2006, 09:31 PM
|
#7 (permalink)
| | Registered User
Join Date: Feb 2006
Posts: 1
| Netscape won't auto-refresh an image Quote: |
Originally Posted by Big_Bad_Wolf Copied from a tutorial I found on another website while looking for the same thing: Expiration
If you want to have your page "expire," here's how to set it: <META HTTP-EQUIV="expires" CONTENT="thu, 31 DEC 2002 00:04:00 EST">
What this means in the real world is that your visitors' browsers will use the cached version of your page, if available, until the specified date and time are reached, at which time the page will reload from the server the next time it's visited. To force your visitors' browsers to reload your page from the server (i.e. always use the most recent content) on every visit, use the following: <META HTTP-EQUIV="expires" CONTENT="0"> META Cache-Control
This tag keeps your page from being automatically cached by servers or browsers. AOL, for example, usually stores cached pages on its servers, which means that AOL users may view cached (i.e. old) copies of pages without being able to see the updated versions. Although caching pages speeds loading times, if your page is updated frequently, I suggest you use the no-cache tag to make sure your visitors always get the most recent version of your page: <META HTTP-EQUIV="Cache-Control" CONTENT ="no-cache">
The following tag works specifically on Netscape browsers: <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
What I think berg meant was indeed that he wants to prevent his visitors to use cache versions of his site, so that they always get the most recently updated versions of the pages.
There's also some javascript coding which according to another website is the preferred way, but I don't really see how these ways differ to the visitor, so perhaps that's just a matter of taste.
Then again, I'm not a real expert, I just play one on IRC  |
I've followed some of these instructions, but I'm pulling my hair out (what's left of it). There's a weather map on the top of my page that refreshes every 10 minutes. I want the latest version of that map displayed on my page, but with netscape, it only updates if I click "refresh". With Firefox and Explorer it seems to update fine. I inserted the following code, but to no avail:
<head>
<meta http-equiv="expires" content="0">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Pragma" content="no-cache">
The address of my page is: http://pweb.netcom.com/~krmidas/yyyweather.htm
Any suggestions?
-Tom |
| |
02-20-2006, 12:21 AM
|
#8 (permalink)
| | Moderator
Join Date: May 2002 Location: us.ca
Posts: 4,532
| i don't have netscape installed to try, .. but try setting the expires parameter to -1 instead of 0. HTML Code: <meta http-equiv="Expires" content="-1" /> are you using just html? or does your page support some type of server-side language also?
it's probably not good, but i don't even worry about netscape users anymore. |
| |
02-20-2006, 05:27 AM
|
#9 (permalink)
| | Senior Contributor
Join Date: Mar 2005
Posts: 746
| IMO http-equiv is mostly used for IE only and still does fail in IE 
if you have server-side scripting support like SDE says, you should think about using something like PHP PHP Code: <?php header('Cache-Control: private, pre-check=0, post-check=0, max-age=0'); header('Date: '.date('D, d M Y H:i:s \G\M\T', (time()-date('Z')))); |
| |
02-20-2006, 05:29 AM
|
#10 (permalink)
| | Senior Contributor
Join Date: Mar 2005
Posts: 746
| forgot to mention that i use Cache-Control: private
this prevents proxies from caching it but not on the client side |
| | | Thread Tools | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | |
Similar Threads | | Thread | Thread Starter | Forum | Replies | Last Post | | Cisco Code breaking | sde | Code Newbie News | 0 | 05-21-2004 08:10 AM | All times are GMT -8. The time now is 01:51 AM. |
Copyright © 2000-2008, Milano Interactive Web Hosting provided by Portal 360 Web Hosting |  | |