Dec 13, 2011 11:14 AM|hector_antonio_hernandez|LINK
All,
I have a mobile site that I have security on it. I'm using the standard Login control and recording the Logged in Cookie to the browser. This works great when the user uses this in mobile Safari. If they Add the bookmark to the Home Screen the cookie no
longer works. It will ask for login every time, and if you stop runnign the site for a minute my customer is logged out. This gets quite anoying, having to log in every time. I'm setting the cookie to be persistent but that does not help when running in this
mode. I've read about LocalStorage for the device but really have no idea how to write/read that cookie to that location.
Take the help of Offline application Cache for mobile safari & develop a cache manifest file which should be kept in your web server. A offline cache manifest file is just text document kept in the web server & sent information to the device with a content
cache-manifest. These will keep your files & webpages in localstorage of the device.
Member
50 Points
24 Posts
iphone Add to Home Screen App
Dec 13, 2011 11:14 AM|hector_antonio_hernandez|LINK
All,
I have a mobile site that I have security on it. I'm using the standard Login control and recording the Logged in Cookie to the browser. This works great when the user uses this in mobile Safari. If they Add the bookmark to the Home Screen the cookie no longer works. It will ask for login every time, and if you stop runnign the site for a minute my customer is logged out. This gets quite anoying, having to log in every time. I'm setting the cookie to be persistent but that does not help when running in this mode. I've read about LocalStorage for the device but really have no idea how to write/read that cookie to that location.
Any help or pointer will help me a great deal.
Thank you,
Héctor
persistent storage iphone login cookies
Star
14065 Points
3270 Posts
Re: iphone Add to Home Screen App
Dec 13, 2011 11:38 AM|roopeshreddy|LINK
Hi,
Check the below links!
http://stackoverflow.com/questions/5137487/how-safari-manage-its-cookie
http://stackoverflow.com/questions/1604884/setting-a-cookie-in-an-iphone-app
Hope it helps u...
Roopesh Reddy C
Roopesh's Space
Member
50 Points
24 Posts
Re: iphone Add to Home Screen App
Dec 14, 2011 09:59 AM|hector_antonio_hernandez|LINK
thank you but neither solution corrects my problem.
Participant
1660 Points
400 Posts
Re: iphone Add to Home Screen App
Dec 16, 2011 06:35 AM|Anindita.Basak|LINK
Take the help of Offline application Cache for mobile safari & develop a cache manifest file which should be kept in your web server. A offline cache manifest file is just text document kept in the web server & sent information to the device with a content cache-manifest. These will keep your files & webpages in localstorage of the device.
Create a manifest file by adding these lines:
CACHE MANIFEST
Login.html
logo.jpg
scripts/jquery.js
styles/style.css
More information & guidelines: http://developer.apple.com/library/safari/#documentation/iPhone/Conceptual/SafariJSDatabaseGuide/OfflineApplicationCache/OfflineApplicationCache.html
http://www.thecssninja.com/javascript/how-to-create-offline-webapps-on-the-iphone
Thanks,
Anindita
http://anindita9.wordpress.com
Anindita
http://anindita9.wordpress.com