Base tag, IE and JavaScript

If you use the <base> tag, links in JavaScript (window.open for example) will ignore the <base> tag. The way around it is to make the link in the JavaScript relative to the domain.

<base href=”http://www.example.com/this_site/”>

The JavaScript should look like this.

window.open(‘/this_site/page2.html’);

There are no comments on this post.

Leave a Reply