randomouscrap98 / contentapi

A generic content system to make some kinda standard websites
GNU General Public License v3.0
8 stars 2 forks source link

websocket compression #143

Closed 12Me21 closed 2 years ago

12Me21 commented 2 years ago

I think .NET supports the "permessage-deflate" websocket extension, but it's disabled by default (for "security" reasons, of course) that should reduce the size of some requests by like 70%

randomouscrap98 commented 2 years ago

Hm... ok other than security, what are the other downsides? Poor browser compatibility? Spotty implementation? I'll have to do research, but it seems reasonable. But what exactly are you saving? Is this just for like... "request" types, or will this make a noticeable difference on live events?

12Me21 commented 2 years ago

it seems like most browsers support it but it's safe either way, since the server only enables it if the client asks (by setting a header in the request)

randomouscrap98 commented 2 years ago

I read the github issue tracking the implementation (I don't want to link it, because then it links my issue to theirs) and I don't want to add this at this point. It's far too new, like... this year new, for me to feel comfortable with it. I don't like the discussion they had, and the way they implemented it. It feels VERY much like one of those things Microsoft is going to change in the near future, completely ruining contentapi.

Unless you think it's really that important. There's a history with dotnet core changing lots of API stuff as it grows, and this feels like one of those hot topics (especially with them calling the options DangerousDeflateOptions) that will cause a lot of friction in dotnet

randomouscrap98 commented 2 years ago

This has been added but won't be pushed to production for another week or so (due to testing)