我尝试从我的Web应用程序缓存一些文件。目前我使用grunt将版本放在我的资源上:myFile.js? <版本>
但是在Chrome控制台中,我可以看到它没有从缓存中加载:
这是我的index.html:
<head>
<!-- Meta -->
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="mobile-web-app-capable" content="yes">
<!-- Infos -->
<link rel="icon" sizes="192x192" href="FrontEnd/Ressources/img/logo-app.png" />
<link rel="shorcut" sizes="192x192" href="Ressources/img/logo-app.png" type="image/x-icon" />
<link rel="apple-touch-icon" href="FrontEnd/Ressources/img/logo-app.png" />
<!-- Javascript -->
<script src="FrontEnd/Ressources/js/XXXX.min.js?ver=@@XXXX-source-version"></script>
<script src="FrontEnd/config.js?ver=@@XXXX-source-version"></script>
<!-- CSS -->
<link rel="stylesheet" media="screen" type="text/css" href="FrontEnd/Ressources/css/XXXX.min.css?ver=@@XXXX-source-version" />
</head>
如何减少加载时间,是否从缓存加载(可能就像这个文件一样)?