Normally to use javascript in blogger you must use tags like this <script src="Your File Location" type="text/javascript"></script> which means your files are hosted by using third-party services that have limit in bandwidth :( Since there was a problem like that then I am going to explain you how to host the javascript file directly in blogger with Unlimited Bandwidth!
Here are the steps:
1. Copy the entire script in your javascript file and paste in a text editor program, such as WordPad or Notepad.
2. Make a tag like this on your blog template if you want to host the javascript file, where is this tag will paste is depend in your needs!
<script type='text/javascript'>
//<![CDATA[
PASTE YOUR JAVASCRIPT CODE HERE
//]]>
</script>
//<![CDATA[
PASTE YOUR JAVASCRIPT CODE HERE
//]]>
</script>
Copy the javascript code before that you have saved as a text editor program and then paste in the text PASTE YOUR JAVASCRIPT CODE HERE!
3. Save!
Congratulations you have successfully host your javascript file in your own blog!
For example you can see its use in my previous post about how to display related articles, You can understand it by yourself :)
Benefits of this trick:
» No file size limitations
» No bandwith limitations
» Super fast page loading (coz files are stored in blogger itself)
» No file size limitations
» No bandwith limitations
» Super fast page loading (coz files are stored in blogger itself)
Like the trick ? comment.. :)
No comments:
Post a Comment
Let me know what you think..?