1

Problem Statement In website there is an error popping up. If iframe has embedded youtube URL. Like below:

<iframe width="560" height="315" src="https://www.youtube.com/embed/GrHLNrXbOpk?loop=1&amp;playlist=GrHLNrXbOpk" frameborder="0"></iframe>

Error is: page is stopped rendering post iframe loads. That means rest of the section of the page like footer etc. is not showing up. And chrome developer tool has following warning message under network tab: enter image description here

Analysis and Findings: 1. This problem is present for all countries and all pages [where iframe has embedded youtube URL] but only in Live not in staging. That means same page is working in staging without any warning and error but not in live. 2. For staging, youtube request present under network tab showing ‘x-frame-option’ as ‘same origin’ but for live same request is showing error [request was cancelled] 3. For staging following iframe tag has been generated upon inspection using developer tool:

<iframe width="560" height="315" src="https://www.youtube.com/embed/GrHLNrXbOpk?loop=1&amp;playlist=GrHLNrXbOpk" frameborder="0"></iframe>

But for live following iframe tag has been generated:

<iframe width="560" height="315" src="https://www.youtube.com/embed/GrHLNrXbOpk?loop=1&amp;playlist=GrHLNrXbOpk&amp;**enablejsapi=1&amp;origin=https%3A%2F%2Fjp.medical.canon**" frameborder="0" data-gtm-yt-inspected-8017646_18="true" id="313798858" data-gtm-yt-inspected-8017646_35="true" data-gtm-yt-inspected-8017646_39="true" data-gtm-yt-inspected-8017646_40="true"></iframe>

The highlighted section is appending only in live though they are not part of content. 4. Interestingly if has been prepend with white space the video is loading properly in Live though warning messages are present. 5. In following youtube support page, it has mentioned ‘whitelisting of youtube URL has been required in firewall’ https://support.google.com/youtube/answer/171780?hl=en Info from youtube support page

Question

  • why problem is only present for live pages?
  • is youtube hostame need to whitelist in firewall?
2
  • Do you see any errors @ developer console in your browser? Are there any specific response headers added to your web server that is causing the above behavior?
    – Shiva
    Commented Oct 21, 2019 at 21:50
  • @Shiva: you are correct i can see the error in developer console of my browser. but i cannot see any specific response header. though i can see following extra parameters are getting added to youtube url in live. origin=https%3A%2F%2Fjp.medical.canon Commented Oct 22, 2019 at 6:31

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.