Checking if worker support is available
Although web workers have been around for quite a long time and support is very strong, you still might want to check if web worker support is available in a client's browser (for example, Opera Mini doesn't support it). If it isn't, then just load the web worker file in the main script as well, and let your user feel the heat.
Web workers are available as a window
object, so that is pretty much all you have to check in order to get started:
if(typeof window.Worker !== "function") { // worker not available } else { // good to go }