Martynas Bardauskas

Martynas Bardauskas

Web workers

Have you ever used Web Workers? If you haven’t, remember that there’s a limit for how many web workers you can use and each worker should be closed after it finished its code.

Me and my colleague came across a strange bug in IE10 using BlackAndWhite jQuery plugin - images would stop showing up if there are more than 25 on the page. Turns out, the script is using a Web Worker to convert images to grayscale and IE10 has a limit of 25 workers. Browsers do not close Web Workers automatically, plus IE10 has its own method for closing the worker thread.

See W3C standard and IE10 specification.aspx) for more details. Or just the see the commit we’ve proposed for BlackAndWhite plugin, it should contain all the information you need regarding this issue.