Do WebSocket connections count towards the project's request limit


I was wondering is WebSocket connections would count towards the amount of requests a project can receive. I don’t need any front-end stuff. Basically another computer will create a WebSocket connection and exchange several requests with it.

Hey @charliea21 yes, websocket connections will count as requests. Basically anything that gets routed to a project through our proxy will count.

Once you’ve made the connection, however, you should be able to send as many messages through a opened connection as you like,


Huh. Could you make a NPM package that allows you to send resources as data: URLs and keep a webSocket connection alive between reloads to make more requests?

You could. (sorta)

Okay. So, would that be a good technique for projects with thousands f resources, loading them through webSockets?

It’s not the best technique.

But it would be good for decreasing overhead, minimizing requests, and actually maybe decrease the bandwidth usage (there’d be less header content) in the right situation, right? I know you use webSockets for the editor. By the way, could whoever has the ability to reprogram the Glitch editor add this to it?

webSocketConnection.onclose=function() {; } 

for persistent connections?

That would be

@glitch_support Could you add the above code to the editor?

Hi, the Glitch staff no longer respond to direct pings on the forum (except it’s an emergency), emailing is the way to go!