Ajax Add to Browser History

Discussion in 'JavaScript' started by blueparukia, Mar 21, 2016.

  1. #1
    Hi all (first off, no jQuery, extremely small filesize limit)

    So I have a site that loads pages with Ajax with a fallback for those without Javascript.
    • What doesn't work is navigating with the forward and back buttons.
    • What I want to do is somewhat unique. I don't want the back button to trigger an event that pushes back to the last Ajax state.
    • I want the back button to hard redirect to the page beforehand
    Possible?

    Thanks
     
    blueparukia, Mar 21, 2016 IP
  2. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #2
    If you add to the url on ajax load, a back-button press will work normally, ie load the previous url content.
     
    PoPSiCLe, Mar 21, 2016 IP