Can't show some websites in iframe tag

后端 未结 4 1233
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-03 03:35

I am trying to develop a page in which I can show more than 3 website at a time, as below:

4条回答
  •  没有蜡笔的小新
    2020-12-03 04:15

    Since some websites have decided to disable embedding them in iframes theres nothing you can do with pure html solutions. You could create a serverside script (in PHP) that pulls the target site via your webserver and then use the html etc.

    The only way I can think of that would enable you to check wether the site has loaded is to search the iframe for a specific element that exists on the target website (for example a div with a specific id or class on the Facebook's front page). The reason would be that different websites can handle being embedded into iframes differently and while some might display some content, some may display nothing etc and the only way to be sure is to check for real elements.

提交回复
热议问题