Browser does not remember position of page last viewed

后端 未结 4 715
南笙
南笙 2021-01-01 00:28

I have done a few searches for this issue and I have come up empty handed. I hope somebody can clarify things for me and point me in the right direction.

Pro

4条回答
  •  执念已碎
    2021-01-01 00:52

    If this is incredibly important, I'd suggest investigating the following:

    • add ids to each outgoing link
    • use JavaScript to capture the onClick for the links
    • when a link is clicked, redirect the user to that link's id fragment identifier, then link out as desired

    When the user hits the back button, they'll return to that specific link, e.g. http://www.example.com/#link27 instead of http://www.example.com/

    You may be able to get some ideas from here:

    • Stack Overflow: Is it possible to persist (without reloading) AJAX page state across BACK button clicks?
    • YUI Browser History Manager
    • Ajax Patterns: Unique URLs

提交回复
热议问题