Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Generally for a javascript application, compatibility is mentioned in terms of browser types and browser versions it supports.

Frameworks/Libraries like ExtJs also mention about the browser versions they are compatible with.

Does this mean that if my javascript application can run on Google Chrome 10+ version, then any operating system where Google Chrome 10+ can be installed will be able to run my javascript application without any glitches?

Or does type of operating system also have an effect on Javascript execution?

The reason behind asking this is to evaluate the scope of testing of javascript applications before making any commitment to the end user.

Thanks in advance for any guidance provided.

share|improve this question

3 Answers 3

In theory, yes, everything should work fine. In reality, no. The differences should be relatively minor, but they do exist.

As an example, a few years ago I found that some code of mine worked on Safari for windows but not for Mac.

Guidance? Test everything and then test again! Don't trust emulators either. Test on the actual hardware.

share|improve this answer
1  
In theory there is no difference between theory and practice. In practice, there is. :-) –  Carson63000 May 28 '13 at 23:58
    
@LachlanB: Thanks for the post. As mentioned by you - "The differences should be relatively minor", so if they are minor then also would you advise to - "Test everything and then test again! Don't trust emulators either. Test on the actual hardware"? –  Vivek May 29 '13 at 12:12
    
Note I said should. Always test. –  LachlanB May 29 '13 at 14:32

The general environment where JavaScript code is executed is JavaScript engine of your browser.

Nowadays (unlike the first years of JavaScript, where things were not as standardized as it is today) has a standard established by the Ecma International, so the developers are trying to follow this standard. In theory, all browsers covering specific version of the specification should behave in the same way!

But things are not so great when you use external libraries. You probably noticed that in most cases, these libraries have a dependency! They are often depend from the implementation of different technologies such as CSS3, HTML5, etc.

For example, you want to achieve fadeIn effect with jQuery. How it works? For a short period of time, opacity property for specific element is changed - dependency of CSS3's opacity property.

It's the same with some of HTML5 features, they still do not work well enough in all browsers, but here again no problems come from the JavaScript engine, and from the way different HTML5 APIs are implemented in browsers.

share|improve this answer
    
Your answer did not address the question (scroll up and read the title / boldfaced text). –  Rob W May 28 '13 at 14:41
    
@Kristian: Thanks Kristian, but then how does OS comes into picture here? –  Vivek May 29 '13 at 12:13

Since the browsers come with their own JavaScript engine, on first sight it should be sufficient to test browsers only. But some functions have to communicate with the underlying operating system (File API comes to mind), so there is a dependency, which requires OS specific testing.

share|improve this answer
    
Thanks Nibra, so if we exclude such APIs which have a dependency on OS, then can we say for the remaining things to be independent of OS & depend only upon the browser? –  Vivek May 29 '13 at 12:14
    
Yes, if you can identify those APIs for sure. –  nibra May 29 '13 at 13:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.