HTML and CSS Reference
We briefly touched upon this in Chapter 4. Caching can be useful, but can also
be a pain when you need to clear it. Fortunately, application caching has a
Not only can you cache files from your web application, but you can also cache
files that you pull in from external web sites, such as the user's favorite movie
images. Be warned, however, as your application's cache may be limited to a
certain size on some devices.
Open the momemo.cache file that you created in Chapter 4. We know that the
cached, so update the momemo.cache so that the following files are cached.
Your manifest file should now look like the following code.
# We'll make these files cachable
You can see that every file that needs to be cached has been explicitly
specified. Unfortunately, you can't use wildcards, as the browser cache will
cache all of the files in the manifest file before the page is loaded. It doesn't
know which files exist on your server, so using a wildcard (*) won't have any
files that haven't been minified. This will prevent frustration when you need to
change files for development, so that you don't have to manually change the
manifest file to bring in the changed files.
With the cache manifest, you can also specify which files require a network
connection. We definitely want the Rotten Tomatoes API to have the latest data.