How can I find out which method is best for a situation? Can anybody provide some examples to know the difference in terms of functionality and performance?
Old post. but still want to answer,one difference that I faced while working with Web Workers(javascript)
web workers can’t have any UI-level access. That means you can’t access any DOM elements in the JavaScript code that you intend to run using web workers.Objects such as window, document, and parent can’t be accessed in the web-worker code.
As we know jQuery library is tied to the HTML DOM, and allowing it would violate the “no DOM access” rule. This can be a little painful because methods such as jQuery.ajax, jQuery.post, jQuery.get can’t be used in web workers. Luckily, you can use the XMLHttpRequest object to make Ajax requests.