How to Remove Blogger Default CSS & JS


Ads by Sammyloaded Media Get Paid $10 To Complete a Survey $1000 Per Week For a Part Time Job (U.S.A Only) Boost Your Social Media Engagement Get a FREE PS5 Now! Make Your First $100

Blogger generates certain useless stuff, such as CSS and Javascript files, for its blogs. These files make the blog larger, take longer to load, cause render-blocking, and lower the PageSpeed Insights score. This post will show you how to properly remove Blogger’s default CSS, JS, and widget javascript.

This will improve the user experience and speed up the page load time. We’ll also talk about the pros and cons of removing these files, so read the entire article.

Why should we remove the default CSS and widget Javascript?

Are you facing render-blocking or an issue with the page speed of the Blogger blog? Then, you can perform this method of removing the default JS and CSS and preventing the scripts from loading.

These could be reasons for Blogger auto-generating CSS and Javascript files: When you create a Blogger blog, it is not that appealing design. So to give a decent look to Blogger, blog themes are used. These themes have their styles and javascript to perform their function.

In that case, the CSS and JS generated by Blogger is unused. These files take extra space and extra size, which slow down the Blogger blog. To make a website fast, you need to remove all unnecessary elements that the Blogger blog does not use.

Also Read:  How To Turn Off/on Microsoft Viva Insights

But removing these contents, like widget javascript, will limit the Layout of Blogger. Luckily, this article will also help you overcome such limitations.

Remove Blogger default unused CSS

To remove the default CSS of a Blogger blog, you’ve to edit the Blogger XML theme file. Now check the <html> tag in the theme, add css='false' into this line, and done. You removed the unused CSS of the Blogger blog. The Codes will look like this.

Before making any change, the theme code will look like

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html>
<html b:defaultwidgetversion='2' b:layoutsVersion='3' b:responsive='true' ......>

After making the changes in the code to remove CSS from the blog. Code will look like

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html>
<html b:css='false' b:defaultwidgetversion='2' b:layoutsVersion='3' b:responsive='true' ......>

Remove default widget Javascript from Blogger.

To remove the default javascript js file from the blog footer. So that users can experience fast browsing. Add b:js='false' in the <html> tag as shown below.

After making the changes in the code to remove JS from the blog. Code will look like

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html>
<html b:js='false' b:defaultwidgetversion='2' b:layoutsVersion='3' b:responsive='true' ......>

You’ve to save the theme file and check the widget javascript will be removed. After removing this script, you can check

Removing default JS and CSS from Blogger

To remove both javascript and CSS from the Blogger blog, you’ve to add b:css='false' and b:js='false' in the <html> tag of the template.

The final code after removing default JS and CSS from the Blogger blog will look like this.

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html>
<html b:css='false' b:js='false' b:defaultwidgetversion='2' b:layoutsVersion='3' b:responsive='true' ......>

By using the above method, you can remove default JS and CSS from the Blogger blog.

Also Read:  How to Make Money With Google Adsense Without a Website

Pros of Removing default JS

  • It enhances the load-time, boosts up website speed,
  • Enhance user experience,
  • Boost SEO of the blog.

Cons of Removing default JS from the Blogger blog.

There are some limitations If you remove default JS from the Blogger blog. These are

  • The Contact form will not work if it is on the portal’s layout, But don’t worry; you can create a contact us page for the Blogger blog.
  • You will not be able to modify your theme by just visiting the Layout section of your website. At any point in time, if you’ve to make some changes in the layout of your web page, then in this case. You have to remove b:js='false' from the HTML tag and customized it. You can add it again after making the required changes.
  • Blogger widget that needs javascript to perform their function will not work.

If you like this article or face any issues. Please comment below. It appreciates me for writing such things. Thank you. 🙂

About Samuel Solomon 408 Articles
I'm Samuel Solomon, A professional web designer, Web Developer, SEO Analyst, and the small guy behind Sammyloaded Stay updated with our Non Stop update.

Be the first to comment

Leave a Reply

Your email address will not be published.