After accepting cookies, only a blank page is displayed
This problem is usually caused by an old Google Analytics script that contains the document.write command. The following script is the problematic embedding:
```html
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
```
Instead of document.write, you should use DOM-manipulation functions such as insertBefore and appendChild. The script would therefore need to be adapted and could then look something like this:
```html
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); var script = document.createElement('script'); script.src = gaJsHost + 'google-analytics.com/ga.js'; document.head.appendChild(script);
```
The code above replaces the original implementation using document.write by creating the script-element via document.createElement and inserting it into the DOM-tree using document.head.appendChild. After the code on the page has been replaced, the page should no longer turn white after cookies are accepted.
Similarly, other scripts that use document.write to embed scripts can be updated in the same way.