I did some Html5 application cache tests on Android Chrome browser and desktop Chrome browser.
The manifest url
/appcachetest/Main/AppManifest:
CACHE MANIFEST
# Version: 3
NETWORK:
*
CACHE:
Main
Main/Page1
Main/Page2
Scripts/jquery-1.10.2.js
#FALLBACK:
@{
Layout = null;
Response.ContentType = "text/cache-manifest";
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetExpires(DateTime.MinValue);
Response.ContentEncoding = System.Text.Encoding.UTF8;
}
The Main Index page:
<!DOCTYPE html>
<html manifest="/appcachetest/Main/AppManifest" type="text/cache-manifest">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title> - My ASP.NET Application</title>
<script src="/AppCacheTest/Scripts/jquery-1.10.2.js"></script>
</head>
<body>
<iframe src="Main/Page1" style="border: 0; width: 100%; height: 100%"> </iframe>
</body>
</html>
I tried the steps shown below :
Is there any working solution to load JavaScript file from application cache when refreshing page? How to make it work?
Thanks, Bo
I finally knew the issue which cause unable to load JavaScript file from Manifest Cache.
It is the cached URL in Manifest file is case sensitive, I was not aware of this until spend two days time.