Current location: Hot Scripts Forums » General Web Coding » HTML/XHTML/XML » http-equiv="Refresh" & pressing browser Back button


http-equiv="Refresh" & pressing browser Back button

Reply
  #1 (permalink)  
Old 07-04-07, 02:59 PM
silvercover's Avatar
silvercover silvercover is offline
Wannabe Coder
 
Join Date: Aug 2004
Posts: 112
Thanks: 0
Thanked 0 Times in 0 Posts
http-equiv="Refresh" & pressing browser Back button

Hi there,

i use <meta http-equiv="Refresh"... in my page to reload it every n seconds. but when user click a link on this page and goes to other page and then press browser back button, auto reload does not function properly or better to say it stops! and that page never get refreshed again.

Here i want to ask for a solution to fix this problem?

Thank you.
Reply With Quote
  #2 (permalink)  
Old 07-05-07, 12:36 AM
dannyguk dannyguk is offline
Newbie Coder
 
Join Date: Jul 2007
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by silvercover View Post
Hi there,

i use <meta http-equiv="Refresh"... in my page to reload it every n seconds. but when user click a link on this page and goes to other page and then press browser back button, auto reload does not function properly or better to say it stops! and that page never get refreshed again.

Here i want to ask for a solution to fix this problem?

Thank you.

You can put this on your page 10000 means 10 seconds


javascript Code:
  1. <script>
  2. setTimeout("history.go(0);",10000);
  3. </script>

Last edited by UnrealEd; 07-08-07 at 12:11 PM. Reason: Please use [highlight=javascript] tags when posting JS code!
Reply With Quote
  #3 (permalink)  
Old 07-08-07, 10:20 AM
sushi4664's Avatar
sushi4664 sushi4664 is offline
Aspiring Coder
 
Join Date: Apr 2007
Location: USA
Posts: 411
Thanks: 0
Thanked 0 Times in 0 Posts
but there is a disadvantage to that...javascript will need to be enabled on that machine...
__________________
- sushi
Visit http://napkinz.com/index.php - web comic that is update weekly

-ps: got through the archive...there are really funny comics in there....
Reply With Quote
  #4 (permalink)  
Old 07-08-07, 12:40 PM
silvercover's Avatar
silvercover silvercover is offline
Wannabe Coder
 
Join Date: Aug 2004
Posts: 112
Thanks: 0
Thanked 0 Times in 0 Posts
@ dannyguk

Should i put that code in the same page with <meta http_equiv... or in the other pages?
Reply With Quote
  #5 (permalink)  
Old 07-08-07, 01:15 PM
dannyguk dannyguk is offline
Newbie Coder
 
Join Date: Jul 2007
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by silvercover View Post
@ dannyguk

Should i put that code in the same page with <meta http_equiv... or in the other pages?
Place the code in the <body> of the page you would like the reload dont place any other code to reload the page or it will not work.
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
browser back button issue! n3wb!e PHP 13 03-01-07 06:55 AM
How 2 Open a New Browser Window & Click a Submit Button Wildhalf JavaScript 3 12-08-06 03:34 PM
how to disable browser's back button after logout shaky ASP 7 08-18-06 07:37 AM
Replace Back Button eddyvlad JavaScript 1 07-28-06 01:12 AM
Using the Back Button and the Close Button mdgibson Hot Scripts Forum Questions, Suggestions and Feedback 1 09-29-05 12:41 AM


All times are GMT -5. The time now is 08:57 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.