0

I wonder something about Javascript. Does Javascript features or behaviors change by browsers?

While I was working Javascript XMLHttpRequest upload method, I noticed that Internet Explorer sending small bytes but Firefox and Google chrome sending big bytes. So while I was sending big data with Firefox or Chrome, server is giving OutOfMemory exception.

I am editing post with image details. enter image description here

enter image description here

barteloma
  • 6,403
  • 14
  • 79
  • 173
  • 1
    Yes they do. Actually most browsers support a close set of features but it is always IE which falls behinds and does not comply to standards. – Ibrahim Najjar Oct 12 '13 at 09:47
  • 1
    Can you elaborate on 'small bytes' and 'big bytes'. Never realized they came in sizes... Do you have some sample code that demostrate the behavior you describe? – rene Oct 12 '13 at 09:50
  • Are you asking for [javascript features](http://pointedears.de/scripts/test/es-matrix/) or [DOM features](http://stackoverflow.com/search?q=dom+incompatibilities) (of which `XMLHttpRequest` is part of)? Yes, both have very different browser support. – Bergi Oct 12 '13 at 14:04
  • I edited the post with images. Same XHR upload process event results are here – barteloma Oct 13 '13 at 07:13

2 Answers2

-1

No Javascript features doesn't change from browser to browser, it depends upon their Javascript rendering machine (interpreter is the difference).

For example:

  • Google - v8 engine
  • Safari - JavaScriptCore
Praveen
  • 55,303
  • 33
  • 133
  • 164
-1

yes there is some differences (a hanful actually)

here are some examples

1- accessing the float proparity

because float is a reserved keyword you can access it in ie with:

document.getElementById("id").style.styleFloat = "left"; 

while in fire fox it will be :

document.getElementById("id").style.cssFloat = "left";  

2-to access a class attribute you can do the following in ie :

document.getElementById("id").getAttribute("className");  

while in fire fox :

document.getElementById("id").getAttribute("class"); 

these are the things that i had an experience with . but mostly every one is using jquery now so no need to worry about those . but here are some articles about them

http://www.impressivewebs.com/7-javascript-differences-between-firefox-ie/

http://www.willowdesign.info/blog/tag/javascript-browser-differences/

JS cross browser inconsistencies/differences

http://technologypost.blogspot.com/2008/07/ie-vs-firefox-javascript-differences_05.html

Community
  • 1
  • 1
Hussein Nazzal
  • 2,557
  • 18
  • 35