In this post we will look at:-
So let’s see the methods and tips for using scripts in Blogger blogs.
As Blogger do not allow any file uploading in its server you have to use a external script.
It is good for loading the large and heavy JavasSripts like, jQuery. But if the scripts are short and small sized and you want to load them from the Blogger blog itself then follow the Method-2 for widgets and Method-3 for template.
Explanation: As you can see the difference from the method-1; no
For hosting and running you script from your Blogger template;
Explanation: See on the above code the parts
//]]> are added. As you know that the blogger template is a XHTML format which can parse all the snippets as XML. So characters like “
<” and “
&” inside a script will not be allowed. And will generate an error while saving your template in Blogger. To avoid this problem
//]]> are added.
//]]> (line-3,) and it will load in your template.
//<![CDATA[ is a new line. If you do not then your script will be treated as a XML comment and the scrip will not load.
An example of this error:-
If you do this your script will not load in Blogger.