Vidyalelo
JavaScript · Q27

Caching And Debugging

Programming · JavaScript · question 27

Q27

What will happen if you specify an absolute URL in the Worker constructor?

A.
Resolves itself
B.
Must have the same origin
Answer
C.
Must not have the same origin
D.
None of the mentioned

Answer: Option B

Solution

Answer: Option B
Solution:
If you specify an absolute URL, it must have the same origin (same protocol, host, and port) as that containing document.