-
Notifications
You must be signed in to change notification settings - Fork 10.1k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Socket.io client library does not work when using it with XHTML documents with cross domain access
How can I reproduce the problem?
- Start socket.io server on http://localhost:8888
- Save https://gist.github.com/15fc854708f97cb9323e in test.html and test.xhtml
- Open test.html and test.xhtml at http://localhost:4444/test.(html|xhtml)
What am I expected to see?
Both documents should alert "Connected", but only the .html variant works. Tested browsers: FF5, Safari 5.1, Chrome
What might cause the issue?
In a cross-domain environment, a "SCRIPT" tag instead of a "script" tag is inserted. XHTML is based on XML and is case insenstive. XHTML tags should be in lower case (http://www.w3.org/TR/xhtml1/#h-4.2). The following fix in /socket.io/
socket.io.js, line 1539, should solve the issue:
- , script = document.createElement('script');
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
rauchg commentedon Sep 3, 2011
Fixed in socket.io-client:
socketio/socket.io-client@24c3017
Fixed; make Socket.IO XHTML doctype compatible (fixes #460 from server)
Merge pull request #460 from nus-fboa2016-si/refactor
[chore] Release 1.8.2 (#460)