why do websites, where you buy stuff, still need that “don’t use the browser back button to click away when you are making a purchase”. Have we not got a better solution?

259 views

why do websites, where you buy stuff, still need that “don’t use the browser back button to click away when you are making a purchase”. Have we not got a better solution?

In: 52

12 Answers

Anonymous 0 Comments

simply put, the “why?” is because their app is crappy

if designed properly, it should be idempotent. (eye-dem-potent) i know it’s a big crazy word for ELI5, but it’s an important word. it basically means if you have an app or program or a form that you submit from a webpage, you can run it over and over and over and nothing bad will happen. including hitting the back button after you click submit.

the problem is, in some poorly designed apps, when you click submit, the app writes a “task” into a task queue. (queue just means a list of tasks that need to be processed, in the order they were created) bad apps will just add a second identical task to the queue if you click the back button, so if you’re buying something, you’ll get two orders, and your credit card will get double charged. the good news is, some banks actually detect identical amoutns submitted within a short period of time and will deny the second one because they know that 99% of the time, it’s a mistake.

if they designed it better, they would have the app check to see if an identical request is already waiting to be processed. someone could possibly buy something, then realize a minute later “crap, i needed to buy two”, then buy another one, making a nearly identical order, but in that case, you WANT both orders. so you’d still want the app to be smart enough to know the difference, so probably something like “if an identical order is currently in the queue, and it’s been less than 2 minutes, cancel this one, we’ve already submitted”

there’s way more to this story, like the actual reason WHY pushing back button can cause you to get double charged. the important key takeaway is how the app is designed to be able to handle this

You are viewing 1 out of 12 answers, click here to view all answers.