Skip to main content

How to Externalize Your Blogger Stylesheet?

Do you want your blog to load much faster than it does now? In that case, you can go for external CSS stylesheets. In this tutorial, we will deal with externalizing the stylesheet on Google's Blogger platform. I have been working on putting the stylesheet on my blogs on an external server for some time. Here is the tutorial for you.

Blogger Template Stylesheet


For analysis, let’s look at this blog: RedBugle (redbugle.blogspot.com). The basic design of the blog is this right now:

redbugle.blogspot.com

I have used the Awesome Inc., template of Blogger as you can see. The goal is to achieve the same look and effect after externalizing the blog’s stylesheet. By the way, CSS (Cascading Style Sheet) is a part of the HTML markup that contains the information as to how the blog displays on different user agents (browsers). In Blogger, the entire stylesheet that you can customize and change according to the need is contained in between these two tags: '<b:skin><![CDATA[' and ']]></b:skin>'. So your first task is to find these tags. Look at the image below:

stylesheet code on blogger

The stylesheet includes the ‘/*’ that comes right after CDATA[.

Several bloggers and technicians out there have been advising to cut the data in between these tags (<b:skin><![CDATA[ and ]]></b:skin>) and paste it into an external file to create the stylesheet. Say, you followed that advice, then your blog will look like this (we will come to hosting and other stuff later).

blog without css loaded

As you can see, the blog has no design whatsoever. The external stylesheet simply didn’t work.

The actual stylesheet of Blogger is not between <b:skin> tags. What goes in between these tags is just a precompiled version of the CSS that has some Blogger specific code.
Why did this happen? Because the actual stylesheet of Blogger is not between <b:skin> tags. What goes in between these tags is just a precompiled version of the CSS that has some Blogger specific code. You can get the actual stylesheet only from the page rendered on a browser, from the HTML source code. Go to your browser, and get to the source code of the blog. You will find <style> </style> element in here. What goes in between these is the actual CSS stylesheet that you need to use. Copy this code.

Now, create a text file on your desktop and name it whatever you want. Just put the extension of the file as ‘css’ instead of ‘txt’. (You can see extensions of files by going to Control Panel->Folder Options->Uncheck ‘Hide extensions of known file types’). Paste the entire CSS code into this text file and save it.

Hosting the CSS File


In order to host the CSS file, you can either use your hosting service provider (if you have one), or you can get it hosted for free with Google Sites or a cloud storage service like Dropbox.

1. Google Sites


If you are using Google Sites, just sign into the service and create a website. Click on ‘more’ on the top from within your site, and click on ‘Manage site’. Here, click on ‘Attachments’ and you will see the upload button. Upload your CSS file into this hosting server.

google sites manage option

Now, just right-click on ‘Download’ and get the public link of the CSS file. This is the one you are going to use for the external call.

2. Using Dropbox


If you are using Dropbox, just download the application and set it up. Sign up on Dropbox, and enable syncing of the Public folder (this will be automatically created by Dropbox). Just copy and paste your CSS file into this folder and it will be automatically synced with Dropbox server in a few moments.

From the Public folder, right-click the CSS file and from the Dropbox menu, get the public link of the file. This is the URI of the CSS that we are going to use with the blog.

Putting Stylesheet Into the Blog


As a first step now, just delete everything between the <b:skin><![CDATA[ and ]]></b:skin> tags. Find the closing of the head tag; search for </head>. You need to add a link tag over here. The link element you are adding here is the one used to call an external stylesheet. The completed code looks like this:

<link rel=”Stylesheet” href=”StyleSheetFile.css” type=”text/css” media=”all”/>
</head>

‘StyleSheetFile.css’ should be replaced with the actual link to your CSS file. Save the template.

There you go! Now, just check the blog in all browsers and see if the CSS is showing up properly. The external CSS file will increase the blog load time for subsequent page views, as the CSS file gets cached once it has been loaded into the browser.

Popular posts from this blog

Technologies on Smartphones That You Should Look For

Apple has unveiled two underwhelming products with iPhone 5S and 5C . That was the major news for the last week. Although the devices completely lacked any inspiration, they have included two very important things—the touch ID sensor for security and the 64-bit architecture for better computing. Earlier we also mentioned what Apple should have done . In Android devices, we have a huge number of innovations too that we got to see in the past few months. In this article, let me discuss a few innovations that you have to look for in your next smartphone. 1. NFC Near Field Communication has always been regarded as a cutting edge technology. You can’t throw a stone now without hitting an Android device with NFC technology. It is a secure way that devices can connect by simply bringing them together. Right now, NFC has yet to find applications in the current smartphone market. The technology is not new, although it has yet to have any big applications. However, NFC has its importance....

Five Great Alternatives for iGoogle Home Page Portal

Google’s popular home page service, iGoogle will be retired on November 1st, 2013. That’s a little over a year of managing your home page through this service. It came as a great disappointment to me since I had been using the service for a long time. I have a nice home page set up in iGoogle with news from BBC, CNN, and others; my calendar; a widget for time management; topic-specific news on technology, stock quotes, weather; and some other interesting stuff. It was a page that I woke up to for many days. It seems obvious that the popularity of home page services has been coming down in the recent years; another popular service in this arena, Netvibes has turned into something else entirely. I could have turned my attention to Netvibes after they retire iGoogle, but that won’t happen now. I will miss Google’s home page, and before that I want to find out another portal service that I could love as I do iGoogle. In search for one, I found these great services which can replace iG...

A Tablet Running Both Windows and Android Side By Side

The latest innovation from Samsung is the ATIV Q tablet, a streamlined 13-inch tablet that is extremely powerful and not that chunky for a tight competitor to the likes of Microsoft Surface Pro. It is thin, extremely powerful, and has a large brilliant QHD resolution screen, which is higher than Full HD. QHD is 3200x1800 pixels, while FHD is 1920x1280 pixels. Let’s take a brief look at this device. Technical Specifications The tablet-laptop mash-up is not yet in the market. We may update this post as it is made available in the market. Here are the brief technical specifications of the tablet. Display 13.3 inch; 3200x1800 px (the highest in the market); 16 million colors Processor Intel Haswell Core i5 processor (details unknown) RAM 4 GB Graphics Intel HD 4000 Storage 128 GB SSD Battery life 9 hours of usage Operating system(s) Android 4.2.2 Jelly Bean; Windows 8 ...