I\'m making an AJAX call to retrieve some plain text:
$.ajax({
url: \"programData.txt\",
type: \"GET\",
dataType: \"text\",
cache:
Firefox is trying to parse the file as HTML before it even hands it back to jQuery.
There are several reasons why it could be trying to do this. If, as Jaanus suggested, you are using a file:// or chrome:// URL then it doesn't have a MIME type and it assumes HTML. Or your HTTP server could be returning the wrong MIME type.
Starting in jQuery 1.5.1 there is a mimeType option to override the returned MIME type that Firefox sees. So you can do the following:
$.ajax({
mimeType: 'text/plain; charset=x-user-defined',
url: "programData.txt",
type: "GET",
dataType: "text",
cache: false,
success: processData
});
Doc on mimeType option is at http://api.jquery.com/jQuery.ajax/
And here is some background on what is going on at the Firefox level: https://developer.mozilla.org/En/XMLHttpRequest/Using_XMLHttpRequest#Receiving_binary_data