1

I have a huge set of JavaScript files that need to be added to the App cache. Is it possible to add an entire folder(JS folder) in the Manifest. Else, I'll have to manually add those JS files to the manifest.

4

2 に答える 2

4

Your manifest file doesn't need to be a static file. Just write some server side code to generate a manifest based on the files in the folder.

于 2012-07-13T11:02:06.963 に答える
0

As Maurice has pointed out, you can generate the file dynamically.

Or better still, have a background task do the work when the contents of the folder changes.

Node.js is good for this if you are already familiar with JS and have control over the server so that it can be installed. Node comes with capabilities for watching files and folders & there are a number of libraries available to make the job simple.

One key issue to watch out for though is the combined size of the files. Many browsers that support HTML5 offline use, put strict limits on the amount of data you can store offline. Typically the default limit is 5MB.

于 2012-07-13T11:32:12.017 に答える