开发者

Opening external websites with a top bar containing "return to site" link

This thread shows how to open external sites in a new window and provide a "return to site" link which would call the windows.close() function. The problem is, that I don't know how to do such a "top bar" or something else containing the link on开发者_运维问答 the site I open. Should I open the external site and write to its source? I know that for example sites providing proxies use such top structures. But how do they do it?


There are a few options here... these are the top two suggestions I have.

Option 1, a kind of frame

You essentially load up a page that contains your header, and a big iframe that contains the other site. This is really easy to do, but if they have a "framebuster" script, it might get rid of your header when the page loads.

Option 2, server side proxy

Another option would be to get their HTML using a server side language, and modify it to include your top bar... it's a lot more work, but it will prevent framebusters from breaking out of your top bar.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜