diff options
Diffstat (limited to 'docs/src/templates/index.html')
| -rw-r--r-- | docs/src/templates/index.html | 11 | 
1 files changed, 10 insertions, 1 deletions
| diff --git a/docs/src/templates/index.html b/docs/src/templates/index.html index 9e0c64ba..cdd04e1d 100644 --- a/docs/src/templates/index.html +++ b/docs/src/templates/index.html @@ -1,7 +1,8 @@  <!doctype html>  <html xmlns:ng="http://angularjs.org/"        xmlns:doc="http://docs.angularjs.org/" -      ng:controller="DocsController"> +      ng:controller="DocsController" +      manifest="app-cache.manifest">  <head>    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />    <title ng:bind-template="<angular/>: {{partialTitle}}"><angular/></title> @@ -20,6 +21,14 @@        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);      })(); + +    // force page reload when new update is available +    window.applicationCache && window.applicationCache.addEventListener('updateready', function(e) { +      if (window.applicationCache.status == window.applicationCache.UPDATEREADY) { +        window.applicationCache.swapCache(); +        window.location.reload(); +      } +    }, false);    </script>  </head> | 
