history.js icon indicating copy to clipboard operation
history.js copied to clipboard

History.isTraditionalAnchor does not work properly

Open igor-alexandrov opened this issue 12 years ago • 2 comments

Hello guys.

I have an issue with latest History.js 1.8b2. The problem is with URLs with params. For example if we push /catalog, then everything works find, but if we push /catalog?title=Apple' thenHistory.isTraditionalAnchorreturnsfalseand inHistory.getShortUrl ./` is not added to the start of the URL.

After this you got an URL like this http://192.168.0.7:3000/#catalog?brand=Cheetah instead of http://192.168.0.7:3000/#./catalog?brand=Cheetah. All seems to continue to work right, but URL is confusing.

In previous versions of History.js there was no History.isTraditionalAnchor. Why do we need it?

Thanks.

igor-alexandrov avatar Jul 07 '13 22:07 igor-alexandrov

The function isTraditionalAnchor, what is a traditional anchor? There is no technical term for that. The function appears to be looking to see if it is a fully qualified url (http://domain.com/path?) with / or . or ?

A traditional anchor would be a url with a # where you click and the browser jumps down to that point in the page. At least that is what I think, but I am not sure how you determine that with this function isTraditionalAnchor. I would think you would look for the #.

At any rate this is confusing

patrickliechty avatar Jul 15 '13 17:07 patrickliechty

Any news on this issue ?

adlq avatar Sep 21 '15 08:09 adlq