-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
livereload injection should not use document.write #6507
Comments
No issues on browsers on Ubuntu 19.10. Loading The linked article references issues with slow networks and document.write being disabled on slow network connections. I don't see how the use of livereload is something that can end up on a slow connection? |
The warning message given by the browser is very minimalist and doesn't do much beside what is in the screen capture above. The articles don't really help either, and local connection seems pretty much the opposite of slow 🤔 May be the Chrome team is expanding its This is the kind of ticket I could close saying "works on my setup, closing", but at least it may serve as reference if someone encounters the same problem 😄 |
I wouldn't close it, but do you use a configuration other than localhost:1313? maybe a local ip address or a local hostname that is configured via /etc/hosts? |
@davidsneighbour I'm updating the issue, there were problems due to my hugo site configuration. However, if Chrome doesn't block the script, it still shows a warning on MacOS version 78.0.3904.97. My apologies for the badly reported problem. |
We have all of the information ready at build time (static), so I see no reason to use document.write or other client side techniques. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
What version of Hugo are you using (
hugo version
)?Does this issue reproduce with the latest release?
Yes
My setup
This seems to affect at least Chrome MacOS v78.0.3904.97, I have not tested other configurations.
Description of the problem
In 2016, Google had written an article called "Intervening against
document.write()
".
Unfortunately, Hugo livereload uses this function, and warnings are being shown in Chrome .
Possible solutions
As stated in the Google article:
Any of these workarounds would be rather easy to add to the injection code.
The text was updated successfully, but these errors were encountered: