title: What does empty href for html <base> tag means?
body: <p>Suppose my page URL is: <code>http://example.com/path/to/dir/index.html</code></p>
  
  <p>And I proxy this page via: <code>http://proxyserver.com/path/to/dir/index.html</code>.
  Similarly I want all relative URLs in page to be resolved by <code>proxyserver.com</code> instead of <code>example.com</code>. What should be the proper <code>&lt;base&gt;</code> href value?</p>
  
  <p>I want relative URLs on page like </p>
  
  <ul>
  <li><code>newfile.html</code> to resolve to <code>http://proxyserver.com/path/to/dir/newfile.html</code></li>
  <li><code>/newfile.html</code> to resolve to <code>http://proxyserver.com/newfile.html</code></li>
  <li><code>#hash</code> to resolve to <code>http://proxyserver.com/path/to/dir/file.html#hash</code></li>
  </ul>
  
  <p>Setting <code>&lt;base href="" /&gt;</code> in page does the job correctly but does it have some implication? Does it have different interpretation across browsers? What does empty <code>href</code> value actually mean? Will it work for all frameworks like angular?</p>
  
  <p>I have heard that <code>&lt;base&gt;</code> tag is mandatory for angular apps to initialize and hence removing <code>&lt;base&gt;</code> tag might not work.</p>
  
  <p><strong>NOTE: The website may already contain some <code>&lt;base&gt;</code> tag which I would always like to override.</strong></p>
  
  <p>I also tried <code>&lt;base href="/" /&gt;</code> but it will resolve relative URLs</p>
  
  <ul>
  <li><code>newfile.html</code> to <code>http://proxyserver.com/newfile.html</code>
  and </li>
  <li><code>#hash</code> to <code>http://proxyserver.com/#hash</code>
  which is wrong.</li>
  </ul>
  
  <p>Any help is highly appreciated.</p>