News for hackers. Stuff that matters.
Re:You know how HTTP GET requests are meant to be idempotent? by downer68 on Tuesday May 01, 2018 @12:39PM (#16968667)

  This, kids, is why GET requests should be idempotent.
Or, like, you know, how about a browser only sends a request when I'm actually fucking asking for something, and doesn't try to fetch everything I've ever thought about, with my every slightest accidental finger twitch against its touch screen?

What happened to deterministic user interaction?

Re:You know how HTTP GET requests are meant to be idempotent? by boomlinde on Tuesday May 01, 2018 @02:53PM (#16970176)
Well, ideally you'd have both. When I "GET" I assume that it's GET as opposed to any of the other standard HTTP methods, not "GET" as in Indiana Jones getting the golden idol from the pedestal.

This is not only a problem with browsers preemptively requesting URLs, but also when it comes to caching. What happens when the URL I'm GETing is cached? Absolutely nothing, as far as the original server is concerned.

The current situation with browsers doing smart things to make slow websites appear fast is a bit like compiler writers doing smart things with UB in C, though. Speed a lot of things up by utilizing every undefined nook and cranny of the spec, breaking tons of legacy software that make pretty sound assumptions about how things actually work. I use a bunch of poorly designed legacy systems where GET often has intentional side effects. They break because the browser starts issuing HTTP requests long before I have finished typing an address. Let slow sites be slow and leave the speed problem to the people that should be dealing with it instead.

Re:You know how HTTP GET requests are meant to be idempotent? by fenwick67 on Tuesday May 01, 2018 @01:29PM (#16969205)
GET is meant to get, not set. Since 1.0.

https://www.w3.org/Protocols/HTTP/1.0/spec.html#GET

> The GET method means retrieve whatever information (in the form of an entity) is identified by the Request-URI

Re:You know how HTTP GET requests are meant to be idempotent? by downer68 on Tuesday May 01, 2018 @02:25PM (#16969840)
So what?

If I never intended for the GET to be GOT, then the browser is just as much at fault for such unintended consequences.

Re:You know how HTTP GET requests are meant to be idempotent? by scottmf on Tuesday May 01, 2018 @07:06PM (#16972571)
That’s the whole point of HTTP request methods: it isn’t. GET should never cause such side effects. The entire web is built with these principles in mind precisely so that problems like this don’t happen.

If you want a slower browsing experience feel free to disable prefetching in your browser, but this isn’t a hill worth dying on.

Re:You know how HTTP GET requests are meant to be idempotent? by scottmf on Tuesday May 01, 2018 @01:27PM (#16969179)
Darn kids and their prefetching, GET off my lawn!