Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Old 12-06-2005, 04:37 AM Auto Refress code
gps
Experienced Talker

Posts: 47
Location: Chandigarh
Trades: 0
Hi,

How to auto refress the web page? I mean when the user loads the web page on the browser it will not display the old contents but display the new contents for this what is the code.
gps is offline
Reply With Quote
View Public Profile Visit gps's homepage!
 
 
Register now for full access!
Old 12-06-2005, 05:17 AM
dotcomguy's Avatar
Skilled Talker

Posts: 89
Location: Manchester, UK
Trades: 0
<meta http-equi='refresh'>

this tag will pretty do what you need to do.

but you can get a javascript to do it as well.

Quote:
<script>
<!--

//enter refresh time in "minutes:seconds" Minutes should range from 0 to inifinity. Seconds should range from 0 to 59
var limit="0:30"

if (document.images){
var parselimit=limit.split(":")
parselimit=parselimit[0]*60+parselimit[1]*1
}
function beginrefresh(){
if (!document.images)
return
if (parselimit==1)
window.location.reload()
else{
parselimit-=1
curmin=Math.floor(parselimit/60)
cursec=parselimit%60
if (curmin!=0)
curtime=curmin+" minutes and "+cursec+" seconds left until page refresh!"
else
curtime=cursec+" seconds left until page refresh!"
window.status=curtime
setTimeout("beginrefresh()",1000)
}
}

window.onload=beginrefresh
//-->
</script>
Put the code in between your <HEAD> IE only, Check out your status bar as it counts down ;-)
__________________

Please login or register to view this content. Registration is FREE
from just $1.85 per post.

Last edited by dotcomguy; 12-06-2005 at 05:55 AM..
dotcomguy is offline
Reply With Quote
View Public Profile Visit dotcomguy's homepage!
 
Old 12-06-2005, 08:09 AM
ZpAz's Avatar
Junior Talker

Posts: 3
Location: The Netherlands
Trades: 0
You can change the .html or .htm extension to .php (if your server supports php). Because with php you will always see the newest page.
__________________
New around here:)
Hope i'll like it:)
ZpAz is offline
Reply With Quote
View Public Profile
 
Old 12-09-2005, 03:19 PM
Mooofasa's Avatar
Defies a Status

Posts: 1,611
Name: Michael (mik) Land
Location: England
Trades: 0
Quote:
Originally Posted by ZpAz
You can change the .html or .htm extension to .php (if your server supports php). Because with php you will always see the newest page.
Only if the user reloads the page manually, which would do the same job as meta and javascript. File extensions have nothing to do with content dating.
__________________

Please login or register to view this content. Registration is FREE
- Tumblog with thoughts, quotes, links, videos, images and my creations.

Please login or register to view this content. Registration is FREE
- The best free web browser.

Please login or register to view this content. Registration is FREE
- Firefox is now Firefail.
Mooofasa is offline
Reply With Quote
View Public Profile Visit Mooofasa's homepage!
 
Reply     « Reply to Auto Refress code
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.20556 seconds with 12 queries