473,378 Members | 1,395 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

How to Reload a page when it is redirected by browser's back or foward button?

I would like to reload the page when it is redirected by the browser's Back or Forward button.

I tried the following but it does not works.

<link rel="prev" href="url">
<link rel="next" href="url">

Can anyone help me..

Sadiq
Feb 24 '07 #1
10 3676
I would like to reload the page when it is redirected by the browser's Back or Forward button.

Can anyone help me..

Sadiq
Feb 25 '07 #2
I would like to do the following..

Clicking Back button should redirect to the new page and not previous one-How to Code

For example,

say we are in TEST1.HTML. By clicking a link on it we are going to TEST2.HTML. Now we are in TEST2.HTML. Now what i need is if i click the browser's back button it should redirect to TEST3.HTML and not TEST2.HTML. How to code for this.

Can anyone help me..

Sadiq..
Feb 25 '07 #3
pronerd
392 Expert 256MB
I would like to do the following..

Clicking Back button should redirect to the new page and not previous one-How to Code

For example,

say we are in TEST1.HTML. By clicking a link on it we are going to TEST2.HTML. Now we are in TEST2.HTML. Now what i need is if i click the browser's back button it should redirect to TEST3.HTML and not TEST2.HTML. How to code for this.

Can anyone help me..

Sadiq..
You can not do this with JavaScript. You will need a server side language using a controller model to do this.
I
Feb 26 '07 #4
pronerd
392 Expert 256MB
I would like to reload the page when it is redirected by the browser's Back or Forward button.

Can anyone help me..

Sadiq
You can not do this with JavaScript. You will need server side logic to do this.
Feb 26 '07 #5
dmjpro
2,476 2GB
yes he is right ...

generally when the page displayed using back or forward button then browser loads it from history

jsut add some unique element on ur page so that u can trap whether the back or forward button clicked ..

then on that condition u can reload ur page conditionally ....
Feb 26 '07 #6
dmjpro
2,476 2GB
u also answered before in a forum ....

plz tell me logic in details ......

thanx in advance
Feb 26 '07 #7
acoder
16,027 Expert Mod 8TB
Threads merged. Please do not double post.
Feb 27 '07 #8
acoder
16,027 Expert Mod 8TB
Another thread merged!
Feb 27 '07 #9
Thanks for your ideas.

I am new to javascript

please give some code examples to trap whether the back or forward button is clicked..

I need some more help from you


I NEED TO KNOW HOW TO REFRESH THE PAGE AUTOMATICALLY AFTER FEW SECONDS.


Thanks in advance..
Mar 10 '07 #10
acoder
16,027 Expert Mod 8TB
I NEED TO KNOW HOW TO REFRESH THE PAGE AUTOMATICALLY AFTER FEW SECONDS.
Try
Expand|Select|Wrap|Line Numbers
  1. window.location.reload()
Mar 12 '07 #11

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Ray Torres | last post by:
I would appreciate any help with the following problem. I have several different htm pages with (simalar) forms that are processed by the same PHP script. If there is data missing on the form,...
1
by: Bob Bedford | last post by:
When I click on the Back button of the browser I've to reload pages. How to avoid this ? The code worked fine before, no need to push the refresh button of the browser. BoB
2
by: Leszek Taratuta | last post by:
Hello, I am using the following code to prevent users to see the previous pages: Response.CacheControl = "no-cache"; Response.AddHeader( "Pragma", "no-cache" ); Response.Expires = -1; When...
8
by: sun | last post by:
I want to do clean up routine to my database when the browser is closed. I have my code in session-end - but it never fires when the browser closes. I cant do onbeforeunload as it will be fired...
1
by: Terry Olsen | last post by:
Is there any way to disable the client browser "Back" and "Forward" buttons while on my site? Or how would I go about knowing that a page hit is caused by a back/forward navigation? I have...
3
by: Rosanne | last post by:
Is there a way to clear the SelectedIndex of a listbox when the browser's back button is clicked? I have a page that contains a server side list box with AutoPostBack = True. When the user...
1
by: kaushalmbhavsar | last post by:
Hi I have couple of pages that maintain some stateful information and i need to detect browser back/refresh button press and loged out user. Is there a simple mechanims in .NET (specially in...
8
by: wish | last post by:
Dear all, I would to ask that why the user always faced the different page when user click the back button instead back to page2.php but it go to page5.php..I remember in asp, we use the...
1
by: Rob | last post by:
I know this is an old one, considering how many posts I found on it but I just wondered if any best practises had popped up recently, especially as Ajax has increased JavaScript and DHTML's...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.