Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Application Cache manifest

<!DOCTYPE HTML>
<html manifest="example.appcache">
<link rel="stylesheet" type="text/css" href="AppCache.css">
<meta charset="utf-8">
<title>Untitled Document</title>
</head>
<body>
<p>Test to make sure css is being cached</p>
<img src="large.jpg">
<script src="AppCache.js"></script>
</body>
</html>

My example.appcache file has:

# v1 11/16/2011
AppCache.htm
AppCache.js
AppCache.css
large.jpg

The first time I navigated to the page, it asked

This website is asking to store data on your computer for offline use.

When I take Firefox offline and press refresh, the jpg disappears.

Q: What do I need to do to make sure the image is cached locally?

like image 686
Phillip Senn Avatar asked Nov 16 '11 21:11

Phillip Senn


People also ask

What is cache manifest file?

The cache manifest file is a simple text file that lists the resources the browser should cache for offline access.

What does application cache do?

Cached data helps apps load faster by keeping temporary files such as thumbnails, scripts, and video snippets on your phone instead of loading them from the web each time. But cached data can quickly fill up your phone's storage.

What do you mean by application cache in HTML5?

What is Application Cache? HTML5 introduces application cache, which means that a web application is cached, and accessible without an internet connection. Application cache gives an application three advantages: Offline browsing - users can use the application when they're offline. Speed - cached resources load faster.

When an application is cached it remains cached until?

Once an application is cached, it remains cached until one of the following happens: The user clears the browser's cache. The manifest file is modified. The application cache is programmatically updated.


1 Answers

IIS does not serve unknown file types. You need to configure it to serve .appcache files with the MIME type text/cache-manifest, how you do this depends on which version of IIS you have:

  • In IIS6 use IIS manager
  • In IIS7 and later, you can either use IIS manager or add it in a mimeMap element in web.config
like image 180
robertc Avatar answered Oct 20 '22 13:10

robertc