SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict svcghost's Avatar
    Join Date
    Oct 2010
    Posts
    288
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    iFrame in HTML file works locally, but not on my server

    Hey guys,

    Is there any reason why an iFrame that displays a page with a youtube video on it would display properly if I view the html file locally on my computer (file:///Users/darinberkz/Desktop/index.html), but not when viewing the html file on my web server?


    This only seems to be the case for this youtube video right now, but google.com works in the iframe on both locally and the webserver.

    Thanks!

  2. #2
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,888
    Mentioned
    122 Post(s)
    Tagged
    1 Thread(s)
    Without seeing the page in question, it's difficult to guess at the answer - can you give us a link to the page on your server?

  3. #3
    SitePoint Addict svcghost's Avatar
    Join Date
    Oct 2010
    Posts
    288
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    it's a local webserver. sorry.

    the weird thing is youtube in an iframe works if the html file is viewed straight from your computer, the file itself, but it doesn't work when it's being hosted on a web server

    perhaps youtube, when viewed in iframe, checks the parent url to see if it's a real domain name, and then disallows viewing youtube in the iframe? but not if the url in the parent window is a file path?? weird..

  4. #4
    SitePoint Addict AtSea webdesign's Avatar
    Join Date
    May 2010
    Location
    Newark, Delaware
    Posts
    283
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    are you embedding it correctly?

    Does this page offer any insight?
    http://apiblog.youtube.com/2010/07/n...be-videos.html

  5. #5
    SitePoint Addict svcghost's Avatar
    Join Date
    Oct 2010
    Posts
    288
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    unfortunately the page is not helpful. I am not embedding a video only, but rather the entire web page. And the html files are identical on my web server and local machine. The local machine displays the site in the iframe properly, the web server html file displays a blank page. no idea why.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •