CrossFTP Knowledgebase
Search:     Advanced search
Browse by category:
Contact Us

How to setup custom metadata headers for Amazon S3 objects with CrossFTP?

Add comment
Views: 10180
Votes: 4
Comments: 0
Posted: 19 Sep, 2009
by: Admin A.
Updated: 03 Nov, 2009
by: Admin A.

If you are using Amazon S3 to serve your files over http, you will get an additional flexibility to 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

You can set up http-headers for the files already located in S3 buckets. Just select the file you want to set headers for and right click it. Choose Properties... from the context menu, and you will see the Metadata table in the Advanced tab


The content of the metadata Table shows the headers metadata that are already assigned to the file. Most of them are assigned by Amazon S3 by default.



If you want to add a custom http header metadata, just click + button and type a name/value pair for the header.


 Click ok and the new header will appear in the Metadata Table. Click Commit, and 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. If you want to apply for the subfolders as well, toggle the option "Apply changes to subfolders". 

Commonly Used HTTP Headers for Cache:

See http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html for more details.

  • Expires:
      Key: "Expires" 
Value: HTTP-date

An example of its use is

      Expires: Thu, 01 Dec 1994 16:00:00 GMT
      Note: if a response includes a Cache-Control field with the max-
age directive (see section 14.9.3), that directive overrides the
Expires field.
  • Cache-Control:
    Key: "Cache-Control" 
Value: cache-directive
    cache-directive = cache-request-directive
| cache-response-directive
    cache-request-directive =
"no-cache" ; Section 14.9.1
| "no-store" ; Section 14.9.2
| "max-age" "=" delta-seconds ; Section 14.9.3, 14.9.4
| "max-stale" [ "=" delta-seconds ] ; Section 14.9.3
| "min-fresh" "=" delta-seconds ; Section 14.9.3
| "no-transform" ; Section 14.9.5
| "only-if-cached" ; Section 14.9.4
| cache-extension ; Section 14.9.6
     cache-response-directive =
"public" ; Section 14.9.1
| "private" [ "=" <"> 1#field-name <"> ] ; Section 14.9.1
| "no-cache" [ "=" <"> 1#field-name <"> ]; Section 14.9.1
| "no-store" ; Section 14.9.2
| "no-transform" ; Section 14.9.5
| "must-revalidate" ; Section 14.9.4
| "proxy-revalidate" ; Section 14.9.4
| "max-age" "=" delta-seconds ; Section 14.9.3
| "s-maxage" "=" delta-seconds ; Section 14.9.3
| cache-extension ; Section 14.9.6
    cache-extension = token [ "=" ( token | quoted-string ) ]

Conclusion

With the ability to set custom http headers CrossFTP Pro 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 web browser. The more important thing is that, caching can significantly lower your Amazon S3's monthly bills.

Others in this Category
document ASCII and Binary transfer mode
document What is FXP (Site to Site) transfer?
document Password Protection
document Whether CrossFTP Pro provides the advanced security for FTP transportation?
document How to change to the Stream mode?
document Amazon CloudFront Distribution
document Amazon S3 Support
document Edit Remote Files in CrossFTP
document Fast filter and search the file in list
document Manage FTP sites by FTP command
document How to change the files' default Mime types for Amazon S3 in CrossFTP?
document Reset configurations for CrossFTP
document Mutli-Thread Transfer
document Schedule Transfers in CrossFTP
document MobileMe iDisk Support
document Sun Cloud Storage WebDav/HTTPS Support
document Protocols Supported in CrossFTP Pro
document FTP and FTPS Support
document SFTP/SSH Protocol Support
document WebDav and WebDav/HTTPS Support
document How to Use CrossFTP by Command Line?



RSS