

删除Google Blogger的默认CSS和JS
source link: https://www.williamlong.info/archives/5893.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

删除Google Blogger的默认CSS和JS
我们在使用Google Blogger的时候,会发现即使使用自定义域名,页面内容也包含来自Google Blogger域名的CSS和JS文件,由于该域名从国内无法访问,因此会降低网站访问速度,为了加快网站加载速度,有必要删除系统默认加载的CSS和JS文件,下面我就讲述一下删除这些CSS和JS的方法。
进入Google Blogger后台,点击“主题背景”,选择当前主题,选择“修改HTML”,进入HTML源代码修改界面。
在内容开头,找到<html...>标签,在html后面增加如下内容
b:css='false' b:js='false'
修改完成后的代码类似下面一行内容。
<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'>
按CTRL-F,搜索</head>,将这一行替换为
<!--</head>--></head>
至此修改全部完毕,点击保存,将HTML模版保存。
之后,再次打开刷新自己的Blogger网站,查看HTML源代码,会发现Google Blogger默认自带的CSS和JS都消失或者被注释,打开自定义域名的网站速度会明显加快。
上述修改会有一些副作用,一个副作用是“布局”功能会出现显示异常,将第一步修改恢复回去之后会正常。其次对于某些模板会出现内容不居中的情况,可以在“布局”里添加HTML/JavaScript组件,写入如下代码:
<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>

</div
Recommend
-
78
-
39
导读 Fedora 29 中实现了一项令人惊讶的有争议的变化 —— 从默认的 BuildRoot 中删除 GCC 和 GCC-C++,以便将 Fedora 包与 Koji 和 Mock 组合。到目前为止,我们总是认为 GCC(包括 GCC C++ 编译器)默认存在于每个 build-root 中。
-
37
实现Google Blogger的自适应设计 2019-7-14 22:58:53 | 作者: 月光 | 分类:
-
39
Google Blogger十大SEO优化技巧 2019-7-15 9:14:55 | 作者: 月光 | 分类:
-
14
Google's Blogger fails at providing web content Blogger is one of Google's properties. It seems the need to change things runs deep over there, since there has been a fundamental change to some of their pages which renders them u...
-
12
Facebook Will Now Let Users Transfer Posts and Notes to Google Docs, Blogger and Wordpress Facebook is adding more ways for users to maintain control of their on-platform data, with a
-
22
V2EX › Windows windows10 默认删除方式删除小文件极慢是怎么回事? wszgrcy · 13 小时 0 分...
-
7
Google Adsense Approval Guidelines for blogger in 2021 Sep 19 ・1 min read
-
11
谷歌 Chrome 97 浏览器无法删除默认搜索引擎,引发用户批评:官方称之后版本改正 随着 Chrome 97 浏览器的发布,Chromium 团队的工程师已经取消了删除浏览器中默认搜索引擎的选项。此更改会影响所有基于 Chromium 的浏...
-
11
如何删除macOS系统默认的Python2.7并替换成最新版python3.11 By
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK