Wednesday, March 18, 2015

Free Hosting on Content Delivery Network & A look at it's headers

So, CDN's are becoming more and more popular these days with easy access to amazon web services (I have to do a quick shout out to my employer! Even though I am at the Lex1 fulfillment facility) as well as the HP Public Cloud, CloudFlare, Rackspace, Akamai, etc etc. BUT did you know there are easy work arounds (we can call them life hacks, pun definitely intended) where you can host the images on your website on a CDN for free to speed up your own site.

Simply put, because so many of these sites are using CDN's when you host an image on a site like facebook, twitter, etc, as long as you have very easily accessible security settings you can often find the CDN the image is hosted on and use that link to host it on your own website, therefore making your images, and your website as a whole load faster. For an example, I posted a public photo that I have shared on facebook below with an example showing the fbcdn.net domain so you can see what I'm talking about:


And boom! Now image hosting all the banners, backgrounds, button icons, etc that you use in your html for your website with "public" settings, copying and pasting the cdn domain, and building your website like that! Free content delivery! So try it out, and let me know if it works. Also, this may be able to go to all sorts of media, because there are free services for anything now days!

Now for those of you more curious about fbcdn (the facebook content delivery network), I just checked the server headers of the site (using the image above) and this is what was returned:


Last-Modified: Tue, 01 Jan 2008 00:00:00 GMT
Content-Type: image/jpeg
Timing-Allow-Origin: *
Access-Control-Allow-Origin: *
Expires: Wed, 01 Apr 2015 20:19:56 GMT
Cache-Control: max-age=1209600, no-transform
Date: Wed, 18 Mar 2015 20:19:56 GMT
Connection: keep-alive
Content-Length: 50669

Nothing really unexpected, but an excellent look under the hood of a CDN! Hope you enjoyed the post, and I hope you all have a fun time with this!

No comments:

Post a Comment