Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 946991 of XMLHttpRequest.overrideMimeType()

  • Revision slug: Web/API/XMLHttpRequest/overrideMimeType
  • Revision title: XMLHttpRequest.overrideMimeType()
  • Revision id: 946991
  • Created:
  • Creator: jsx
  • Is current revision? No
  • Comment XMLHttpRequest.overrideMimeType() first draft

Revision Content

{{draft}}{{APIRef('XMLHttpRequest')}}

The XMLHttpRequest.overrideMimeType() method overrides the MIME type returned by the server. This may be used, for example, to force a stream to be treated and parsed as text/xml, even if the server does not report it as such. This method must be called before send().

void overrideMimeType(DOMString mimetype);

Revision Source

<p>{{draft}}{{APIRef('XMLHttpRequest')}}</p>

<p>The <strong>XMLHttpRequest.overrideMimeType()</strong> method overrides the MIME type returned by the server. This may be used, for example, to force a stream to be treated and parsed as text/xml, even if the server does not report it as such. This method must be called before <code>send()</code>.</p>

<pre class="syntaxbox">
void overrideMimeType(DOMString <var>mimetype</var>);</pre>
Revert to this revision