3 ms·
Horrible horrible horrible set up! Firstly, they're preventing browser caching of the images, which means they get reloaded at every single page load. These ar
by pierrefar 17y ago
Horrible horrible horrible set up!
Firstly, they're preventing browser caching of the images, which means they get reloaded at every single page load. These are the headers I'm getting:
HTTP/1.x 200 OK
Cache-Control: private, max-age=0
Date: Sun, 13 Dec 2009 11:09:59 GMT
Expires: -1
Content-Type: text/html; charset=UTF-8
Server: gws
Content-Length: 0
X-XSS-Protection: 0
Note the lack of E-Tags too.
Also, why hotlink from another domain that will need another DNS lookup? Add enough of those and you'll slow down the page load significantly.
Finally, this doesn't seem to be a CDN so it's unlikely users around the world will actually see fast download times from this single server.
- progrium 17y agoBoth good points. We're on it.
- ptarjan 17y agoThanks for the comments. I'm not seeing the same headers as you on the images. Were you talking about the HTML pages? wget -S http://www.stdicon.com/pdf --2009-12-14 02:31:48-- http://www.stdicon.com/pdf Resolving www.stdicon.com... 74.125.53.121 Connecting to www.stdicon.com|74.125.53.121|:80... connected. HTTP request sent, awaiting response... HTTP/1.0 200 OK Content-Type: image/png Expires: Mon, 21 Dec 2009 10:31:48 GMT Cache-Control: max-age=604800 Date: Mon, 14 Dec 2009 10:31:48 GMT Server: Google Frontend Content-Length: 11999 X-XSS-Protection: 0 Connection: Keep-Alive Length: 11999 (12K) [image/png] Good point on the E-Tag. that will help in the 1 week expiry. I'll add that. And it is using Googles app-engine as a CDN. Is there better free CDN that you would prefer? You can always use coral cache if you like: http://www.stdicon.com.nyud.net/pdf http://www.stdicon.com.nyud.net/pdf I don't think the DNS problem is really a problem but you are welcome to proxy from your own static image domain if you are concerned.
- pierrefar 17y agoI got the headers by right-clicking on some image links and seeing what I got. Can't reproduce it right now. Apologies if there was a brain freeze moment. I've been thinking about how to best do this over the weekend and the approach I cam up with is this: Use Cloudfront (Amazon's CDN) and use custom CNAMES for S3 buckets. An S3 bucket would be an image library (say tango.stdicon.com) and so the subdirectories of this Cloudfront subdomain would be the images sizes (tango.stdicon.com/48/foo). This sets up a nice CDN with proper headers and a scalable way to add more libraries (just add subdomains). This also has the "very advanced use-case" advantage: website owners can CNAME to the same library subdomain multiple times (say assets1.mysite.com assets2.mysite.com and assets3.mysite.com) and let the browser download images in parallel. See these two refs: 1. http://www.stevesouders.com/blog/2008/03/20/roundup-on-parallel-connections/ http://www.stevesouders.com/blog/2008/03/20/roundup-on-paral... 2. http://www.websiteoptimization.com/speed/tweak/parallel/ http://www.websiteoptimization.com/speed/tweak/parallel/ Would love to talk more if you're interested. Email address "encoded" in my profile page.