Comments (4)
What is the problem with having both MaxAge and Expires set (assume they're set with correct values)?
from combres.
The main problem is that the Expires header does not get updated in a CloudFront distribution. Let's say we expires a file in a week, the first request from the CDN will be ok. It will have an expires header one week ahead and the CDN will automatically decrease the max-age of the file as we go close to the expiry date.
Assume we don't do any modifications on the server. When we pass the expiry date, CloudFront will refetch the file from the web server. Combres will, correctly, return a "304 not modified" since the etag is the same. CloudFront now resets the max-age counter to be valid for another week. But, the Expires-header remains unchanged. CloudFront keeps the cached versions of the headers as well as the content. So, now we have a valid max-age header but an Expires header that's in the passed.
from combres.
That makes sense. Thanks for clarifying. I will remove the expires header.
from combres.
Now that I look at it more closely, from the HTTP 1.1 spec, it says that:
"If a response includes both an Expires header and a max-age directive, the max-age directive overrides the Expires header, even if the Expires header is more restrictive." (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html)
I suppose even if CloudFront doesn't set the correct Expires header, it shouldn't affect HTTP 1.1 agents. As for HTTP 1.0 ones, they wouldn't benefit from caching anyway if Expires header isn't set. At least having it set help those that don't use CloudFront.
Thought?
from combres.
Related Issues (20)
- Change in the URL format HOT 7
- Syncronization of last modified date on the response header. HOT 1
- Caching, versioning, and CDNs HOT 3
- Support mixing Less and CSS in the same resource set HOT 4
- WebExtensions.CombresLink("resourceSetName") throws System.ArgumentException and WildCard Support HOT 3
- change in files causes application pool restart HOT 1
- Update library dependencies HOT 5
- Combres can not minify AngularJs HOT 6
- Support all properties of Ajax Min
- Configs for YuiCssMinifier and YuiJSMinifier incorrect and cause exceptions HOT 1
- Custom css minifiers
- CombresHandler.ProcessRequest throwing ArgumentException with no discernible pattern. HOT 7
- dotLess strictMath mode not configurable HOT 4
- Nuget update HOT 1
- NuGet packages use strict dependency versions
- Calls to CombresLink are case sensitive - could this be changed? HOT 2
- combre 获取到的js版本内容是旧的,没有更新
- Failing to load resource set in v2.3.0.4 with .NET 4.5.2+ and MVC5 HOT 4
- Combres does not support ECMAScript2015 HOT 1
- transpile JS via babel before minifying
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from combres.