There is such a known problem that browsers do not place an Ajax request in the request history and do not create problems with the ability to bookmark, the forward / back button and update.
In addition, there is a general solution to this problem that adds the hash symbol # and some additional parameters to the URL using Javascript window.location.hash = ....
In this issue we offer a basic solution to this problem.
=> My question is that such a solution was integrated into Wicket, so that existing Wicket tools are used, and custom Javascript should not be added. If not, I would be wondering how this can be done.
Such a decision should answer the question of what should be put after the hash.
I like the idea that the bookmark URL that (in the case of non-Ajax) was in front of the hash could be placed behind it. For example, when you are on http://host/catalog
and reach the page, the http://host/product/xyzURL initiated by Ajax will be
http://host/catalog#/product/xyz.
Then it would be easy to write a handler onloadthat checks for the presence of # and redirects the URL after the hash.
source
share