Prevent exception in worker messaging if page hidden
Generate keys in web worker