views:

26

answers:

1

In this thread user named Pekka gave me an advice to open external sites in a new window and provide a "return to site" link which would call "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?

Thanks in advance for your answers, Michael

+2  A: 

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.

Sohnee
I'm afraid that the first option would have the same effect as my original idea (loading external sites into an iframe) - right? As for the second one, it would be cool to have it already written - if there's nothing like that ready in the Internet, I think that the amount of work would surpass the result. Do you know about any scripts that could do it?
kremuwa
@kremuwa - what server-side language would you want it in?
Sohnee