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

  • Home
  • SEARCH
  • 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 8029407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T00:25:43+00:00 2026-06-05T00:25:43+00:00

I am developing HTML5 mobile app. I want to cache particular JSON request for

  • 0

I am developing HTML5 mobile app. I want to cache particular JSON request for 10 days using jQuery. I tried setting cache : true on the request. But I can’t specify 10 days there. Is this possible to do? Or Do I need to use HTML5 local storage.

  • 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-05T00:25:44+00:00Added an answer on June 5, 2026 at 12:25 am

    You could just store the json data, with a date, which will enable you to look up the cached data before calling to the server for an update.

    You can use the local storage api in html5.

    For some ideas on how to use it you can look at this question.

    Storing Objects in HTML5 localStorage

    To know if this will work on your target mobile devices you can look at this:

    http://caniuse.com/#feat=namevalue-storage

    So, you can do this:

    var dtDateTime = new Date();
    var intDateTime = dtDateTime.getTime();
    var objJSON = {};
    objJSON.datetime = intDateTime;
    objJSON.data = myjson;
    localStorage.setItem('cachedObject', JSON.stringify(objJSON));
    

    Then you can just retrieve the object and check the date and decide if you need to reload the data.

    I haven’t tested this, but it should be close.

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

Sidebar

Related Questions

I am developing a mobile app using HTML5, Javascript, jQuery Mobile, and offline storage.
I am developing an app using phonegap for Android. I want this mobile application
I am new to phonegap.I am using jquery mobile with html5 for developing android
I am developing the application using jQuery Mobile 4.1. In my app, I have
can anybody suggest a framework for developing mobile applications using html5 ? I want
I have made a set of HTML5 pages using Jquery mobile. While developing I
I am developing an iphone app on phonegap and I am using jQuery mobile.
We are developing JQuery Mobile app using RC1 + ASP.NET MVC3. My question is:
I am developing a small app using jquery mobile. I have the following scenario
I am developing one Iphone application using jquery mobile + HTML5. I can check

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.