ios 的cookie处理机制
来源:互联网 发布:国民警卫队知乎 编辑:程序博客网 时间:2024/05/18 13:12
简单说不管是NSURLConnection还是UIWebView都会保留并传递服务端的cookie,重启进程,或重启系统cookie都在应用中。
2.多个应用间默认是不共亨cookie的
3.删除重装应用cookie会被清除
Due to the stateless nature of the HTTP protocol, cookies are often used to provide persistent storage of data across URL requests. The URL loading system provides interfaces to create and manage cookies as well as sending and receiving cookies from web servers.
The NSHTTPCookie class encapsulates a cookie, providing accessors for many of the common cookie attributes. It also provides methods to convert HTTP cookie headers toNSHTTPCookie instances and convert an NSHTTPCookie instance to headers suitable for use with an NSURLRequest. The URL loading system automatically sends any stored cookies appropriate for an NSURLRequest. unless the request specifies not to send cookies. Likewise, cookies returned in an NSURLResponse are accepted in accordance with the current cookie acceptance policy.
The NSHTTPCookieStorage class provides the interface for managing the collection of NSHTTPCookie objects shared by all applications.
iOS Note: Cookies are not shared by applications in iOS.
NSHTTPCookieStorage allows an application to specify a cookie acceptance policy. The cookie acceptance policy controls whether cookies should always be accepted, never be accepted, or accepted only from the same domain as the main document URL.
Note: Changing the cookie acceptance policy in an application affects the cookie acceptance policy for all other running applications.
When another application changes the cookie storage or the cookie acceptance policy, NSHTTPCookieStorage notifies an application by posting theNSHTTPCookieStorageCookiesChangedNotification and NSHTTPCookieStorageAcceptPolicyChangedNotification notifications.
http://pathfindersoftware.com/2008/12/iphonesdk-cache-and-cookies/
https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/URLLoadingSystem/Concepts/URLOverview.html#//apple_ref/doc/uid/20001834-157091
- ios 的cookie处理机制
- IOS的同步处理机制
- IOS-WKWebView的使用以及Cookie的处理
- iOS中消息机制的处理
- Discuz!的cookie机制
- iOS 10下NSURLSession不处理cookie的问题
- iOS 消息处理机制
- iOS事件处理机制
- iOS异常处理机制
- iOS 异常处理机制
- cookie机制及cookie的应用
- HTTP的cookie处理
- Python的cookie处理
- Cookie的处理
- Python cookie的处理
- Session、Session的跟踪机制、Session的超时管理、IE禁用Cookie后的session处理
- iOS :Cookie 的使用
- ios cookie的使用
- MFC环境osgEarth开发程序内存泄露的解决办法
- Linux系统脚本的三种执行方式
- 学习C语言的点滴(1)
- static和final
- javascript--hasOwnProperty()+isPrototypeof()+in方法
- ios 的cookie处理机制
- linux下使用apache+svn+ssl配置安全版本控制平台
- iOS 开发者必知的 75 个工具
- 二叉树中序遍历的非递归算法
- 徒弟们
- CCScrollView 中的逆向排列
- 用正则表达式过滤一些特殊字符
- 2012年软件行业薪酬现状分析
- 分享】一些常用的java面试题及答案