chrisvfritz / prerender-spa-plugin

Prerenders static HTML in a single-page application.
MIT License
7.31k stars 633 forks source link

on Safari and ios it doesn't always work #468

Open chengp97 opened 2 years ago

chengp97 commented 2 years ago

When I use the plugin to prerender the page of my vue project mobile app, I found that it runs normally on Android and Chrome browsers, but this pre-rendered page occasionally appears on Safari and iPhone. I have done a lot of attempts and explorations. But I still can't find out the problem. Now I put all the js at the bottom of the body, and added the following code at the end, the pre-rendered page is consistent, is there a better solution window.onload = function(){ const script2 = document.createElement('script'); script2.src = "/mspmk-cli-financechannel/js/app.6251bdbb.js" document.body.appendChild(script2);}