Polyfill-service: Polyfill always fetched from source with 'age' header value higher than 'max-age' header value.

Created on 25 Aug 2017  路  5Comments  路  Source: Financial-Times/polyfill-service

When requesting https://cdn.polyfill.io/v2/polyfill.min.js?features=es5,es6,es7,default-3.6,Object.values&flags=gated&version=latest&unknown=ignore I see the following response headers:

accept-ranges:bytes
access-control-allow-origin:*
age:1099341
cache-control:public, s-maxage=31536000, max-age=604800, stale-while-revalidate=604800, stale-if-error=604800
content-encoding:br
content-length:978
content-type:application/javascript;charset=utf-8
date:Fri, 25 Aug 2017 15:37:54 GMT
server:Cowboy
status:200
strict-transport-security:max-age=31536000; includeSubdomains; preload
timing-allow-origin:*
vary:User-Agent
vary:Accept-Encoding
via:1.1 vegur
via:1.1 varnish
x-cache:HIT
x-cache-hits:1
x-content-type-options:nosniff
x-frame-options:sameorigin
x-served-by:cache-ams4135-AMS
x-timer:S1503675475.984820,VS0,VE0
x-xss-protection:1; mode=block

Because the age value is higher than the max-age value the response is never stored in browser cache and always fetched from the CDN.

Would it be possible to omit the age header?


update

Have done some more research on this. The 'age' header seems to be set by fastly. This seems an incorrect configuration to me as the current cache mechanic for polyfill.io is to store indefinitely in CDN and purge on update. Serving "stale", as indicated by the response headers can't be intentional.

Most helpful comment

The release which has this fix will go out on Thursday 馃憤

All 5 comments

Any news on this? If this is not the right channel to report issues with polyfill.io then please tell how to get in touch with someone who can help me resolve this.

This is the correct channel however, I will look into this next week 馃憤

Thank you for resolving this quickly!

Probably being inpatient ( :-) ) but does this require cache purging before it will take effect or just waiting to be deployed?

Will update if we see this taking effect.

The release which has this fix will go out on Thursday 馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

0x6a68 picture 0x6a68  路  7Comments

stegano picture stegano  路  5Comments

stsvilik picture stsvilik  路  5Comments

hkano picture hkano  路  5Comments

stevesy picture stevesy  路  3Comments