17 Jul 2011
Unlimited Bandwidth Image & JavaScript Hosting
Hosting is a vital part of any Website or Blog. In the following tutorial I will be telling you how to host Images (JUST for the sake) and JavaScript files on Blogger platform (with UNLIMITED BANDWIDTH that is). Image hosted on Blogger is no big surprise but the main focus of this tutorial is hosting JS files on Blogger which can be quite useful. The main reason I am doing this post is because ,all the Past posts I have done as well as many of the incoming Future posts that I will do ,use a JS file as their core. This simple trick will do away with all the problem related to hosting JS files on Third Party Servers.Image Hosting on Blogger
Whenever a image is added into Blogger Blog, it automatically assigns a Picasa album to it .These images can then be used anywhere ,that too with unlimited bandwidth.
Steps to Add Images into Blogger
1. Go to Blogger Dashboard ---> NEW POST
2. Click the Compose tab ---> Click on Insert Image Icon ()
Wait for a while till the image is finished uploading.
5. Select the Uploaded image and Click the Add Selected button.
JavaScript Hosting on Blogger
<script src='http://Your-Hosting-Service-Url/Jquery.js' type='text/javascript'/>
But this is well and good until you have Good Hosting Service.There are many free Hosting services Like DropBox and Google Code(Quite Good indeed) but why call it from a external source when you can easily embed it in Blogger itself! To do that observe the following code:
<script type='text/javascript'>
//<![CDATA[
<--Paste all code here from .js file -->
//]]>
</script>
Just in place of "<--Paste all code here from .js file -->" line in above code ,copy the whole content of your JS file(Open the JS File in NotePad and do the Plain Old CTRL+A , followed by CTRL+C ,Then go the place where you have the above code and CTRL+V in the place of the highlighted line [Remove the highlighted line] ).And your javascript codes are now Ready which are now hosted on Blogger itself !
Here I want to make a special mention of the CDN a.k.a. Content Distribution Network whose most common example is googleapis.These CDN are like Super-Duper fast servers which reduce access time with their dedicated bandwidths.
The following is a example of jQuery Framework hosted on GoogleAPIS:
http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js
It is your personal choice whether you want to host your JS file on Blogger or get it through these CDN services or Locally. I personally prefer that these framework be accessed through the Googleapis and the JS file of the Plugin be hosted on Blogger.
Whats Your Take on this ?,feel free to share it.
Til next time,
Prayag Verma
at 15:48