Reputation: 18859
When clicking a button like the 'like' button on Facebook, the like seems immediately (read: instantly) executed.
How is the user guaranteed that the Ajax call actually succeeded?
Is the 'like' visible at the client only executed as a response of the server?
Visually, it seems to happen instantly and I've never experienced it otherwise.
The response from the server after clicking 'like', looks like a bunch of code that I don't understand:
Upvotes: 0
Views: 458
Reputation: 1168
I read this question yesterday and then today Facebook's ajax failed!
Under a Facebook picture, the like button changed from "like" to "unlike", and then quickly changed back.
Then a dialog box box called "Try Again Soon" popped up, saying "Sorry there is a temporary problem with this post. Please try again in a few moments."
So that's what ensures the user won't just scroll past the error.
Upvotes: 0
Reputation: 4908
They assume that if the like button is displayed it will be possible to like it. If something goes wrong in the backend the like button will change back from Liked to Like.
Upvotes: 1