Why does Chrome browser not save to a cookie from off-line HTML/Javascript app. when IE and Firefox have no problem?

We have an HTML and Javascript site of statistical calculators that runs either from the web or directly from one's hard disk.  We use a cookie to save language and other preferences. This is fine either off-line or on-line in IE and Firefox, but the new Chrome browser will not save to the cookie when off line.  Is this deliberate, and is there a way around it in JavaScript?  The code is at www.openepi.com
Andy_in_DoralAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

agdean9Commented:
Perhaps my spelling of "cookie" as "cooke" is the problem.  
0
ZvonkoSystems architectCommented:
Is in the offline version the Google analytics script at bottm of code.html included?

0
agdean9Commented:
Thank you, Zvonko, for this suggestion, as I have had trouble with script being between the </body> tag and the </html>  tag before.  However the cookie problem is easily demonstrated by code from a tutorial on cookies.  Save the following demo to a disk file and then run it both from the net and from the disk copy with IE or Firefox and then with Google Chrome.

http://elated.com/res/File/articles/development/javascript/javascript-and-cookies/cookies_page.html

The demo page accepts a name and stores it in a cookie when run from a website, or from disk in IE or Firefox.  Chrome runs it correctly from the website, but when running the HTML from disk, fails to save the name in a cookie.  It asks repeatedly for your name because it can't save the answer to a cookie.  

This simple example should help to clarify the problem, and exclude the complexities..
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

ZvonkoSystems architectCommented:
Use this cookie control parameter: -enable-file-cookies
Like this:
C:\Users\Zvonko\AppData\Local\Google\Chrome\Application\chrome.exe --enable-file-cookies

The reason why you need that parameter is described here:
http://code.google.com/p/chromium/issues/detail?id=535


0
agdean9Commented:
Thank you Zvonko.  This is exactly the issue, and the documentation I need.  Now that I know not saving cookies in off-line mode was a decision of the Chromium team, how can I allow users to run our statistical calculators off-line in Chromium?  The way I see it, the choices are:
   1)  Ask them to learn how to run Chrome from the command line.
   2) Somehow give them a desktop shortcut that does so, only for Chrome and only in Windows
   3) Tell them not to use Chrome to run OpenEpi from disk.
   4) Detect Chrome in Javascript and pop a message about having no language or statistical settings
   5) Convince the Chromium team that whatever works in FF and IE should also work in Chrome, and not just fail mysteriously without further information.  

Any suggestions for a workaround?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Michel PlungjanIT ExpertCommented:
Why not do 4 + 1 ?

tell them that the current BETA (more like Alpha) version of Chromium needs a shortcut to allow offline cookies
I am sure the users of that browser are more than average technical...
0
agdean9Commented:
Could do this, at least in Windows, if life and limb depended on it, but it seems extreme in order to get Chrome to do what FF and IE do smoothly.

I'm no wizard on the details of security, but it seems like allowing a page from any website to save a cookie as long as the page is on-line is more dangerous than allowing a page that has been downloaded and saved to save a cookie in the absence of an Internet connection.  Perhaps the Chromium team will change their minds, as I'm sure there are lots of on-line/off-line internet applications that depend on cookies for settings.
0
Michel PlungjanIT ExpertCommented:
If I can get you to save MY page, I can in MY page read all cookies from all offline pages you have saved and which have saved cookies while offline and send them to MY server quite easily.

That is the reason
0
agdean9Commented:
IIt sounds like MY is spyware. In the current version of Chrome, runninng on-line, MY can read and write cookies, sending them wherever it wants.  How is this prevented by keeping it from reading and writing cookies when there is no Internet connection?   Even if you prevent IE and FF from writing cookies off-line, there will always be cookies to read, whether written off-line or on-line.

I hope the Chromium team will come up with a way to do what is safe without requiring  browser specific workarounds just to store the user's language preference.  Google has gone to great effort to enable offline applications (e.g., with Gears), and this seems to block that effort.
0
Michel PlungjanIT ExpertCommented:
I wrote "if MY page" as in "if the page you save on your harddisk" and I am of course talking about spyware
0
Michel PlungjanIT ExpertCommented:
0
agdean9Commented:
Thank you for the HTML5 draft document.  I'm afraid I must leave this to wiser heads than mine, but I think I have made my desires clear.  All I want is for the Chrome browser to let HTML/Javascript pages that are run from the local disk,  read and write their own cookies in order to save settings.  

Thanks to all for clarifying the issues.
0
agdean9Commented:
Please close this thread.  I hope the Google Chrome crew will fix the problem and allow offline apps to read and write their own cookies.
0
Michel PlungjanIT ExpertCommented:
You can close it by accepting your own comment as solution
0
Andy_in_DoralAuthor Commented:
It appears that new Chrome updates have fixed the problem.   Yeah!!!

0
Andy_in_DoralAuthor Commented:
Thanks, everybody, and to the Passage of Time, and especially to the Chrome Team for fixing the problem.  
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Browsers

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.