{{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);
Syntax
// Needs content
Parameters
None.
Return value
To be written
Example
To be written
// Needs example
Specifications
Specification | Status | Comment |
---|---|---|
{{SpecName('XMLHttpRequest', '#the-overrideMimeType()-method', 'overrideMimeType()')}} | {{Spec2('XMLHttpRequest')}} | WHATWG living standard |
Browser compatibility
{{CompatibilityTable}}
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | {{CompatChrome(1)}} | {{CompatUnknown}} | {{CompatIe('5')}}[1] {{CompatIe('7')}} |
{{CompatVersionUnknown}} | {{CompatSafari('1.2')}} |
Feature | Android | Chrome for Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Basic support | {{CompatUnknown}} | 1.0 | {{CompatVersionUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
[1] This feature was implemented via ActiveXObject(). Internet Explorer implements the standard XMLHttpRequest since version 7.