I tried to execute the following set of coding which is already in w3schools
index.html has the following codings
<!DOCTYPE html>
<html manifest="demo_html.appcache">
<body>
<script src="demo_time.js"></script>
<p id="timePara"><button onclick="getDateTime()">Get Date and Time</button></p>
<p><img src="logo.jpeg" width="336" height="69"></p>
<p>Try opening <a href="index.html" target="_blank">this page</a>, then go offline, and reload the page. The script and the image should still work.</p>
</body>
</html>
demo_time.js contains the following
function getDateTime()
{
var d=new Date();
document.getElementById('timePara').innerHTML=d;
}
demo_html.appcache contains the following
CACHE MANIFEST
CACHE:
/index.html
/demo_time.js
/logo.jpeg
".htaccess" file contains the following
AddType text/cache-manifest .appcache
Please point out the mistake in this code. When i executed the code in my browser, firefox prompted me to This website is asking to store data on your computer for offline use. Allow, never for this site or not now. I choose Allow, but the prompt did not disappear even then.
When i tried the same in w3schools.com, the prompt disappeared after i clicked Allow. Please point out the mistake in the above code