In MSP360 we are trying to make what works best for our customers and custom HTTP headers are no exception. This is something that was brought up many times.
Table of Contents
Why Should I Care About Custom HTTP Headers?
If you are using Amazon S3 to serve your files over HTTP sometimes you need additional flexibility that custom HTTP headers could provide. For instance, if you properly set Cache-Control HTTP header, it will help you to reduce your Amazon S3 bills.
There are two ways you can configure HTTP headers using MSP360 Explorer. You can set up HTTP-headers for the files already located in S3 buckets or configure them right before copying files to S3.
How to Set Custom HTTP Header for Files Already Stored on Amazon S3
1 Just select the file you want to set headers for and right-click it. You will see an option called Set HTTP Headers in the context menu. The same option is available on the toolbar.
2You will get the windows with the list of HTTP headers like the one below. The list shows the headers that are already assigned to the file. Most of them are assigned by Amazon S3 by default.
3If you want to add a custom HTTP header just click the add button and choose the header from the list. You can also type a name of the header manually if it is not there. For our example with will set Cache-Control header.
3Then choose the value for the header from the list. Note that the list is filled with predefined values, but you can always type in your own value.
4Click ok and the new header will appear in the list.
Click ok once again and ok on the confirmation dialog. The header will be applied to the file on S3. Next time someone requests this file from the web browser, the new HTTP header will take effect.
Can I Set Headers for Multiple Files at Once?
Yes! Just multi-select the files that you want to set headers for and follow the instructions above.
How to Set Custom HTTP Headers for Files that I Want to Copy to S3
It is very easy to set custom HTTP headers to the files when they are copied to Amazon S3. When you copy files a confirmation dialog now has Set HTTP headers link. If you click on it the same window will come up and you will be able to manage HTTP headers. Just follow the steps above.
Cache-Control and Amazon CloudFront
When you use Amazon CloudFront service Cache-Control header is becoming even more important. CloudFront edge servers will check S3 to see if the object has changed after the expiration time you set on your object. If you have set no expiration time on your object, the default is 24 hours. When that check is made, if the object is S3 has changed, the new object will go into the edge location.
Besides the caching, we are also looking into GZIP support that will help you to serve compressed files from S3. Not only will it help you to lower your bills but also to serve your content faster!
With the ability to set custom HTTP headers MSP360 Explorer is becoming a compelling tool for Amazon S3 users, in particular to web site developers who want to have granular control on how the files are handled by the web browser. What’s more caching is what can significantly lower your Amazon S3 monthly bills.