【发布时间】:2018-08-13 15:32:38
【问题描述】:
我正在尝试启用缓存以避免在每次需要时重新加载 Messages.properties 文件。
jQuery.i18n.properties({
name: 'Messages',
path: '../capability/',
mode: 'both',
language: 'en',
async: true,
cache: true,
callback: function(){ document.title = Messages.cap_4; }
});
当我在 Firefox 中检查时,即使浏览器仍然多次加载同一个文件,我也会缓存一些带有 304 代码的 Messages.properties 文件。
当我在 chrome 中检查时,每次需要时都会调用所有 messages.properties 文件,并且没有一个文件被缓存。 我弄错了吗?或者这是一个已知的错误?
【问题讨论】:
标签: javascript jquery caching internationalization