mholt / PapaParse

Fast and powerful CSV (delimited text) parser that gracefully handles large files and malformed input
http://PapaParse.com
MIT License
12.55k stars 1.15k forks source link

What browsers is papaparse compatible with? #23

Closed dwschulze closed 10 years ago

dwschulze commented 10 years ago

I couldn't find anything about browser compatibility. My main concern is IE 8, but I also need to support more up-to-date versions of Firefox and Chrome.

Will papaparse work with IE 8?

mholt commented 10 years ago

Probably not IE 8... but it should work in the latest versions of all other major browsers: Chrome, Safari, Firefox, and Opera (technically still counts as a major browser I guess). If it doesn't, let me know. I've actually used it in Firefox and Chrome.

Actually, certain parts of Papa may work fine in IE 8. I highly doubt it will support the HTML5 FileReader API, so parsing files directly won't work, but I bet the actual Parse function inside Papa is at least close to working in IE 8.

You can load the test runner file (tests.html) in any browser to see if the core parser works in that browser.

If I get some time, I'll go through as many common browsers as I can to test Papa. Thanks for the heads-up. You're welcome to explore too and report back!

dwschulze commented 10 years ago

I'll check and report back to you on IE8.

Actually all I need to do with local csv files is read the first line to get the column headers. Some of these csv files could be large so is there a method to just read the first line?

mholt commented 10 years ago

Yup, try the preview setting: http://papaparse.com/docs.html#config

That will abort parsing after reading that many rows, whether the file is large or small. If you experience performance problems with large files, it may be because the browser is trying to load the whole file before sending it to Papa. In that case, use the step function.

mholt commented 10 years ago

@dwschulze Any word yet on IE8 compatibility?

mholt commented 10 years ago

@dwschulze Closing this issue unless it comes up again or more information surfaces. (I haven't had a chance to download old browsers and do tests.)

zialab commented 10 years ago

I tested in IE 8, Non of the test case is getting executed successfully. Even today many enterprises uses IE8, So, Papaparser support in IE8 is desirable.

mholt commented 10 years ago

@java-explorers Thanks for looking into it.

Man, I hate that though. Businesses need to update their software.

I don't have the time right now to download a VM and get it working in IE8. However, I'm able to help if you or anyone else would like to do it. (For example, if there's errors in the Console with a line number I could maybe provide some insight as to what to do to resolve it.)

As long as the compatibility fixes are simple and elegant, I'm willing to see them merged in. But I don't want any part of the code to start bending over backward to support dying browsers.

(In issue #84, it was pointed out that Array.prototype.indexOf needs to be shimmied in for IE8. This has not been done, but I'm not opposed to minifying that shim and sticking it in Papa Parse if that's all it takes to get it running on IE8.)

If you'd like to give it a shot, let me know and I'll reopen the issue! Thanks