Results 1 to 5 of 5
Feb 27, 2011, 19:50 #1
iFrame in HTML file works locally, but not on my server
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.
Feb 28, 2011, 03:51 #2
- Join Date
- Mar 2006
- Yorkshire, UK
- 107 Post(s)
- 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?
Feb 28, 2011, 04:39 #3
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..
Feb 28, 2011, 10:45 #4
- Join Date
- May 2010
- Newark, Delaware
- 0 Post(s)
- 0 Thread(s)
are you embedding it correctly?
Does this page offer any insight?
Feb 28, 2011, 13:53 #5
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.