-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible performance impact of dynamic script injection #423
Comments
This is not really a problem. The boilerplate app should still work. |
@amilajack but why it report cross-origin error in mac os? |
It is because creating inserting a script dynamically at runtime is terrible for performance. Browsers want to be able to walk the DOM tree without having to evaluate JS to insert scripts that will pull in other scripts. |
@amilajack and how to do ? |
The message can be ignored. |
Reopening because I think this actually may have some noticeable performance. |
@amilajack thank you , solved! |
http://blog.dareboost.com/en/2016/09/avoid-using-document-write-scripts-injection/ Dynamic script injection will be disallowed in Chrome 54. We definitely need to migrate from this soon. |
I am already seeing errors from this using electron 1.4.3. Not sure when this happened but in my haste, I downgraded to electron 1.3.4 and my errors went away. Will have to slowly decrement down in electron versions from 1.4.3 to find the latest compatible version. I get the Parser-blocking error both in terminal and in console of electron app. |
Are they warnings or errors? I'm pretty sure they are warnings |
Last night there were errors that I assumed were related. After downgrading electron, I did a bit more work. I just updated to the latest electron again though and now I'm just getting the Parser-blocking warning. So perhaps the error was unrelated as I cannot reproduce now. |
Its probably caused by something else. The first two errors are just warnings |
I replaced The resulting output is the same and it gets rid of the errors. |
Made #604 for this. Would be great if you could review it just to confirm |
Fix #423, Dynamic Script Injection Warning
when i run nam run dev, and the app is running ,but it show error message like this
A Parser-blocking, cross-origin script, http://localhost:3000/dist/bundle.js, is invoked via document.write. This may be blocked by the browser if the device has poor network connectivity.
why? I use mac os 10.11.5, it cannot work,
and i use window, it ok,
how can i do??
The text was updated successfully, but these errors were encountered: