[英]How to set request headers for all js-files for caching in extjs?
.js-files are downloading from server side but not from browser cache every time I reload a page with the following headers: 每次重新加载具有以下标头的页面时,.js文件都是从服务器端下载的,而不是从浏览器缓存中下载的:
Response headers: Cache-Control:max-age=31556926
Request headers: Cache-Control:max-age=0
If I click somewhere to load a new panel which was already loaded before page reload, this panel (its .js-file) will be received from the cache. 如果我单击某处以加载新的面板,而该面板在页面重新加载之前已加载,则将从缓存中接收到该面板(其.js文件)。
If to reload this page which already contains that cached panel, all the .js-files including that panel will be once again downloaded from the server. 如果要重新加载已经包含该缓存面板的页面,则包括该面板在内的所有.js文件都将再次从服务器下载。
I'm using Chrome for debugging, "Disable cache" checkbox is not checked. 我正在使用Chrome进行调试,未选中“禁用缓存”复选框。
The question is how to force all .js-files including ext-all.js be cached after the page reload? 问题是如何在页面重新加载后强制所有包括ext-all.js的.js文件进行缓存?
Could the server side be a cause? 服务器端可能是原因吗?
AFAIK,当按下(或调用)浏览器重新加载时,页面的所有组件始终从服务器(而不是从缓存)加载。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.