[Answered ]-Better way to embed external site into new tab page than iframe in a Chrome Extension?

2👍

You could inject the HTML in the new tab page’s DOM as in your first attempt, and add a <base href="http://your.site/frontpage/"> to the document’s <head> tag in order to resolve the relative resource URLs in your page correctly. I’ve tested it and dynamic creation of a <base> tag affects relative links as expected.

Alternatively you can just add the <base> tag to your actual front page’s HTML. It will still work when the page is loaded directly.

👤lanzz

Leave a comment