Cara Mempercepat Blog dengan Menghapus CSS Bundle Blogger

55 views

WIDGET Bundle CSS adalah link ke file CSS bawaan blogger yang mengatur desain template. Kodenya sangat banyak sehingga mempengaruhi kecepatan loading (tampilan blog).

blog cepat css bundle

Menghapus CSS, Javascript, dan Widget Bundle Blogger merupakan salah satu optimasi untuk mempercepat loading blog dengan menyembunyikan CSS, Javascript, dan Widget Bundle bawaan blogger yang akan termuat otomatis saat blog dibuka.

Ini link ke CSS Bundle jika sumber kode template dilihat:

<link type=’text/css’ rel=’stylesheet’ href=’//www.blogger.com/static/v1/widgets/1937454905-widget_css_bundle.css’ />
<link type=’text/css’ rel=’stylesheet’ href=’//www.blogger.com/static/v1/widgets/4219271310-widget_css_2_bundle.css’ />

Namun, jika tidak melakukan modifikasi CSS sendiri, menghapus CSS Bundle akan membuat tampilan blog berantakan, khususnya blog pager dan kolom komentar.

Jika Anda bisa mengatasinya dengan kode CSS baru, maka berikut ini Cara Menghapus CSS Bundle Blogger.

Cara Menghapus CSS Bundle Blogger

1. Backup of duku file template untuk jaga-jaga.

2. Klik Tema > Edit HTML

3. Tambahkan atribut berikut ini dalam kode yang dimulai dengan <html>

Untuk menghapus Bundle CSS Blogger:

b:css='false'

Untuk menghapus Javascript bawaan Blogger:

b:js='false'

Contoh:

1. Hapus CSS saja:

<html b:css='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'>

2. Hapus Javascript doang:

<html 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'>

3. Hapus CSS dan Javascript:

<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'>

Cara Lain Menghapus CSS Bundle

Jika template Anda menggunakan jQuery library, cukup simpan kode berikut ini di atas kode </head>

<script>
$("[href$='css_bundle.css']").remove();
</script>

Cara Paling Umum Menghapus CSS Bundle

Ini cara paling banyak dilakukan untuk menghapus widget_css_2_bundle.css :

1. Ganti kode <head> dengan kode :

&lt;head&gt;

2. Ganti kode </head> dengan kode :

&lt;/head&gt;&lt;!--<head/>--&gt;

Note : This is the best way because is not affect the variables if you use variables in your template.

Disable Plusone.js and Widgets.js

Jika ingin menonaktifkan Plusone.js dan Widgets.js untuk mempercepat loading blog, lakukan langkah berikut ini:

1. Ganti kode </body> dengan kode:

&lt;!--</body>--&gt; &lt;/body&gt;

2. Simpan template!

Cara Paling Sederhana

Cara paling sederhana dan mudah menghapus CSS Bundle adalah dengan menambah kode tag kondisonal di bagian kode <b:skin> … </b:skin> menjadi sebagai berikut:

<b:if cond='data:blog.pageType == &quot;error_page&quot;'>
<b:skin> ... </b:skin>
</b:if>

Kode di atas akan menghapus <b:skin> di halaman depan tanpa mengubah kode kolom komentar.

Demikian Cara Mempercepat Blog dengan Menghapus CSS Bundle Blogger.

Risiko Menghapus CSS Bundle: Blog Pager Berantakan

Salah satu perubahan adalah menumpuknya blog pager, yaitu link Newer Post – Home – Older Post di bawah. Atasi dengan memasang kode berikut ini di atas kode ]]></b:skin>

#blog-pager-newer-link{float:left}
#blog-pager-older-link{float:right}
#blog-pager{text-align:center}

Komentar Acak-Acakan

Perubahan lainnya adalah kolom komentar. Jika sudah ada komentar, maka akan acak-acakan. Atasi dengan cara menyimpan kode berikut ini di atas kode ]]></b:skin> atau di bawah kode css comment yang ada.

.comments h4{font:normal bold 15px Arial,Tahoma,Helvetica,FreeSans,sans-serif;margin:.75em 0 0}
#comments .comment-author{padding-left:25px}.comment-body{margin:.5em 25px}.comment-footer{margin:.5em 25px 1.5em}.comment-body p{margin:0}#comments .avatar-comment-indent .comment-author{margin-left:-45px;padding-left:45px}.deleted-comment{font-style:italic;opacity:.5}
#comment-actions{background:transparent;border:0;padding:0;position:absolute;height:25px}#comments .blogger-comment-icon,.blogger-comment-icon{line-height:16px;background:url(/img/b16-rounded.gif) left no-repeat;padding-left:20px}#comments .openid-comment-icon,.openid-comment-icon{line-height:16px;background:url(/img/openid16-rounded.gif) left no-repeat;padding-left:20px}#comments .anon-comment-icon,.anon-comment-icon{line-height:16px;background:url(/img/anon16-rounded.gif) left no-repeat;padding-left:20px}.comment-form{clear:both;_width:410px}.comment-link{white-space:nowrap}.paging-control-container{float:right;margin:0 6px 0 0;font-size:80%}.unneeded-paging-control{visibility:hidden}#comments-block .avatar-image-container img{-ms-interpolation-mode:bicubic;border:1px solid #ccc;float:right}#comments-block .avatar-image-container.avatar-stock img{border-width:0;padding:1px}#comments-block .avatar-image-container{height:37px;left:-45px;position:absolute;width:37px}#comments-block.avatar-comment-indent{margin-left:45px;position:relative}#comments-block.avatar-comment-indent dd{margin-left:0}iframe.avatar-hovercard-iframe{border:0 none;padding:0;width:25em;height:9.4em;margin:.5em}.comments{clear:both;margin-top:10px;margin-bottom:0}.comments .comments-content{margin-bottom:16px}
.comments .comment .comment-actions a{padding: 5px 8px;background: #5f4d53;color: #fff;font-size: 12px;margin-right: 10px;border-radius: 5px;}.comments .comment .comment-actions a:hover{text-decoration:underline}
.comments .comments-content .comment-thread ol{list-style-type:none;padding:0;text-align:left}.comments .comments-content .inline-thread{padding:.5em 1em}.comments .comments-content .comment-thread{margin:8px 0}.comments .comments-content .comment-thread:empty{display:none}.comments .comments-content .comment-replies{margin-left:36px;margin-top:1em}.comments .comments-content .comment{margin-bottom:16px;padding-bottom:8px}.comments .comments-content .comment:first-child{padding-top:16px}.comments .comments-content .comment:last-child{border-bottom:0;padding-bottom:0}.comments .comments-content .comment-body{position:relative}.comments .comments-content .user{font-style:normal;font-weight:bold}.comments .comments-content .icon.blog-author{display:inline-block;height:18px;margin:0 0 -4px 6px;width:18px}.comments .comments-content .datetime{margin-left:6px;display:none}.comments .comments-content .comment-header,.comments .comments-content .comment-content{margin:0 0 8px}
.comments .comments-content .comment-content{text-align:left;text-align: left;font-size: 95%;font-family: Arial;}
.comments .comments-content .owner-actions{position:absolute;right:0;top:0}.comments .comments-replybox{border:none;height:250px;width:100%}.comments .comment-replybox-single{margin-left:48px;margin-top:5px}.comments .comment-replybox-thread{margin-top:5px}.comments .comments-content .loadmore a{display:block;padding:10px 16px;text-align:center}.comments .thread-toggle{cursor:pointer;display:inline-block}.comments .continue{cursor:pointer}.comments .continue a{display:block;font-weight:bold;padding:.5em}.comments .comments-content .loadmore{cursor:pointer;margin-top:3em;max-height:3em}.comments .comments-content .loadmore.loaded{max-height:0;opacity:0;overflow:hidden}.comments .thread-chrome.thread-collapsed{display:none}.comments .thread-toggle{display:inline-block}.comments .thread-toggle .thread-arrow{display:inline-block;height:6px;margin:.3em;overflow:visible;padding-right:4px;width:7px}.comments .thread-expanded .thread-arrow{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAYAAADEUlfTAAAAG0lEQVR42mNgwAfKy8v/48I4FeA0AacVDFQBAP9wJkE/KhUMAAAAAElFTkSuQmCC") no-repeat scroll 0 0 transparent}.comments .thread-collapsed .thread-arrow{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAYAAADEUlfTAAAAJUlEQVR42mNgAILy8vL/DLgASBKnApgkVgXIkhgKiNKJ005s4gDLbCZBiSxfygAAAABJRU5ErkJggg==") no-repeat scroll 0 0 transparent}.comments .avatar-image-container{float:left;max-height:36px;overflow:hidden;width:36px}.comments .avatar-image-container img{max-width:36px}.comments .comment-block{margin-left:48px;position:relative}.comments .hidden{display:none}@media screen and (max-device-width:480px){.comments .comments-content .comment-replies{margin-left:0}}table.tr-caption-container{padding:4px;margin-bottom:.5em}td.tr-caption{font-size:80%}.icon-action{border-style:none !important;margin:0 0 0 .5em !important;vertical-align:middle}.comment-action-icon{width:13px;height:13px;margin-top:3px}.delete-comment-icon{background:url("/img/icon_delete13.gif") no-repeat left;padding:7px}#comment-popup{position:absolute;visibility:hidden;width:100px;height:20px}
.comments h4{font:normal bold 15px Arial,Tahoma,Helvetica,FreeSans,sans-serif;margin:.75em 0 0}
blockquote{background:#f9f9f9;padding:15px;margin:10px}
#comments .comment-author{padding-top:1.5em;border-top:1px solid #ffffff;background-position:0 1.5em}
#comments .comment-author:first-child{padding-top:0;border-top:none}
.avatar-image-container{margin:.2em 0 0}
#comments .avatar-image-container img{border:1px solid #eeeeee}
.comments .comments-content .icon.blog-author{background-repeat:no-repeat;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9sLFwMeCjjhcOMAAAD+SURBVDjLtZSvTgNBEIe/WRRnm3U8RC1neQdsm1zSBIU9VVF1FkUguQQsD9ITmD7ECZIJSE4OZo9stoVjC/zc7ky+zH9hXwVwDpTAWWLrgS3QAe8AZgaAJI5zYAmc8r0G4AHYHQKVwII8PZrZFsBFkeRCABYiMh9BRUhnSkPTNCtVXYXURi1FpBDgArj8QU1eVXUzfnjv7yP7kwu1mYrkWlU33vs1QNu2qU8pwN0UpKoqokjWwCztrMuBhEhmh8bD5UDqur75asbcX0BGUB9/HAMB+r32hznJgXy2v0sGLBcyAJ1EK3LFcbo1s91JeLwAbwGYu7TP/3ZGfnXYPgAVNngtqatUNgAAAABJRU5ErkJggg==)}
.comments .comments-content .loadmore a{border-top:1px solid #999999;border-bottom:1px solid #999999}
.comments .comment-thread.inline-thread{background-color:#f9f9f9}
.comments .continue{border-top:1px solid #ddd}
.comment-form p {margin:15px 0;}

Formulir kontak

Tombol mengirim dari widget formulir kontak biasanya tidak akan bekerja seperti sebelumnya, silakan tambahkan kode ini setelah kode HTML formulir kontak (Khusus widget formulir kontak yang ditambahkan di halaman statis)

<script src="https://www.blogger.com/static/v1/widgets/2271878333-widgets.js" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
if (typeof(BLOG_attachCsiOnload) != 'undefined' && BLOG_attachCsiOnload != null) { window['blogger_templates_experiment_id'] = "templatesV1";window['blogger_blog_id'] = '7342017194742683056';BLOG_attachCsiOnload(''); }_WidgetManager._Init('//www.blogger.com/rearrange?blogIDx3d7342017194742683056','//www.arlinadzgn.com/','7342017194742683056');
_WidgetManager._RegisterWidget('_ContactFormView', new _WidgetInfo('ContactForm1', 'footer1', null, document.getElementById('ContactForm1'), {'contactFormMessageSendingMsg': 'Sending...', 'contactFormMessageSentMsg': 'Your message has been sent.', 'contactFormMessageNotSentMsg': 'Message could not be sent. Please try again later.', 'contactFormInvalidEmailMsg': 'A valid email address is required.', 'contactFormEmptyMessageMsg': 'Message field cannot be empty.', 'title': 'Contact Form', 'blogId': '7342017194742683056', 'contactFormNameMsg': 'Name', 'contactFormEmailMsg': 'Email', 'contactFormMessageMsg': 'Message', 'contactFormSendMsg': 'Send', 'submitUrl': 'https://www.blogger.com/contact-form.do'}, 'displayModeFull'));
//]]>
</script>

Sumber

Blogger CSS Bundle Fast Loading

Author: 
author
Asep Syamsul M. Romli aka Romeltea --akrab disapa Kang Romel-- adalah praktisi media, trainer komunikasi praktis, konsultan media, blogger. Profil lengkap: "My Profile". Karya tulis (buku): "My Books". Kontak email: romeltea@yahoo.com. Follow @romel_tea untuk update tulisan terbaru!

Related Post

Leave a reply