我使用google CDN和google负载均衡器,它有几个后端服务,每个服务都有不同的google CDN设置,如下所示。
service A: google CDN disabled (API server)
service B: google CDN enabled, 1day (Cache-Control: public, max-age=86400), cache-key: full URL
service C: google CDN enabled, 1year (Cache-Control: public, max-age=31536000), cache-key: full U
我可以为某些用户减少毫秒的加载时间吗?
修复一个合适的版本x of jQuery,比如x = 1.4.1,并找到用户缓存的最新版本y jQuery。然后,
if (y > x === true) {
/* Use the cached version y of jQuery */
} else {
/* Download and use the latest version of jQuery */
}
另外,这是否有利?