Zepto ignores XHR mimeType setting #572

martinkadlec0 opened this Issue Aug 27, 2012 · 5 comments


None yet
3 participants

Hi, Zepto completly ignores "mimeType" setting:

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

mislav commented Aug 28, 2012

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.


mislav commented Aug 28, 2012

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.

@ghost ghost assigned mislav Nov 24, 2013


madrobby commented Nov 24, 2013

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

@mislav mislav closed this in c18c4d7 Nov 25, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment