Showing posts with label amazon. Show all posts
Showing posts with label amazon. Show all posts

Wednesday, August 17, 2011

Hosting favicon.ico on a different server (Amazon S3)

To increase the performance of our very simple Where is Croydon test site static assets are hosted on S3.

One of the assets that is requested for a site is favicon.ico the icon is used against the site name in browsers (normally to make spotting it among many tabs easier). By default this is requested from the root of the site, however this can be changed by adding:
<link rel="shortcut icon" href="http://static.chart.is/favicon.ico" />
to each page (head element) on the site.

To host it on S3 requires a bucket matching the domain name, and mapping a CNAME to point to the amazon end-point. In this case using a "static" sub-domain to host these kinds of static assets. Note: if you get "Access Denied" from these its probably because of permissions for "Everyone" to open/download are not set (per asset).

Doing this means the browser can use a separate connection to retrieve the icon, and therefore process the download in parallel with other content. Its worth considering multiple sub-domains if you have many static assets. This also has the benefit of reducing requests to your site's servers, and improving server-side cache hits as well.

During testing of this a little "feature" of chrome was discovered, it requests "/favicon.ico" from you site if you do a "view page source" - even if you specify a different location.

Friday, November 14, 2008

Blogging, the first 30 days

Actually not the first 30 days, as I did not get round to putting a tracker on my site for quite a while...

Anyway the last 30 days look like:

So on an average day I was getting about 30 people looking at my blog - in the last few days my seyes entry has gone on the silverlight gallery which has generated a relatively large increase in traffic.

I've also made a killing on the revenue front - £3.82 from selling computer books and $0.37 from advertising. I think I can retire now ;-)

The most suprising thing is how much I'm using my own blog - it works very well as an aide-memoire, especially for code snippets, tools or links.. I used to think that blogging was a bit of a wierd thing to do, but now I understand the atraction. Its also made me learn and interact with a whole new set of tools and technologies.

So in summary, its been good so far!