Ads Top

How To Store Blogger Codes On Github To Speed Up Blog

how to speed up your blog

Site loading speed is a very important part of On-Page Seo and it is also important because it improves user experience. Fast sites are liked by everyone and slow sites aren't because slow sites make people frustrated. There are several ways to speed up a site as mentioned in "How To Speed Up Your Blogger Blog" But one thing is on the top that is storing extra codes on external sources. It is recommended because when extra and long srcipts or CSS codes are stored on an external sources it reduces the page size and hence speeds up your site. I personally use this trick to speed up my blog and thats the reason why my site is fast even after having ads, gadgets, smart search box, follow model box etc. So I also recommend to store codes on external sources like GitHub.

So this tutorial is about speeding up blogger blog by storing codes on Github.

How To Store Blogger Codes On GitHub?

Step 1: Sign-up a free account at GitHub.

Step 2: Now login to your GitHub account and click on Plus(+) sign on the top right side of the page and choose New Repository.

how to use github

Step 3: Give a title to your repository, write its description and choose Public because if you choose private you have to pay $7.00 per month to upgrade your account. So make it Public and select "Initialize this repository with a README".

hw to create repository in github

Step 4: Click on Creat Repository.

Step 5: Now click on New File beside New pull request to create your first file. For instance see below image:

how to speed up blogger blog

Step 6: Give a title to your file. Remember to include .css or .js after your file name because it will decide your file format. If you do it wrong it won't work.

As an example I am using .css because I want to store a css code.

how to speed up website blogger site

Step 7: Paste or write your code inside the editor and choose soft wrap mode as shown in below image:

how to store codes on github to make blog fast

Step 8: Scroll down the page and leave the two options of naming or adding description to file and choose " Commit directly to the master branch".

Step 9: Click on Commit new file.

how to create file in github to speed up blogger

Step 10: Click on the file you just created.

Step 11: Click on Raw beside Blame on the right side of the page.

how to embed github codes in blogger

Step 12: Copy the link of the Raw page and remove the dot(.) between "" and https//

For instance this is my link now I have to remove the dot between raw and githubusercontent and https://:

My link will now be

Step 13: Now visit your link e.g:

After visiting this link I will get a very different link which is all I need. Here is my link now I can use it in my blog:

Step 14: Go to blogger dashboard and navigate to Template.

Step 15: Search for below piece of code by using Ctrl+F.


Step 16: Copy one of the below code with respect to your file format and paste it below <head>.

For CSS: <link rel="stylesheet" type="text/css" href="http://yourcode.css"/>

For Javascript: <script src="http://yourscriptlink.js"></script>

Step 17: Replace the link with the link of your Raw file which you stored on GitHub. I will use the CSS caller and replace http://yourcode.css with my GitHub link like this:

<link rel="stylesheet" type="text/css" href=""/>

Similar to it for Javascript I will use the Javascript caller.

Step 18: Click on save template and you are done!

You can store as many files as you want on your repository. You don't need to create a new repository for each file you can start storing new files by following step 5 to 18.

I hope you like this post. Read more tips to boost your blog speed here.

Follow and subscribe to get latest blogging tips and tricks in your Email inbox. Share this post with others and help my blog grow.

Share your views about this article by leaving a comment below. If you have any question about this post ask me or contact me.

Search Tags: Improve blog speed, How to Speed up blogger blog, store code on GitHub, How to use Github,page loading speed tips for blogger,on page seo,101helper tips and tricks,free storage for blogger,how to use GitHub as external source.


  1. There is no plus beside the new repository I created. I think they have made sight change to the website design. but they have "file name"

    1. Yes you were right Robert, they have made some changes so I updated the post now you have to click on "New File" to create your file.

  2. How do I know the kind of code to store for my blog. I am using blogger. .css or.js or what? please help. thanks

    1. Let me clear what is a css file. If there is a style opening and closing tag like this < style> and < /style> then its a css code. In blogger you can find most of css codes above < /b:skin>.

      And to identify a javascript code you will see an opening and a closing tag like this < script> and

      So you have to specify whether you are storing a css or a javascript code thats why you have to use .js for javascript and .css for css

  3. If you have any other question ask me. I will create a video tutorial soon to make it easier for you

    1. How do I get code for no. 7? I don't know how to write code. where do I get the code from?

    2. You can find extra codes in your template and store it on github. Moreover if you are installing a gadget you can store its css or javascript codes.

  4. great post that reduce a lot of loading time

  5. Hey men, this is the FIRST article which really helped me by speeding up my blog. I tried so many tricks and nothing helped, i want to thank you, because it really works, and there is a huge difference in speed now when i visit the site/blog.

    1. Its really good to know that this post helped you, thanks for your feedback it helps me to improve my posts!

  6. this is a very helpful post that you have described here. thanks

  7. This is very helful to me because I have read lots of post concerning storing of css and js codes on github but I was not getting it right,and immediately I think of coming to 101helper to use the blog search bar and search what am looking. After searching then unfortunately I landed here an for get exactly what I was looking for with good explanations. Which I hereby say a very big thanks to fahim raza.

  8. A have a question fahim....
    Can I store all my blog css codes inside one Repository folder in github? And can I edit and update my codes at anytime?
    Please answer...

    1. Thank you very much for appreciating my work, yes of course you can update codes anytime and after updating you have to click on "view" and then make simple link as shown in this post i.e if your link is you have to remove "dot" between raw.git and also remove hubusercontent , now your link will be but as you make link to updated version you will have some numbering in the new link like 3457bgaj768882 etc.

    2. Hello Fahim..
      Thanks for the quik response, do you mean anytime I update or add some css code to my .css folder which i ealier created,must I view the raw file link and copy it to my blog head section again and again when ever I made any changes to my css?

    3. Exactly because you have to update link to load an updated version.

  9. Thank you very much very helpful inded.....

  10. Hello, I looked for a trick like that since a long time. And I found your blog only this week! It can be very helpful.
    I have some questions about the CSS/JS outsourcing, if you have some time to answer.

    If I have conditional CSS code in my template, (for exemple, if I'm on the main page I have some CSS and if I'm on a post page I want to use another CSS), can I create one CSS per section and can I add the "link" code of each CSS file under my conditional tag?
    The same if I want to put the js code or css code of widgets. Do I have to create one file per widget? Is it recommended to have many files?
    And last question. Is it possible to use the same trick if I have some javascript in the "body" of my template.

    Best Regards,

    1. Yes you have to create different css and JavaScript files. If you are making a css file for main page then allow it only in main page by using blogger xml codes to show or hide a gadget on specific pages. You can find a post about how to show or hide a gadget in blogger specific pages in this blog(use search). After creating your css files show one for main and other for post pages. I have done it in this blog. You can also find a video tutorial about it on 101Helper YouTube channel.

    2. Thank you.
      I'll look for this tips on your blog and try to apply.

    3. Hello Fahim,
      For your information, at the step 13: stopped since October 2018. It's no longer possible to use this trick (see
      I used jsDelivr to do the same thing from the rawgit url in my tests.

    4. Thank you for informing me bro but it still works. I am using it in my blog just view this page source you will find also you can use


Powered by Blogger.