1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

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