-
Notifications
You must be signed in to change notification settings - Fork 752
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
how to avoid document.write from this code? #1849
Comments
i need help |
Don't worry about the document.write while in development. It won't be there once you deploy your project to the internet and are no longer using browser-sync (which is what Google cares about). The document.write is bad only because it prevents the web browser from loading all the code and styles for your page as fast as possible. In dev, that's fine. |
when i used this code on my site, then my site is very slow loading... |
Issue details
This code is working, but google pagespeed detect avoid document.write. I'm basically not experienced in JavaScript. I Need Help.
`<script>
//----------------------------Defaults
var ListBlogLink = window.location.hostname;
var ListCount = 5;
var TitleCount = 70;
var ListLabel = " ";
var ChrCount = 80;
var ImageSize = 100;
//----------------------------Function Start
function mbtlist(json) {
document.write('
');
");for (var i = 0; i < ListCount; i++) {
}
document.write("
}</script>`
` <script> ListBlogLink = "https://www.sebahotnews.org";
ListCount = 4;
TitleCount = 70;
ListLabel = "seba-top";
ChrCount = 150;
The text was updated successfully, but these errors were encountered: