开发者

iPhone: know programmatically is cookies are allowed or not

I need for my app to have cookies enabled in Safari and I was wondering 2 things: - How to detect if cookies are allowed or not - How to allow cookies

F开发者_如何学编程or the moment my googling was not really successful...

Thanks for your help :)


You can't force Safari to accept cookies.

But you cat detect if they're allowed, by redirecting.

Here's how you can do:

  1. At the first page you can set a verification cookie.
  2. Forward to the second page.
  3. At the second page, check if the verification cookie is there. If it is missing, then it doesn't accept cookies.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜