In the actual development process, there are big pitfalls in the compatibility of mobile terminals. Android is OK, but ios is not, and ios is OK, and Android is invalid. In this way, the rollback operation of ios will not automatically refresh the page, which is very annoying. !
The common history.back() history.go(-1) are not effective in the ios system.
If you want to achieve the effect of real-time refresh, you only need to add the following js to the page you want to refresh:
$(function () {
var isPageHide = false;
window.addEventListener('pageshow', function () {
if (isPageHide) {
window.location.reload();
}
});
window.addEventListener('pagehide ', function () {
isPageHide = true;
});
})
The above is the detailed content of ios return does not automatically refresh the page problem. For more information, please follow other related articles on the PHP Chinese website!