Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Get cookie generated by webview and use it in application

I've created a webview to show a web application with a login form and other…
Now, I have to send periodically the position to an url on the same server of web application, I think with xhr.
The problem is that I must passing with get, a cookie generated by web application in the webview.
Is possible to get a cookie generated by webview to use with application?

— asked July 6th 2010 by Antonio Giuliana
  • cookie
  • webview
  • xhr

1 Answer

  • > To use the cookie when the webview is active, you should be able to webview.evalJS to get the value of the cookie. To facilitate this, either you can get all the cookies and look for it in the mobile code or you can add a JS function in your web file (HTML/PHP, JSP etc) to just return that cookie.
    > To use the cookie when the webview is not active anymore, then get the cookie value as explained above and store it in app properties. (assuming the values are still valid after the web view is gone)

    — answered September 13th 2012 by Birender Saini
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.