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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:55:49+00:00 2026-05-25T20:55:49+00:00

I posted a question about why my $.getJSON had stopped but I think the

  • 0

I posted a question about why my $.getJSON had stopped but I think the question is a bit wider now.

I have a mobile HTML5 app that does Ajax requests to a php web app (on the same domain). When there is an internet connection ie. navigator.onLine == true I do a $.getJSON call to the web app and store the response locally in a websql db on the device’s browser.

If navigator.onLine == false then I want to skip the json request and pull data out locally instead. My JSON works and I’m storing successfully in offline websql storage but my problem comes when adding the cache manifest file.

I’m not sure how to cache what I’ll need. Here is my cache manifest:

CACHE MANIFEST

# rev 2

CACHE:
index.html
app.html
http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0a1.min.js
http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0a1.min.css
http://code.jquery.com/jquery-1.4.3.min.js
js/data.js 
js/script.js

I think I’m right in assuming I can cache external files from code.jquery.com/..? Because I will need them online and offline.

Eric posted an answer in my previous question saying I should add the JS files under the NETWORK: heading with * at the end. When I do that my JSON call is triggered like I want it to. However now the files are unavailable offline.

This seems to work as well but when I go offline not even my CSS is loaded:

CACHE MANIFEST

# rev 2

CACHE:
index.html
app.html
js/data.js
http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0a1.min.js
http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0a1.min.css
http://code.jquery.com/jquery-1.4.3.min.js
js/script.js

NETWORK:
*

Can anyone suggest the best practice for caching javascript/css files for offline use?

Thanks a lot,

Billy

  • 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-25T20:55:50+00:00Added an answer on May 25, 2026 at 8:55 pm

    Check out http://westciv.com/tools/manifestR/, it’s a great tool for creating the manifest files that your app needs.

    AppCache requires that everything you want to be served locally be listed in the manifest file, so in this case, you need to list all of the JavaScript, CSS and any other files that your app needs to run in an offline experience. ManifestR will help you figure out that list and build it for you.

    Your manifest file should look something like:

    CACHE MANIFEST
    # rev 3
    
    CACHE:
    index.html
    app.html
    js/data.js
    http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0a1.min.js
    http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0a1.min.css
    http://code.jquery.com/jquery-1.4.3.min.js
    js/script.js
    style.css
    images.png
    
    NETWORK:
    *
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I posted a question about this earlier, but I have more information now and
I have already posted a question about this, but the situation has changed sufficiently
I have already posted another question about this, but no one seemed to know
i posted another question about this, but i think this one will be more
Well, I have posted a question about F# and fuzzy logic, now trying to
I have a question about this question . I posted a reply there but
I have previously posted a question about this but I did not get an
I have posted a question about multilanguage database design here, [] What are best
So I just have posted a question about this code (which was answered): $(document).ready(Main);
I posted another question earlier about getting the arguments from a context menu 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.