As of today (Firefox 123), I intend to turn on http(s) and relative URLs for WebSocket by default on all platforms. It has not been developed behind a pref as it is a low-risk feature and we pass web platform tests. WebKit already ship it at this time.
Summary:
Sites can now use http(s) schemes and relative URLs for WebSocket(). This simplifies WebSocket creation as the browser can now handle such URLs itself instead of sites having to process them into previously restrictive URLs.
Bug:
https://bugzil.la/1797449Specification:
https://github.com/whatwg/websockets/pull/45 (merged)
Standards body: WHATWG (WebSockets)
Platform coverage: All
Preference: None
DevTools bug: None
Standards position: None
Other browsers:
- Blink: Not implemented or shipping. WIP? Bug:
https://bugs.chromium.org/p/chromium/issues/detail?id=1379162- WebKit: Shipped since Safari 17
Web platform tests:
https://wpt.fyi/results/websockets (some of the directory)