Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

124
Views
Is there a way to make an iframe YouTube browser?

I tried to make a YouTube video searcher using iframe but for some reason it doesn't seem to be loading.

Here's my code:

<!DOCTYPE html>
<html>
  <head>
    <httpProtocol>
      <customHeaders>
        <add name="X-Frame-Options" value="SAMEORIGIN" />
        <add name="Content-Security-Policy" value="frame-ancestors https://www.<preferredwebsitedomain>.com" />
      </customHeaders>
    </httpProtocol>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width">
    <title>Youtube Browser</title>
    <link href="style.css" rel="stylesheet" type="text/css" />
  </head>
  <body>
    <form action="http://www.youtube.com/results" method="get" target="iframe">
      <input id="search_query" type="text"/>
      <input type="submit"/>
    </form> 
    <iframe name="iframe"></iframe>
  </body>
</html>

Can someone please help me solve this issue?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

It seems you won't be able to :

"Refused to display 'https://www.youtube.com/' in a frame because it set 'X-Frame-Options' to 'sameorigin'."

The Youtube server X-Frame-Options only allows for sameorigin.

More info about that subject here

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!