JS- on this page whether the user is listening clicked back into the (IOS return to the page when the page is not initialized)

The need for this, because I'll native APP nested in H5, H5 when the page back into the page, the page is not initialized, then IOS system. In this case there will be some corresponding pages BUG, ​​so the simplest solution I think is to monitor the page return event. refresh page

window.onpageshow=function(e){
	if(e.persisted) {
	window.location.reload()
	}
}; 

  

Guess you like

Origin www.cnblogs.com/liuqingxia/p/12167077.html