/    Sign up×
Community /Pin to ProfileBookmark

Backbutton problem with page forwarding

Hi all,

I a growing very frustrated with the following problem for which I cannot find a solution. Here is the scnario.

I have a webapplication that has an index page. So when I navigate to my application like <myapp> the index page fowards the request to <myapp>/page1.html.

Now if the user presses the back button on page1.html he/she is navigated to the index page which again will forward to page1.html which is not what we want. He/she should go back to the url they were at before accessing the webapplication.

I have tried to solve this issue with the history object amonget other things but nothing is working.

I really appreciate any feedback or help on this issue.

Cheers,
Justin

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@MrNobodyFeb 04.2009 — You're searching for a solution to something which isn't a problem -- except that it is not what you want. Sometimes you have to accept that what you are getting is what you are supposed to have. Further, JavaScript is given no real authority to intervene in these matters which are supposed to be under the control of the user. Trying to take such control away from the user is tantamount to a breach of security.

Finally, your index page got recorded in the browser history so it is natural for the browser to try and send you back there when the user presses the backspace key. Why have an index page if no user is supposed to land on it. Google would not like your setup either, and would lower your ranking in the search engine's results because of your hokey arrangement.
×

Success!

Help @justinblake spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.20,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...