This article is a mirror article of machine translation, please click here to jump to the original article.

View: 15832|Reply: 0

[Jquery] Does jquery ajax come with cookies session requests?

[Copy link]
Posted on 4/26/2016 12:13:32 PM | | | |


Today, someone asked me a question, what should I do if the ajax request session is invalid?

Suddenly, I thought about it, if we usually use ajax to request the background, will we bring sessions, to put it bluntly, it is actually cookies???? Will cookies be included???

In my MVC background, there is a filter in the routing method settings, if the session does not exist, it will directly reject the request.

In fact, my guess is definitely to bring it! ! However, out of sight, I always feel unat ease in my heart, so test it.

From the perspective of requests and return values, ajax requests are requested with cookies, that is, sessions!






Previous:Use Task to replace the ThreadPool and asynchronously monitor whether all threads (tasks) are executed
Next:Fixed a bug in RSS output after Discuz X3.2 upgrade
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com