Google Seo propose | Community
Skip to main content

Google Seo propose

  • May 28, 2021
  • 2 replies
  • 0 views

Avoid document.write() #

Remove all uses of document.write() in your code. If it's being used to inject third-party scripts, try using asynchronous loading instead.

If third-party code is using document.write(), ask the provider to support asynchronous loading.

2 replies

Dave12
  • May 28, 2021

Hi 王珺,

As far as I know, only the Legacy Chat widget uses document.write() – If you switch to the integrated chat Web Widget experience this doesn’t use document.write anymore. See our product manager Daniel Anon's comments here: comment on document.write()


  • June 28, 2021

10216504226336695108 We are currently using the new widget on our website (https://www.do-grass.com/nl-be/) and are still seeing warnings that `document.write()` is being used. It has a serious impact on the Total Blocking Time metric that currently accounts for 30% of the total performance score indicator (https://web.dev/performance-scoring/?utm_source=lighthouse&utm_medium=unknown#lighthouse-8)

From the Lighthouse performance report:

Is there anything we can change to avoid this?

Thanks in advance!