[blog]
Thủ thuật blogspot xóa css và js mặc định của blogger giúp cho trang blogspt tải trang nhanh hơn.

Cách đơn giản là bạn chỉ cần thêm b:css='false' b:js = 'false' sau thẻ <html như bên dưới, các bạn chỉ cần quan tâm tới mục b:css='false' b:js = 'false' còn lại không cần để ý tới vì mỗi blog sẽ khác nhau.

<html b:css='false' b:js = 'false' b:defaultwidgetversion='2' b:layoutsVersion='3' b:responsive='true' b:templateUrl='indie.xml' b:templateVersion='1.1.1' b:version='2' expr:dir='data:blog.languageDirection' lang='vi' 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'>

Cách làm này các bạn đã chặn được link csslink js mặc định tự động có trong blogger.

Xóa CSS và JS mặc định của blogger giúp tăng tốc độ tải trang blogspot
Nhược điểm của cách làm này là bạn đã tắt mất link css và js mặc định cho nên các bạn vô bố cục của blogger sẽ không hoạt động. Mỗi lần sửa trong bố cục bạn cần phải xóa b:js = 'false' đi thì mục bố cục mới hoạt động, như vậy thì hơi bất tiện và cách giải quyết là bạn có thể làm theo cách bên dưới như sau:
- Các bạn xóa b:js = 'false' đi và chỉ để b:css='false' ví dụ code dưới

<html b:css='false' b:defaultwidgetversion='2' b:layoutsVersion='3' b:responsive='true' b:templateUrl='indie.xml' b:templateVersion='1.1.1' b:version='2' expr:dir='data:blog.languageDirection' lang='vi' 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'>

- Các bạn tìm các thẻ sau và sửa theo như dưới:

<head> thay đổi thành &lt;head&gt;
</head> thay đổi thành  &lt;!--<head/>--&gt;
<body> thay đổi thành &lt;body&gt;
</body> thay đổi thành &lt;!--<body/>--&gt;

Hoặc thẻ <body> giữ nguyên chỉ đổi </body> thành &lt;!--</body>--&gt;&lt;/body&gt;

Sau đó các bạn lưu lại, và vô trang web kiểm tra bằng cách nhấn CTRL + U lên để xem, các link bị chặn không còn hiển thị trên blogspot nữa là:

https://www.blogger.com/static/v1/jsbin/738774363-lbx__vi.js
https://www.blogger.com/static/v1/widgets/69258925-widgets.js
https://www.blogger.com/static/v1/v-css/368954415-lightbox_bundle.css
https://www.blogger.com/dyn-css/authorization.css

Với cách làm thứ 2 này thì bố cục của blogspot vẫn hoạt động bình thường, và không ảnh hưởng gì tới blog của bạn.

Nếu blogspot của bạn bị lỗi phần commnet trả lời sau khi áp dụng cách 2, thì các bạn cần fix như sau: Copy toàn bộ code dưới dán trước thẻ đóng </body>

<style>
.theme-button{position:relative;overflow:hidden;display:inline-block;min-width:80px;height:34px;line-height:36px;padding:0 10px;color:#fff!important;-webkit-appearance:none;font-size:14px;letter-spacing:.5px;font-weight:400;border:0;text-transform:uppercase;text-decoration:none;border-radius:4px;transition:opacity .15s;background-color:#007bc7}.calcel-reply{margin-bottom:25px}.comment-reply:hover{cursor:pointer}
</style>
<script>//<![CDATA[
$(function() {
  $.getScript('https://www.blogger.com/static/v1/jsbin/2567313873-comment_from_post_iframe.js').done(function(){
    BLOG_CMT_createIframe('https://www.blogger.com/rpc_relay.html')
  })
  var l = '',id = '',li = ''
  $('.comment a.comment-reply').click(function(e) {
    l = $('#comment-editor').attr('src')
    $('.calcel-reply').remove()
    $('.comment-actions').removeAttr('style')
    $('#top-continue.continue').hide()
    var $this = $(this),
    id = $this.attr('data-comment-id')
    l = l + '&parentID=' + id
    li = $this.parent().parent().parent().attr('id')
    $('#comment-editor').attr('src', l)
    $this.parent().hide()
    $('#comment-editor').appendTo($('#' + li + '>.comment-replybox-single'))
    $('#' + li + '>.comment-replybox-single').append('<div class="calcel-reply"><button class="theme-button" type="button">Hủy</button></div>')
    $('.calcel-reply').click(function() {
      $(this).remove()
      $('.comment-actions,#top-continue.continue').removeAttr('style')
      $('#comment-editor').appendTo($('.comment-form'))
    })
  })
  $('#top-continue.continue>a.comment-reply').click(function(e) {
    e.preventDefault()
    $(this).parent().hide()
    $('.calcel-reply').remove()
    $('.comment-actions').removeAttr('style')
    $('#comment-editor').appendTo($(this).parent().next())
    $('.comment-replybox-thread').append('<div class="calcel-reply"><button class="theme-button" type="button">Hủy</button></div>')
    $('.calcel-reply').click(function() {
      $(this).remove()
      $('.comment-actions,#top-continue.continue').removeAttr('style')
      $('#comment-editor').appendTo($('.comment-form'))
    })
  })
})
//]]></script>

Tối ưu thêm một chút là các bạn copy code trên bỏ vô trang thẻ if bên dưới chỉ áp dụng cho trang bài viết.

<b:if cond='data:blog.pageType == "item"'>

Đoạn code bên trên

</b:if>

Tùy vô blog của bạn mà áp dụng thẻ if: Xem thêm Tổng hợp thẻ điều kiện cho blogspot

Các bạn lưu và kiểm tra lại mục trả lời comment của blogger.

Lưu ý là blogspot bạn sử dụng nhiều Widget mặc định của blogger có thể không hoạt động.

Trên đây là hướng dẫn chi tiết cách chặn css mặc định và js mặc định của blogger, giúp tăng tốc độ tải trang cho blogspot.

Chúc bạn thành công!

[/blog]