title: Open html file in a new tab instead of downloading it
body: <p>For my Trac plugin, I have made an export script which converts contents to a different format. The result is an HTML code.</p>
  
  <p>When I click the link, some browsers open the HTML code in a new tab, while others offer to download it as a .print file, depending on their specific settings I think. Opening this .print file shows the same HTML page as opening it directly, but locally instead of from the server.</p>
  
  <p>How can I force it to always open in a new tab? <br>
  I think it might be a mimetype issue. If it is, which mimetype can I use to tell the browser to open the HTML code directly? I am currently using text/html as mimetype.</p>
  
  <p><strong>EDIT: some more info</strong><br>
  To give some more insight, adapting from a comment of mine below:<br>
  I do not create the link myself. The link is provided by Trac, the bug tracking software the plugin is for, and what I do is implement the method that creates the HTML code and let it return the HTML code along with the mimetype. Trac then returns the HTML code either as a file, or as a new tab, when clicking on that content conversion link. What I am searching for is a possibility to specify in the HTML code or mimetype that it gets opened in a new tab directly.<br></p>
  
  <ol>
  <li>Maybe there is some kind of mimetype specifying the (HTML) text as an HTML web document instead of HTML file (if that distinction even exists).</li>
  <li>Or an HTML/XML header or doctype specifying whether it gets downloaded or opened by a browser. I think the browser need to get that information from somewhere.</li>
  <li>Or maybe there is an option to set in Trac.</li>
  </ol>
  
  <p>I hope these ideas of mine about what <strong><em>could</em></strong> exist can help those of you who are versed with either or some of these to find a solution. I could not find a solution through my research yet.</p>