Skip to content

Instantly share code, notes, and snippets.

@nekman
Created November 29, 2013 21:19
Show Gist options
  • Save nekman/7712135 to your computer and use it in GitHub Desktop.
Save nekman/7712135 to your computer and use it in GitHub Desktop.
CACHE MANIFEST
# 2013-11-29 11:03
NETWORK:
*
CACHE:
#CSS
css/weather-icons.min.css
#CDN CSS
http://netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.min.css
http://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.9/require.min.js
#CDN JS
http://code.jquery.com/jquery-2.0.3.min.js
http://cdn.jsdelivr.net/backbonejs/1.1.0/backbone-min.js
http://cdnjs.cloudflare.com/ajax/libs/lodash.js/2.3.0/lodash.min.js
#Bilder
https://dl.dropboxusercontent.com/u/8231582/temp/offline-site/big1.png
https://dl.dropboxusercontent.com/u/8231582/temp/offline-site/big.png
https://dl.dropboxusercontent.com/u/8231582/temp/offline-site/big2.png
<!DOCTYPE html>
<html manifest="appcache.manifest">
<head>
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.min.css" />
<title>Appcache progress</title>
<script>
(function(appCache) {
'use strict';
var handleProgress = function(e) {
// Uppdatera progress...
document.querySelector('.progress-bar')
.style
.width = (e.loaded / e.total) * 100 + '%';
};
// Lyssna på applicationCache progress event...
appCache.addEventListener('progress', handleProgress, false);
}(window.applicationCache));
</script>
</head>
<body>
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;" />
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment