All,

I ran into strange behavior involving wicket ajax updates + chrome + back
button. I am pretty sure the issue is not caused by wicket but I am hoping
the problem might sound familiar to someone and they can point me in the
right direction. The scenario goes like this:

- An ajax request is made that updates the DOM.
- The user navigates to another page by clicking on a link.
- The user uses the browser back button to go back to the original page.

After clicking back Google Chrome shows the page as it was originally
rendered (before the DOM update). All other browsers show the page as it was
when the user left the page (with the DOM update). Besides the possibility
of showing stale data the other problem is that the page state has been
altered by the ajax request and links that were originally rendered may no
longer be valid.

I found a few links where people are having similar issues:

http://www.maintaino.com/nuts-and-bolts/2010/04/08/teaching-chrome-not-to-cache-your-rails-pages/

Possibly related to using jQuery and/or window.onUnload() and "bfcache":

http://stackoverflow.com/questions/158319/cross-browser-onload-event-and-the-back-button
https://developer.mozilla.org/En/Using_Firefox_1.5_caching

In addition to using Wicket 1.4.12 I am also using jQuery 1.4.2 and google
analytics on these pages. I don't think any unload handlers have been added
however my only check was looking at all the attributes on the "window"
object via the inspector.

Has anyone else seen similar behavior? Even better, anyone else have a
solution? You may be seeing errors like this one in your logs:

org.apache.wicket.protocol.http.request.InvalidUrlException:
org.apache.wicket.WicketRuntimeException: component wid1:wid2:1:wid3 not
found on page com.foo.xxx


Thanks!

Ryan

Reply via email to