&gt;...&nbsp;Additionally,&nbsp;a&nbsp;typo&nbsp;in&nbsp;one&nbsp;page&nbsp;(i.e.&nbsp;invoking<br>&gt;SharedWorker("mypagescript?",&nbsp;"name")&nbsp;instead&nbsp;of<br>&gt;SharedWorker("mypagescript",&nbsp;"name")&nbsp;will&nbsp;keep&nbsp;all&nbsp;subsequent&nbsp;pages&nbsp;in&nbsp;that<br>&gt;domain&nbsp;from&nbsp;loading&nbsp;a&nbsp;worker&nbsp;under&nbsp;that&nbsp;name&nbsp;so&nbsp;long&nbsp;as&nbsp;the&nbsp;original&nbsp;page<br>&gt;resides&nbsp;in&nbsp;the&nbsp;page&nbsp;cache.<br><br>In&nbsp;this&nbsp;case,&nbsp;if&nbsp;typo&nbsp;one&nbsp;is&nbsp;invoked&nbsp;after&nbsp;a&nbsp;correct&nbsp;one, an URL_MISMATCH_ERR will&nbsp;be&nbsp;thrown&nbsp;in&nbsp;SharedWorker&nbsp;constructor&nbsp;algorithm&nbsp;step&nbsp;5.4.2.<br>In&nbsp;the&nbsp;other&nbsp;hand,&nbsp;a&nbsp;404&nbsp;will&nbsp;terminate&nbsp;the&nbsp;algorithm&nbsp;and&nbsp;no&nbsp;SharedWorker&nbsp;is&nbsp;created&nbsp;and&nbsp;nothing&nbsp;will&nbsp;be&nbsp;add&nbsp;to&nbsp;global&nbsp;namespace.<br>I&nbsp;think&nbsp;this&nbsp;example&nbsp;won't&nbsp;be&nbsp;a&nbsp;serious&nbsp;problem&nbsp;anyway,&nbsp;though&nbsp;I'm&nbsp;not&nbsp;sure&nbsp;will&nbsp;this&nbsp;cause&nbsp;other&nbsp;problem&nbsp;or&nbsp;not.<br><br>&gt;Use<br>&gt;&nbsp; &nbsp; new&nbsp;SharedWorker("url.js#name");<br>&gt;and&nbsp;if&nbsp;you&nbsp;want&nbsp;a&nbsp;duplicate,&nbsp;call&nbsp;it<br>&gt;&nbsp; &nbsp; new&nbsp;SharedWorker("url.js#name2");<br><br>This&nbsp;remind&nbsp;me&nbsp;of&nbsp;something:<br><br>From&nbsp;sec4.8.3,&nbsp;SharedWorker&nbsp;constructor&nbsp;algorithm&nbsp;step&nbsp;5.4.2:<br>If worker&nbsp;global&nbsp;scope's location attribute&nbsp;represents&nbsp;an absolute&nbsp;URL that&nbsp;is&nbsp;not&nbsp;*exactly&nbsp;equal*&nbsp;to&nbsp;the&nbsp;resulting absolute&nbsp;URL,&nbsp;then&nbsp;throw&nbsp;a URL_MISMATCH_ERR exception&nbsp;and&nbsp;abort&nbsp;all&nbsp;these&nbsp;steps.<br><br>Seems&nbsp;the&nbsp;#name&nbsp;part&nbsp;will&nbsp;break&nbsp;this&nbsp;line&nbsp;and&nbsp;throw&nbsp;a&nbsp;URL_MISMATCH_ERR&nbsp;with&nbsp;the&nbsp;duplicated&nbsp;#name2&nbsp;one.<br>Shall&nbsp;we&nbsp;ignore&nbsp;minor&nbsp;difference&nbsp;between&nbsp;urls?&nbsp;e.g&nbsp;#&nbsp;fragments?<br><br><span title="neteasefooter"/><hr/>
<a href="http://www.yeah.net/?from=footer">没有广告的终身免费邮箱,www.yeah.net</a>
</span>