1
I would like to know if someone knows how to use or can inform if you take Cookies directly from the webview of the smartphone device..
I know they are functions of a browser, but I am making an APP that it needs to save temporarily or permanently, until it is changed, the user login, and the app is entirely in HTML, ie it is not quite an application of the type JAVA, but HTML5, CSS3 and JAVASCRIPT.
And so that the user does not have to log in every time they open the app would like to save this login data in some way on the device, be it cookies, or creating a txt type file with the information...
But say the user closes the app or restarts the mobile app, this function will keep the value?
– Pedro Quezado
@Stone tested the jsFiddle I made. It has a field
primeiroLogin
and anotherultimoLogin
. Notice how the first one is always the same and the second one is being updated.– Sergio
can inform why this command is not working??
$(document).ready(function(){
 if(localStorage.userlogin !== "undefined") {
 alert(localStorage.userlogin);
 };
});
– Pedro Quezado
the code in general... http://jsfiddle.net/pedroquezado/qafk7j67/ should give a Alert() returning the localStorage.userlogin only if it had been filled in, in the case other than Undefined, but even then it gives an Alert.. FAILL! ;(
– Pedro Quezado
@Stoner uses
typeof
http://jsfiddle.net/y6Lpu8m1/1/– Sergio
when the user leaves? I can clean the localStorage with
localStorage.clear();
?– Pedro Quezado