devote/HTML5-History-API

history.location.pathname behavior not consistent between HTML5 and HTML4 fallback

luhn opened this issue · 4 comments

luhn commented

The base URL is the current page in the HTML5 implementation (as per the spec), but the domain root in HTML4 implementation.

For example, running this fiddle in Chrome 45 yields the expected output.

* /luhn/auth3x5q/show/
* /luhn/auth3x5q/show/rel/at/ive

But run it on IE9, and you get much different output:

* /
* /rel/at/ive

Changing the basepath resolves this inconsistencies.

luhn commented

Actually, changing the basepath then breaks absolute URLs.

basePath works similar HTML-element BASE. But I will think about your problem.

luhn commented

<base> only affects relative URLs, so the behavior shown in the last fiddle I linked is inconsistent with it.

<base> only affects relative URLs

Yes, you're absolutely right


I will think over this problem, when there will be free time. Thanks!

P.S. If you know how to fix, I'll be happy to consider your decision.