html - Use Javascript history.go() to the real "previous" page -


assuming have history this:

 - home  - page 1  - page 2 

js history.go(-1) works go page 1... if our current history is

 - home  - page 1  - page 2  - page 2 (2nd time)  - page 2 (3rd time)  - ...  - page 2 (nth time) 

how can use javascript history object go page 1?

the signature method history.go(number|url) (w3school). can use string parameter instead of number, , if (in manner) know url page2 can use it.

history.go("http://localhost/page2"); 

Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -