Bookmarks for sites after Ajax for the gate

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.

+3
source share
2 answers

As far as I know, such a solution is no longer integrated into the gates.

, , - ( ) ical-aggregator - commit http://repo.or.cz/w/ical-aggregator.git/commit/4cefb01eac230ac5dc776a13a8b751e1c17a4f00.

, , , .

+1

Source: https://habr.com/ru/post/1730478/


All Articles