PhoneGap / Cordova:如何获得使用Cookie(iOS)? [英] PhoneGap/Cordova: How to get use cookies (iOS)?
本文介绍了PhoneGap / Cordova:如何获得使用Cookie(iOS)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个iOS的PhoneGap / Corodova项目。虽然在iOS模拟器上构建,我使用Jquery Cookie,他们很好。但是,现在我有我的设备上的应用程序进行测试,他们不再工作。我猜这只是iOS不支持的东西。
I have a PhoneGap/Corodova Project for iOS. Whilst building on the iOS simulator I used Jquery Cookies and they were fine. However, now that I have the app on my device for testing, they no longer work. I'm guessing this is just something iOS doesnt support.
有没有人知道为iOS做客户端cookie的方法?
Does anyone know a way to do client side cookies for iOS?
PS:我当前的Cookie代码(以防万一有用):
PS: My current cookies code (just in case its useful):
<script type="text/javascript" charset="utf-8" src="js/jquery.cookie.js"></script>
<!--STARTUP SCREEN COOKIE SETTER-->
<script type="text/javascript">
$(function() {
var cookiedate = new Date();
cookiedate.setTime(cookiedate.getTime() + (60 * 60 * 1000));
$.cookie("startupscreen", "checked", { expires: cookiedate, path: '/' })
});
</script>
推荐答案
为什么不使用localStorage? ios5支持像localStorage这样的HTML5功能。
Why not use localStorage? ios5 supports HTML5 features like localStorage.
这篇关于PhoneGap / Cordova:如何获得使用Cookie(iOS)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文