Can I use a link tag to preconnect to a WebSocket destination?

315 Views Asked by At

I have a website that uses WebSockets to connect to the server and transfer data.

At css-tricks.com, they showed the following example for using HTML link tag preconnect:
<link rel="preconnect" href="https://css-tricks.com">

Can I use this to connect to WebSockets, or at least speed it up? Something like this
<link rel="preconnect" href="wss://css-tricks.com">

Is there a way I can tell if it is even working when I try the WS connection? Or even with the HTTP connection?

0

There are 0 best solutions below