Re:Ask HN: Why isn't JSON-RPC more widely adopted?
by imiric on Monday January 02, 2023 @08:12PM
(#34226207)
> I saw a truly truly awful codebase get around the caching bit by appending a random string of bytes to the query string.
This is a common cache busting technique. Why is it a bad thing?
Re:Ask HN: Why isn't JSON-RPC more widely adopted?
by BoorishBears on Tuesday January 03, 2023 @12:01AM
(#34227887)
Why do I get the impression this is a leading question...
If you have the option between cache busting and just using the correct HTTP verb, please choose the latter.
As to whether there was an option in this particular case, I think the fact I referred to it as a "truly truly awful codebase" should provide a hint.
Re:Ask HN: Why isn't JSON-RPC more widely adopted?
by talideon on Tuesday January 03, 2023 @12:18AM
(#34227991)
The correct solution for cache busting is generally to put a low TTL on the resource in question. Adding random crap in the end is only good if you're dealing with utterly broken caches or your webserver does some tremendously stupid header rewriting. In my experience, when people resort to that, it's down to a lack of understanding of HTTP itself.
YMMV, however.
If you're willing to ignore the rules you can get away with pretty awful stuff that no one should really need to account for in a general conversation.