>... Additionally, a typo in one page (i.e. invoking
>SharedWorker("mypagescript?", "name") instead of
>SharedWorker("mypagescript", "name") will keep all subsequent pages in that
>domain from loading a worker under that name so long as the original page
>resides in the page cache.

In this case, if typo one is invoked after a correct 
one, an URL_MISMATCH_ERR will be thrown in SharedWorker constructor algorithm 
step 5.4.2.
In the other hand, a 404 will terminate the algorithm and no SharedWorker is 
created and nothing will be add to global namespace.
I think this example won't be a serious problem anyway, though I'm not sure 
will this cause other problem or not.

>Use
>    new SharedWorker("url.js#name");
>and if you want a duplicate, call it
>    new SharedWorker("url.js#name2");

This remind me of something:

From sec4.8.3, SharedWorker constructor algorithm step 5.4.2:
If worker global scope's location attribute represents an absolute URL that is 
not *exactly equal* to the resulting absolute URL, then throw 
a URL_MISMATCH_ERR exception and abort all these steps.

Seems the #name part will break this line and throw a URL_MISMATCH_ERR with the 
duplicated #name2 one.
Shall we ignore minor difference between urls? e.g # fragments?

Reply via email to