Our web application has a button that should send data to a server on the local network, which, in turn, prints something on the printer.
Until now, it was simple: the button ran an AJAX POST request to http://printerserver/print.php with a token, this page was connected to a web application to check the token and receive data for printing and printing. A.
However, now we are delivering our web application via HTTP (and I would prefer not to return to HTTP for this), and newer versions of Chrome and Firefox no longer make a request for an HTTP address, they do not even send a request for checking CORS headers.
Now, what is a modern alternative to the XHR cross protocol? Do Websockets suffer from the same problem? (A Google search did not indicate what the current state is here.) Can I already use TCP sockets? I would prefer not to switch to GET requests because the action is not idempotent, and this can have practical consequences with preloading and caching.
I can change the application on the printer server in any way (so I could replace it with NodeJS or something like that), but I can not change the users browsers (for example, trust a self-signed certificate for the printer server).
source share