2

As you know the coming version 91 of Chrome will require web sites to enable cross-origin isolation for sites using SharedArrayBuffers.

Following the advice of Google (https://web.dev/cross-origin-isolation-guide/?utm_source=wnc_20146204&utm_medium=gamma&utm_campaign=wnc_20146204&utm_content=msg_110404023&hl=en)

I have set the required headers: Cross-Origin-Opener-Policy: same-origin and Cross-Origin-Embedder-Policy: require-corp

But after that Google Adsense Ads don't show on my site. To be exact only an empty box appears where the Ad should be shown.

SharedArrayBuffers are not used by my own application but by third party libraries I don't have access to, so I can't avoid using SharedArrayBuffers.

In summary, if I don't enable Cross-origin isolation then my site will stop working in Chrome 91 and if enable it then Google ads won't show.

I have posted this issue in the Google Adsense community but I have got no answer. I hope someone can help me here with some suggestion.

Thanks!

Gabriel S
  • 83
  • 7

1 Answers1

0

If you are not using SharedArrayBuffer yourself and you have already identified the third-party resource provider who actually uses it, please ask them to fix the issue. You don't need to enable cross-origin isolation yourself unless using SharedArrayBuffer is essential for you.

In many cases the third-party usage of SharedArrayBuffer is trivial enough to ignore because the same code has been working on browsers that do not support SharedArrayBuffer in the past.

agektmr
  • 2,144
  • 15
  • 14
  • Thanks for your answer, but I haven't identified the third-party software making use of SharedArrayBuffer although I guess it could have to do with the use of WebGL. I will wait till the beta version of Chrome 91 and test it then in order to see the real impact in my web site. – Gabriel S Apr 02 '21 at 09:52
  • You can actually emulate the behavior in Chrome 91 by launching Chrome with a command line flag `--enable-features=RestrictSharedArrayBuffer`. Find how to apply it on different platforms here: https://www.chromium.org/developers/how-tos/run-chromium-with-flags – agektmr Apr 05 '21 at 00:46
  • Thanks, but restricting SharedArrayBuffer doesn't help me with my issue. The issue is that Chrome 91 will allow the use of SharedArrayBuffer but it will require cross-origin to be set. And what I was asking is why Google Ads stop showing when I set cross-origin isolation in my site. – Gabriel S Apr 06 '21 at 07:28