Avoid document.write()

Posted in: Newspaper
Post count: 361

Since the new Google update in may there always appears the notice that you should avoid document.write() to embed code from third parties like AdSense. Document.write() is marked as a serious mistake. Do you know something about it?

Greetings Kathrin

Post count: 35449

Hi,

Indeed our theme is using document.write() for embedding html code, I will ask our developers abut this and it the can do something about it.

Thank you!

Post count: 361

Thank you!

Post count: 48

7 months and still nothing.

  • This reply was modified 5 years by rafael-l.
Post count: 361

You’re right 🙁

Post count: 48

I really believe that this document.write() is the main problem for the higher scores shwon in the Field Data and in the Origin Sumary fields in Page Speed Insigths.

My socres are good in the Lab Data, but not that good in those others and i do use Wp Rocket, Cloudflare Pro and the Automatic Platfrom Optimization from Cloudflare (APO): https://support.cloudflare.com/hc/en-us/articles/360049822312-Understanding-Automatic-Platform-Optimization-APO-with-WordPress

GTmetrix show that “for users on slow connections, external scripts dynamically injected via document.write() can delay page load by tens of seconds”.

So, i think that the theme need an urgent update, specially before may 2021, otherwise we gonna have to change the theme, and i do not want to do that because i like the Newspapper a very LOT.

  • This reply was modified 5 years by rafael-l.
  • This reply was modified 5 years by rafael-l.
Post count: 72

Please update

Post count: 72

document.write()

Please remove above code from theme from are waiting.

Thanks so much

Post count: 27
Post count: 48

@headline

Would be nice a post like that with images or with a video. But i will try here.
Thank’s

Post count: 48

Solution: https://headline.dev/tech/solved-how-to-fix-document-write-errors-in-wordpress-newspaper-theme/

That did not worked and i’m still waiting for the theme developers…

  • This reply was modified 5 years by rafael-l.
  • This reply was modified 5 years by rafael-l.
  • This reply was modified 5 years by rafael-l.
  • This reply was modified 5 years by rafael-l.
  • This reply was modified 5 years by rafael-l.
  • This reply was modified 5 years by rafael-l.
  • This reply was modified 5 years by rafael-l.
Post count: 28

Also voting for faster resolution here

Post count: 18283

Hello !

This issue is resolved and it will be fixed in the next update that comes in the next 1-2 weeks at most.

Thank you !

Post count: 405

We need more speed, performance in next update. Please ????????

Post count: 48

It is already more than 2 weeks since you posted this here, @Vlad-S.

Hope this big update can come this month at least. Thank’s

Post count: 46

It has taken ages for this update, and this time it is really important that we get it asap.

Post count: 18283

Hello !

The update was set to be released last week but we found some more issues to address. At the moment it is programmed to go out this mid week. We will keep you updated.

Thank you !

Post count: 90

Hey, Vlad, when you said mid-week, I halted migrating to another theme to wait for your update. What happened?

Post count: 18283

Hello !

Unfortunately we faced another delay, we are awaiting for the developers to give us the green light but they do want to sort out everything in order to be 100% sure that this update will go as smooth as possible.

We are sorry for the inconvenience !

Post count: 48

@vlad-s, i know to come here to DEMAND for an update, but i also know to congratulates and to thank’s for it. It is an awesome update.

Thank you very much!

Post count: 72
Post count: 27744

Hi,

I saw that on your website the document.write() comes from ads -> https://i.imgur.com/VEqbB7t.png
The page loading speed can depend on many factors, and each website is unique from this point of view. Let me explain some of these factors and maybe they give you some starting points for optimizing your website. A good choice for the page speed, could be the mobile layout which contains fewer elements because it can improve a bit your page speed.
There are many optimization guides provided by our users here in the forum, some made by us; you could check some of them
https://www.infophilic.com/get-almost-100-pagespeed-newspaper-theme/

https://forum.tagdiv.com/cache-plugin-install-and-configure/
https://forum.tagdiv.com/how-to-make-the-site-faster/
https://forum.tagdiv.com/topic/high-number-of-ajax-request/
https://forum.tagdiv.com/topic/score-100100-pagespeed-with-newspaper-wordpress-theme/
https://www.andraware.com/wp-rocket-for-newspaper-theme/
https://forum.tagdiv.com/topic/page-speed-guide-for-2023-beginners-and-advanced/
https://forum.tagdiv.com/topic/newspaper-theme-speedify-your-website/
https://forum.tagdiv.com/topic/tutorial-chriss-custom-optimizations-for-functions-php-etc/
https://forum.tagdiv.com/cloudflare-cdn/
https://forum.tagdiv.com/topic/theme-causing-high-cpu-usage-2/
https://forum.tagdiv.com/topic/sql-querys-high-cpu/
https://forum.tagdiv.com/topic/newspaper-theme-slow-to-respond/
https://premium.wpmudev.org/blog/optimizing-your-wordpress-database-a-complete-guide/
https://underconstructionpage.com/optimize-wordpress-database/
https://crunchify.com/better-optimize-wordpress-database-all-in-one-guide/
Also, pagespeed is not covered by support -> https://forum.tagdiv.com/newspaper-theme-support/

If you use Wp Rocket, you can try to exclude the following files
/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js
/jquery-migrate(.min)?.js
/wp-content/plugins/td-composer/legacy/Newspaper/js/tagdiv_theme.min.js
tdBlocksArray

To be able to optimize and to remove CLS and LCP please check these guide => https://developers.google.com/web/tools/lighthouse/ -> https://www.sqlpac.com/en/documents/google-pagespeeds-lighthouse-6-new-features-lcp-cls.html -> https://web.dev/lighthouse-whats-new-6.0/ -> https://web.dev/lcp/ -> https://web.dev/cls/

Thank you!

Viewing 22 posts - 1 through 22 (of 22 total)
You must be logged in to reply to this topic.