3 ms·
I thought this was going to be about base64 encoded json query param(s) - instead of posting base64 or making a bunch of different params, do a GET with one par
by csours 4y ago
I thought this was going to be about base64 encoded json query param(s) - instead of posting base64 or making a bunch of different params, do a GET with one param of base64 encoded json. Easy for the client, easy for the server, easy to share, only downside that I see is that it makes things a bit obtuse for users, but an extension or browser affordance could fix that.
- rpastuszak 4y agoIf you're into this stuff, you might enjoy my "Twitter as a CDN tool", here's pong in a single Tweet: https://twitter.com/rafalpast/status/1316836397903474688 https://twitter.com/rafalpast/status/1316836397903474688 > Easy for the client, easy for the server, easy to share, only downside that I see is that it makes things a bit obtuse for users There are more downsides: - processing and creating payload can be harder are you're passing plaintext w. ca. 30% size increase on average - base64-encoded assets (e.g. SVGs) would cause a huge performance drop in WebKit (this probably has improved since the last time I ran benchmarks). - since you're encoding content and not its location, you can't easily update the underlying resource (hence to update my version of Pong, I'd need to create a new unique URL). IIRC IPFS suffers (used to?) from a similar issue - not an issue now, but still was 1-2 years ago: some browsers would allow only for 2 or 4kb of text in URL
- csours 4y agoHah, that Twitter thing is neat. > not an issue now, but still was 1-2 years ago: some browsers would allow only for 2 or 4kb of text in URL Yes, I had in mind smaller payloads, things that would have been query params on a GET
- r_c_a_d 4y agoYes, I think this is how Wordle did the migration to NY Times without losing game history. The original site did a redirect to nytimes.com/something/wordle?data=X where X was the game history. Quite clever, I thought.
- cagmz 4y agoDoes this technique have a name?