The unintentional AJAX status code 204
DISCLAIMER: This is not considered good practice, but it may save you for many hours, or make the otherwise impossible possible given real world constraints. (This really is not AJAX as it lacks the JAX)
So, let's say you really NEED to implement some way of the user to manipulate some state on the server without the page reloading.
For instance, we want a link that votes up something asynchronously as it is clicked.
We could do that by pointing a regular anchor element to a url that responds with HTTP 204.
That's it!
Written by Alexander Brevig
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Http
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#