Cookies vs Basic Auth

后端 未结 3 1295
囚心锁ツ
囚心锁ツ 2020-12-08 20:22

Why almost all websites out there are using cookies instead of basic auth? It can\'t be only that the user/pass window is ugly and none of them is more secure. They are both

3条回答
  •  隐瞒了意图╮
    2020-12-08 21:06

    You have more control over cookies. You can encrypt them so that they are secure even without HTTPS. Basic auth is always unsecure over HTTP. Also cookies don't contain the password on each request. And, yes, what can I say, users like AJAX login forms and nice animated effects when logging in which unfortunately cannot be achieved with basic auth.

提交回复
热议问题