Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-1193

tapestry.js prevents using the back/forward browser cache



      At the bottom of tapestry.js is the following:

      // Ajax code needs to know to do nothing after the window is unloaded.
      Event.observe(window, "beforeunload", function()
      Tapestry.windowUnloaded = true;

      Assume you have a page that does this:

      • loads in some initial state
      • user does something causing a ajax request that changes the DOM
      • user clicks a link to go to another page
      • user clicks back button

      rather than getting the state of the page before they left the user will get the original state of the page including the DOM and js state and the load handlers will be run. Using the hash method of maintaining ajax history (or maybe a cookie) is really not an option in this case because the DOM is out of date. You'd need to do an extra ajax request to the server to restore the state and the user experience would be really poor.

      There needs to be at least of the option of disabling this for pages that need this behavior.

      See http://stackoverflow.com/questions/158319/cross-browser-onload-event-and-the-back-button




            • Assignee:
              hlship Howard M. Lewis Ship
              hagios17 Dan Adams
            • Votes:
              0 Vote for this issue
              3 Start watching this issue


              • Created: