Don't set "Expires" header
Categories
(Developer Infrastructure :: Source Documentation, defect)
Tracking
(firefox82 fixed)
Tracking | Status | |
---|---|---|
firefox82 | --- | fixed |
People
(Reporter: marco, Assigned: ahal)
References
Details
Attachments
(1 file)
The "Expires" header doesn't actually specify when an S3 object will be removed, but (from https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3.html) it specifies The date and time at which the object is no longer cacheable. For more information, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21 .
.
So https://searchfox.org/mozilla-central/rev/62c443a7c801ba9672de34c2867ec1665a4bbe67/tools/moztreedocs/upload.py#148-158 can be confusing and doesn't have the intended effect, it only makes S3 notify the browser that the object must be refreshed.
The only way to expire objects is to define object expiration rules in the lifecycle configuration policy of the bucket (https://aws.amazon.com/blogs/aws/amazon-s3-object-expiration/).
Comment 1•5 years ago
|
||
Andrew, are you the one who can take care of that? thanks
Assignee | ||
Comment 2•5 years ago
|
||
Sure, I'll take a look.
Assignee | ||
Comment 3•5 years ago
|
||
As per:
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3.html
This header doesn't actually control when an object gets deleted. Rather it is when the object
expires in the browser cache (i.e, when the expiry is hit, the browser will reload the object).
Remove this as it's only causing confusion.
Comment 5•5 years ago
|
||
bugherder |
Updated•3 years ago
|
Description
•