search

Home  >  Q&A  >  body text

Cookie permissions cause iframe error

I'm currently using a simple iframe in my webpage, using bootstrap to adapt to both small screens (=you tube Short) and large screens (=normal landscape videos):

<div class="container d-none d-md-block" style="max-width:1000px;height:30%;">

      <iframe width="1000" height="550"
        src="https://www.you tube-nocookie.com/embed/0...?&mute=1&autoplay=1&encrypted-media=1" allow="autoplay; fullscreen;">
    </iframe>

  </div>

  <div class="container .d-block d-md-none" style="width:95%;">

      <iframe width="400" height="500"
        src="https://www.you tube-nocookie.com/embed/G...?&mute=1&autoplay=1&encrypted-media=1" allow="autoplay; fullscreen;">
    </iframe>

  </div>

</div>

I have a warning/error message:

Permission Policy Header Error: Unrecognized function: "ch-ua-form factor".

After checking, it seems to be related to the screen size: https://wicg.github.io/ua-client-hints/

However, if I remove the class for the screen size, for example "d-none d-md-block", the same message still appears (probably due to the parent screen size configuration).

In addition to this, the error also occurs if I remove all iframe options and use www.you tube.com instead of www.you tube-nocookie.com.

how to solve this problem?

P粉447002127P粉447002127316 days ago627

reply all(1)I'll reply

  • P粉135799949

    P粉1357999492024-01-22 15:30:01

    I got the same warning on a page that contained an embedded YouTube video, I dug a little deeper into the situation, only to find out that it was actually coming from their side because the offending element was inside the embed. So I think the advice to ignore the warning is best to follow.

    reply
    0
  • Cancelreply