I am optimising the page load time for my site. After a bunch of changes, the load time had decreased.

As suggested by a lot of people, I decided to use Amazon's S3 to store and serve my static content.

This increased the page load time by almost a whole second. Why does this happen and how can I optimise the same?


Should you be using Amazon S3 or CloudFront? CloudFront is the CDN that accelerates the delivery of static assets.

| improve this answer | |
  • You are right, using CloudFront seems to be a better option than using S3. – bcosynot Oct 21 '12 at 18:35

The S3 server could be farther away from you and so it takes longer for the bytes to travel to you. Using Cloudfront or another CDN puts your content on very fast servers all across the world which will increase the speed not just for you, but for users all over no matter where they are located.

Cloudfront also supports compression all though you have to make sure it is enabled.

Another thing you could try to do is use image sprites and condense static CSS and Javascript into as few files as possible.

| improve this answer | |

Moving images from one host to another isn't enough. First are your images compressed and optimized? Second you should be using a CDN as well as s3 together not just serving static content from s3. The CDN's will cache the static content coming from s3 and serve that to your visitors quicker than s3 would.

| improve this answer | |
  • Right. But using a combination of S3 and CloudFront will turn out to be really costly for the kind of bandwidth we use. I guess we might experiment around a little. – bcosynot Oct 21 '12 at 18:37
  • Look at the file sizes and compressing them as much as possible without losing quality. CloudFlare.com has a free plan cloudflare.com/plans if cost is an issue which it seems to be start with their free plan. – Anagio Oct 21 '12 at 19:19

Jeremiah is right, you should choose solution that is geographicly optimized for you and your users. In case you ll deliver e.g. from US and you have bunch of customer in India, load time will be decreased. What kind of static content do you have? Images compression and optimalization as said above should be easiest and quiet helpful solution, but imho you can optimize also storage of other content.

And ye, you should combine with some CDN, for price/power/portfolio comparation you can check e.g. CDN Planet, to find the best for you.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.