Poll: How fast do the images load on my app?
Summary: http://doleaf.com - How fast do the images load?
I'm trying to get Amazon CloudFront set up as my CDN, and I'm trying various tricks like using multiple CNAMEs to trick the browser into opening multiple connections to CloudFront. So far, everything has just made it slower, so I'm back to a single CNAME, but even that is kind of slow.
Please go to http://doleaf.com and see how long it takes to load all the plant images. It's tough for me to get a clear idea since there are many levels of inter-related caching going on (DNS, CloudFront, browser, etc.)
14 comments
[ 3.1 ms ] story [ 33.8 ms ] threadThanks.
Regarding the initial delay, I have a suggestion. The way the page is including your Javascript files is likely causing more of a delay than you are saving using CloudFront. Really easy to fix though:
Combine base_packaged.js, application.js, and listings.js and move the combined <script> tag to the bottom of the page, right after your </div> tag for #footer-wrapper. base_packaged.js alone is 252 KB, and the browser will block until its finished downloading. This means it won't be rendering any elements which occur after the script include until the download completes. Because your include is in the head the user sees nothing but the title until the script has downloaded. Importantly your img tags aren't rendered yet, and so the image downloads aren't starting for several seconds, during which time the user is left with no feedback.
Generally, move every script to the bottom of the page unless there's a reason you can't (e.g. you're using document.write to render page content).
Here's a screenshot of the Firebug net tab: http://img155.imageshack.us/img155/5097/doleaffirebug.png
This advice has been extremely useful.