Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
false positive in history management support detection #733
This issue has been known for a while but I haven't found a solid way to workaround it.
History API support used by modernizr and majority of routing frameworks does this:
This is fine on desktop browser, but for mobile browser, in particular android 2.2 - 4.0 and iOS 4, this leads to false positive, where they claim support for pushState, but has issue such as "location.pathname is not updated" or "address bar does not update"
This is an issue because we cannot provide a fallback (e.g. hashchange) as it is not reliably detected.
one might say "forget it and let mobile device do a full refresh", but for Web App this is quite critical as full page rendering slow down workflow, even if we assume client-side caching is working.
Hope someone can comment on this.
Yup, this is a pretty nasty bug that's difficult to detect (i don't know how you should detect the buggy behavior).
The biggest problem for me is window.location not giving the correct address (it never updates). This means writing a good router is difficult. For now, i don't know any other way to fix this than browser sniffing.