Reputation: 18556
I'm implementing logout functionality for a web application. I have a function, which is called when the user clicks the sign out button.
$.post(window.location.pathname + '/logout');
The logout service works only with post.
What happens is:
What I would like to happen is:
Upvotes: 3
Views: 4659
Reputation: 943089
If you don't want to handle the response using Ajax, then don't use Ajax.
<form action="/logout" method="post">
<input type="submit" value="logout">
</form>
Upvotes: 5