Wechat browser on iphone mobile phone, sometimes the window.onload event will not be triggered when the page is opened.

made an h5 page. When I opened the page in the Wechat browser of the iphone phone, I found that the window.onload event could be executed for the first time. When I quit and re-entered, the window.onload event would not be executed, and then I would exit and enter again. Execute

occasionally
Mar.10,2022

I guess. The reason for not executing may be that Wechat browser cached the rendered page and did not re-render the page when exiting and re-entering, so it did not execute window.onload
occasionally because the cache mechanism happened to clean up the page rendering cache after this exit, so re-rendered and executed onload

. The above

PS: is pure conjecture, providing an idea for the landlord.

Menu