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 4541836
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T15:18:00+00:00 2026-05-21T15:18:00+00:00

I have an HTML5 webapp wherein I use localStorage to retain some client-side user

  • 0

I have an HTML5 webapp wherein I use localStorage to retain some client-side user settings between uses. I thought I had it all working well, but I recently find that in the WebOS browser the localStorage items are cleared after the browser is completely closed (all cards–not just my page). It is acting like it is saved to session storage, but that is not the case. Here is a minimal example that illustrates my problem:

<!DOCTYPE html>
<html>
    <head>
        <title>test</title>
        <meta charset="utf-8" />
        <meta name="apple-mobile-web-app-capable" content="yes">
        <script type="text/javascript" src="js/jquery.min.js"></script>
        <script>
            $(function() {
                $('#btnV').click(function() {
                    var x = '';
                    for(var i = 0; i < localStorage.length; i++) {
                        x += localStorage.key(i) + ':' + localStorage.getItem(localStorage.key(i)) + '<br/>';
                    }
                    $('#lbl').empty().append(x);
                });
                $('#btnS').click(function() {
                    localStorage.setItem('test', 'blah');
                });
            });
        </script>
    </head>
    <body>
        <span id="lbl"></span>
        <input type="button" id="btnS" value="Save" />
        <input type="button" id="btnV" value="View" />
    </body>
</html>

When I first load the page and click the “View” button, nothing is shown. If I click “Save” and then “View” I will see the item as saved. Refreshing the page and clicking View immediately shows the value is retained across page-reload. However, if I completely close out the browser and then go back in to the page, “View” will show no values as it did the very first time. Am I setting localStorage items incorrectly, or is my WebOS browser configured somehow to do this? I couldn’t find anything relevant in the settings.

Thanks…

  • 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-05-21T15:18:01+00:00Added an answer on May 21, 2026 at 3:18 pm

    So far as I know, localStorage is not supported in WebOS 1.4.x. I think I remember seeing it listed as a feature that was enabled in WebOS 2.0 (or maybe 2.1), but I cannot find any documentation on the subject, so I could be misremembering.

    Assuming you are storing a small amount of data, user settings are usually more appropriately stored in cookies in WebOS using Mojo.Model.Cookie.

    In my own app, I use cookies for user preferences, and store the app data in an HTML5 database database, with my open-source database class making the HTML5 database access less onerous.

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

Sidebar

Related Questions

I have html code that looks roughly like this: <div id=id1> <div id=id2> <p>some
I have some HTML that looks like this: <ul class=faq> <li class=open> <a class=question
I'm trying to make a HTML5 webapp that simply plays a sound over and
I have a webapp that I'm building, and have just started with SQLite. I
I'm building a webapp that leverages gdata-api to bring a user's calendars into the
XML responses from my webapp have both HTML to add to the page AND
I have plain HTML file and I want to include some JSTL tags in
I have a webapp with form-based authentication. On the login page, I have placed
So i have an app that is not so much a webapp but more
I have a script that appends some rows to a table. One of the

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.