Assigning a page (that I do not own) a different name when the link is clicked (or when opened)

11 Views Asked by At

I was wondering if it was possible to have a script open a new tab to a page (that isn't owned by me), and have the head of the page be different from the original. If so, could you also add a new thumbnail for the tab? I found a few answers from around the web, but none of them worked. Help would be much appreciated. Thanks in advance!

1

There are 1 best solutions below

4
On

Well, you can't really modify something that doesn't belong to you. So no, there's no way to send the user to another page than yours, and apply some modifications there.

BUT, there could be a way with iframes. iframes are a (old ?) way of embedding other HTML documents in one single page. Therefor, while the end user is still on your page, you can load the page that doesn't belong to you in the iframe so the end user sees it. Since he is still on your page, you have full access on the title and other elements. Was this the kind of answer you were looking for ?

Edit

Please disregard my answer.

Like user @rocket-hazmat mentioned, there is an origin policy issue to be handled with iframes. If you know the person behind the page you wish to point to (or load), then you might be able to workout something with him. Or else, iframes won't work (XSS protection).