Keep notifications from appearing on back btn

  • Cam

    Cam - 2012-01-06

    I've got a site where I'm hoping to use Pines Notify to display messages to
    the user. Some of these messages will be the result of ajax activities and
    will appear from time to time on the page. No problems here so far.

    Other messages will appear on page load - generally informing the user of the
    successful saving of their data after a page submit and/or location.replace()
    activity. I've used the ready() function to have the message added to the
    notification queue automatically on load, but can't seem to figure out a way
    to ONLY display it when the page is loaded the first time. In IE and Chrome it
    redisplays the ready() event added notifications on forward and back
    navigation through the history. I'd like to avoid displaying the notifications
    generated on the first page load on subsequent visits through the forward and
    back buttons.

    Any suggestions?

  • Hunter Perrin

    Hunter Perrin - 2012-03-14

    If the browser is storing the state of the DOM in the history and reverting it
    on Back button press, then there's not really anything that can be done.
    Unless possibly if you watched for a change in the history maybe... It's
    beyond the scope of the plugin anyway.

  • Anonymous - 2016-08-07
    Post awaiting moderation.


Cancel  Add attachments

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks