Current location: Hot Scripts Forums » General Web Coding » JavaScript » Automatically refresh page after page load failure


Automatically refresh page after page load failure

Reply
  #1 (permalink)  
Old 01-19-04, 04:36 PM
jdugger jdugger is offline
New Member
 
Join Date: Jan 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Automatically refresh page after page load failure

Hi,

I've searched hi and low but haven't been able to find any discussion on this topic:

I have a webpage (implemented in php/javascript/html) that needs to refresh once every minute. I'm currently doing that using the http-equiv="refresh" content="60" metatag thing.

The problem is that every once in a while the page fails to load for one reason or another (this happens about 3-5 times per day), at which point the "Page cannot be found" page is displayed. When that happens, the refresh instruction is lost and the page stops refreshing until someone notices the problem and manually refreshes the page.

It's very important for this page to be able to automatically recover from this situation without human intervention. Is there any way, using javascript or otherwise, to make this happen?

Any creative ideas would be greatly appreciated.

Thanks,
Janice
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 08-05-10, 12:17 AM
hadumaster hadumaster is offline
New Member
 
Join Date: Aug 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
dude!

hey jdugger ,


It seems they're aren't many of is with this problem. I have the EXACT SAME issue! My hookup is similar to yours as well. My page only refreshes by manually entering it. It just happens to me 10X a day. at least!

I ahve theorized that the issue maybe out of my control, like a neighborhood issue. I live in Mill Basin, brooklyn, a very wealthy neighborhood, and we have one cable box. Everyone in my neighborhood has optimum. Just sucks if that really is the reason.

Last edited by hadumaster; 08-05-10 at 12:18 AM. Reason: wanted to change headline
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 08-05-10, 09:30 AM
job0107's Avatar
job0107 job0107 is offline
Community Liaison
 
Join Date: Dec 2006
Location: Tacoma, Washington USA
Posts: 3,454
Thanks: 0
Thanked 140 Times in 137 Posts
Can you explain why you need to refresh your page every 60 seconds?
There may be a better way to go about this if I understood the reasoning behind it.
__________________
Jerry Broughton
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 08-05-10, 10:16 AM
Yeronimo Yeronimo is offline
Newbie Coder
 
Join Date: Aug 2010
Location: Nijmegen, Netherlands
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Meta refresh can be blocked for many reasons. E.g. you situation with an error on page, browser settings etc.

Try use this javascript code to do the refresh. Obviously javascript needs to be enabled for this to work:

javascript Code:
  1. <script type="text/javascript">
  2. var t=null;
  3.  
  4. function refresh(sec){
  5.     t=setTimeout(function(){location.reload(true);}, (sec*1000) );
  6. }
  7. function init()
  8. {
  9.     refresh(60);
  10. }
  11. window.onload=init;
  12. </script>

Last edited by Yeronimo; 08-05-10 at 10:19 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Classified Ads skipper23 Perl 3 11-22-05 03:22 AM
Classified Ads skipper23 Perl 2 12-30-03 04:43 AM
How do I have a page automatically refesh ONLY ONCE! mysticonline JavaScript 3 12-23-03 05:49 AM


All times are GMT -5. The time now is 10:45 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.