0

I am trying to write a websocket client for a project I'm working on. However I want to make the code generic enough to be abe to downgrade gracefully to non secure sockets (with a warning, of course), but I haven't been able to find how to do that. Any ideas?

dorphalsig
  • 689
  • 1
  • 10
  • 27
  • I doubt you can downgrade from SSL (`wss`) to non-SSL (`ws`). An SSL loaded page (using `https`) should (and probably will) refuse any non-SSL javascript websocket or AJAX... When websocket developers talk about "downgrading gracefully", we usually refer to using AJAX when Websockets aren't available. – Myst Dec 05 '15 at 04:55
  • @Myst Yeah, I was thinking along those lines also, but who knows, maybe I'm wrong. I believe you can ws on an https page, I did some tests some time ago and I think that was one of them. – dorphalsig Dec 05 '15 at 05:08
  • I believe not: http://stackoverflow.com/questions/9745249/html5-websocket-with-ssl – vtortola Dec 07 '15 at 16:56

0 Answers0