» » Delete Google Blogger's default CSS and JS

 

Delete Google Blogger's default CSS and JS

Author: bamboo06 on 24-11-2019, 02:12, views: 2064

0
When we use Google Blogger, we will find that even if we use a custom domain name, the page content also contains CSS and JS files from the Google Blogger domain. Since the domain name is inaccessible from the country, it will slow down the website access speed, in order to speed up the website loading speed. It is necessary to delete the CSS and JS files loaded by the system by default. Let me tell you how to delete these CSS and JS.
Delete Google Blogger's default CSS and JS

Go to the Google Blogger background, click on "Themes", select the current theme, select "Modify HTML", and enter the HTML source code modification interface.

At the beginning of the content, find the tag and add the following content after the html:
b:css='false' b:js='false'


The code after the modification is similar to the following line.
<html b:css='false' b:js='false' b:version='2' class='v2' expr:dir='data:blog.languageDirection' expr:lang='data:blog.locale' xmlns='http://www.w3.org/1999/xhtml' xmlns:b='http://www.google.com/2005/gml/b' xmlns:data='http://www.google.com/2005/gml/data' xmlns:expr='http://www.google.com/2005/gml/expr'>


Press CTRL-F, search for and replace this line with
&lt;!--</head>--&gt;&lt;/head&gt;

Now that the modification is complete, click Save to save the HTML template.

After that, open and refresh your Blogger website again, check the HTML source code, you will find that the default CSS and JS that Google Blogger comes with disappear or be annotated, and the speed of opening a custom domain name website will be significantly faster.

The above changes will have some side effects. One side effect is that the "layout" function will display an exception. It will be normal after the first step of the modification is restored. Secondly, for some templates, the content is not centered. You can add HTML/javascript components to the Layout and write the following code:
<style type="text/css">
body {max-width: 960px;margin: auto;}
.column-center-outer,.column-left-outer,.column-right-outer{position:relative;float:left;_display:inline;_overflow:hidden}
.column-center-outer{width:100%}
.column-left-outer{margin-left:-100%}
</style>

Category: CSS

Dear visitor, you are browsing our website as Guest.
We strongly recommend you to register and login to view hidden contents.
Information
Comment on the news site is possible only within (days) days from the date of publication.