From Can I use , the "history.pushState()" of Html5 Api cannot use on android browser < 4.2.
Is there alternative?
please let me know.. thanks.
Before pushState
came along, people used the fragment identifier of the URL ( location.hash
). Libraries exist that will give a common interface between using that and the history API.
Using a fragment id doesn't fallback to URLs that can be processed server side though, so I'd just fallback to the non-JS version on those devices. (Possibly adding a small recommendation to change browser).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.