local-cdn icon indicating copy to clipboard operation
local-cdn copied to clipboard

Local CDN response resource without cache header

Open lawrenceching opened this issue 8 years ago • 2 comments

Hi, dev of local-cdn,

I noticed that local-cdn return resource very simply without any cache policy header. It leads to browser request data every time.


Test Case: Use chrome to visit getbootstrap.org, measures how much time chrome spend to load jquery.min.js

First time: 498ms Second time with local-cdn disabled: 78ms (from disk cache) Second time with local-cdn enabled: 254ms

lawrenceching avatar Feb 17 '17 19:02 lawrenceching

I am not sure if setting cache is possible when you are redirecting to a local resource.

On the test page getting each resource takes like 20ms See, https://cdn.rawgit.com/james-fray/local-cdn/master/test/text.html

james-fray avatar Feb 19 '17 08:02 james-fray

screen shot 2017-02-19 at 12 00 48

james-fray avatar Feb 19 '17 08:02 james-fray