How do HttpOnly cookies work with AJAX requests?

后端 未结 9 1192
别那么骄傲
别那么骄傲 2020-11-30 16:31

JavaScript needs access to cookies if AJAX is used on a site with access restrictions based on cookies. Will HttpOnly cookies work on an AJAX site?

Edit: M

9条回答
  •  悲&欢浪女
    2020-11-30 16:57

    As clarification - from the server's perspective, the page that is requested by an AJAX request is essentially no different to a standard HTTP get request done by the user clicking on a link. All the normal request properties: user-agent, ip, session, cookies, etc. are passed to the server.

提交回复
热议问题