Don't follow Ajax requests with a redirect

The behaviour of browsers is very inconsistent when an Ajax request is answered with a redirect. Highlights are:

  • IE 9 will follow a DELETE request with a second DELETE. You never want that.
  • Firefox will follow a POST request with a GET, as you might expect. If a PUT is redirected however, you will get a confirmation dialog, where you can choose to follow with a second PUT or simply abort. You don't want that either.

See some workarounds here.

Tobias Kraze Almost 12 years ago