Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8418185
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T02:15:07+00:00 2026-06-10T02:15:07+00:00

I have an app in phonegap (pure js, html, css) where user signs in

  • 0

I have an app in phonegap (pure js, html, css) where user signs in and then it has access to some aditional sites. My question is how to save his personal data or his session. There is no php involved for sending cookie or handling sessions. Everything need to be saved in JS (jQuery). How can I do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T02:15:09+00:00Added an answer on June 10, 2026 at 2:15 am

    You can use HTML5 feature Local Storage

    For eg;

    When user logs in, set one variable as isAuthenticated in your local storage

    By default, it will be 0, on successful login, set it to 1.

    localStorage.isAuthenticated = 0; // default
    OR
    localStorage.setItem('isAuthenticated',0);
    

    On Successful login

    localStorage.isAuthenticated = 1; // default
    OR
    localStorage.setItem('isAuthenticated',1);
    

    And whenever you want to check user’s authenticity, simply compare value of isAuthenticated variable from Local Storage.

    var isLoggedIn = localStorage.getItem(‘isAuthenticated’);

    if(isLoggedIn){
        //your code
    } else {
        // invalid user code
    }
    

    UPDATE
    If you are storing javascript objects then

    var myObject = { 'one': 1, 'two': 2, 'three': 3 };
    
    // Put the object into storage
    localStorage.setItem('myObject', JSON.stringify(myObject));
    
    // Retrieve the object from storage
    var retrievedObject = localStorage.getItem('myObject');
    retrievedObject = JSON.parse(retrievedObject)
    

    Convert your object into string using JSON.stringify and then store it into the local storage.
    While retrieving cast that string back into the javascript object using JSON.parse

    Looking at the local storage documentation, the functionality seems to be limited to handle only string key/value pairs.

    You can take a look at the documentation here

    Apple

    Mozilla

    PS : Phonegap has nothing to do with working of local storage or any other HTML feature. Phonegap is just a middleware that facilitates communication between your device hardware and your javascript/html code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a minimal PhoneGap app that has just this in the index.html:
I have created android phonegap app using html,css,javascript and jquery.When i hit the back
I have a mobile app that I developed using PhoneGap (and html/css/javascript) and there
We have a PhoneGap app, jQuery-based, that has some problems with touch events (
I have a Phonegap App, using jQuery and jQuery Mobile. In some page I've
I have a PhoneGap app, where I need to list all the user's friends,
I have an PhoneGap iOS app and have this HTML that won't show the
I have PhoneGap app in Android using jQuery. Sometimes I need to upload some
I have a PhoneGap app up and running using JavaScript and HTML. On app
I have mobile app written in HTML5 using PhoneGap. Some parts of the app

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.