Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Zepto ignores XHR mimeType setting #572

BS-Harou opened this Issue · 5 comments

3 participants


Hi, Zepto completly ignores "mimeType" setting:

    url: 'fileWithWindows1250Encoding.html',
    mimeType: 'text/html;charset=Windows-1250',
    success: function(data) {

You can try using contentType instead of mimeType


No, that obviously doesn't work as "contentType" is supposed to set the request header and "mimeType" is supposed to change the received response header.


I misunderstood then.

You're just using it to correctly specify the encoding?


Yes I'm working on extension that does a bit of screen scrapping (so I can't change the behavior of the server). The site doesn't send charset parameter in content-type header - only in meta tag -> Widnows-1250. But because it is not in the header, browsers use fallback encoding (utf-8) and do wrong char mapping. Overriding mimeType fixes it.

@mislav mislav was assigned

We should probably support this, jQuery added this in 1.5.1.

@mislav mislav closed this issue from a commit
@mislav mislav Support `mimeType` Ajax option
Utilizes the native `XHR.overrideMimeType()` method to override the type
or content encoding of the response.

Fixes #572
@mislav mislav closed this in c18c4d7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.