Skip to content

Instantly share code, notes, and snippets.

@JacksonTian
Last active December 14, 2015 03:18
Show Gist options
  • Select an option

  • Save JacksonTian/5019634 to your computer and use it in GitHub Desktop.

Select an option

Save JacksonTian/5019634 to your computer and use it in GitHub Desktop.
offline web application
CACHE MANIFEST
NETWORK:
CACHE:
index.html #rev
clock.js
clock.css
output { font: 2em sans-serif; }
setInterval(function () {
document.getElementById('clock').value = new Date();
}, 1000);
<!DOCTYPE HTML>
<html manifest="clock.appcache">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="format-detection" content="telephone=no" />
<title>Clock</title>
<link rel="stylesheet" href="clock.css">
</head>
<body>
<p>The time is: <output id="clock"></output></p>
<script src="clock.js"></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment