开发者

Controlling the behavior of the Browsers Back Button

We created an E-Newsletter for a client that includes lots of story links as well as banner adds. Th开发者_StackOverflow社区e majority of users are reading the newsletter in MS Outlook. The client thinks users will get confused when they click on a link from the newsletter and it opens in their browser and then the user can't hit the browser's back button in order to get back to the newsletter.

What are my options? Is it possible to control where the Browsers back button takes the user? I would guess not for security reasons.

If I have the newsletter links go through our main site and then redirect to the desired page (story or ad), can I do it in such a way that the back button will work and won't result in the user being redirected back to the redirect page?

Is there a better approach?


Overall, the back and forward buttons step the user through the history and for security reasons, there is very little you can do about that. But ...

You do have a certain amount of control over the history. In particular, page 1 can say "go to page 2", and once the user is on page 2, the back button will return the user to page 1 OR page 1 can say "replace me in history with page 2"; then once the user is on page 2, the back button will return the user whatever was before page 1, if anything. This is a good way to Orwell redirect pages right out of memory.

See here for details.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜