clash of clan việt

Tăng tốc độ tải trang cho blogspot bằng Lazy Load 2021



Lazy Load là một khái niệm mà ứng dụng trì hoãn việc tải các đối tượng cho đến thời điểm mà người dùng cần nó. Nói một cách đơn giản là tải theo yêu c

1. Lazy load là gì?

Lazy Load là một khái niệm mà ứng dụng trì hoãn việc tải các đối tượng cho đến thời điểm mà người dùng cần nó. Nói một cách đơn giản là tải theo yêu cầu của người dùng chứ không phải tải đối tượng không cần thiết. 

Lợi ích của việc này là giảm thiểu số lượng yêu cầu, giảm thiểu số lượng tài nguyên thừa cần tải cho tới khi người dùng cần đến chúng thực sự. Hơn nữa kỹ thuật này còn để áp dụng cho việc tải các mã JavaScript từ bên ngoài để tránh dừng tải (blocking download). Về bản chất khi tải mã JavaScript trình duyệt sẽ dừng tất cả các hoạt động tải tài nguyên khác và chờ cho tới khi mã này được tải hoàn thành thì các tiến trình khác mới bắt đầu được tải.

Chính vì thế khi phát triển sản phẩm có liên quan đến các hệ thống thứ ba cần cân nhắc sử dụng kỹ thuật tải bất đồng bộ và Lazy Load. Một ứng dụng phổ biến sử dụng kỹ thuật Lazy Load rất hiệu quả là Facebook. Chúng ta biết khi người dùng cuộn trang đến đâu thì dòng thời gian và ảnh mới tiếp tục tải về cho người dùng.

Tương tự như vậy nếu chúng ta nếu chúng ta sử dụng Lazy Load vào trong blogspot của các bạn thì các hình ảnh sẽ ko được load cùng lúc mà chúng sẽ chỉ xuất hiện dần khi chúng ta cuận trang. Thủ thuật này sẽ giúp tăng tốc độ tải trang blog lên đáng kể các bạn chỉ cần copy đoạn code phía dưới rồi dán vào trước thẻ đóng </body> là được nhé

[<script type='text/javascript'> //<![CDATA[ // Lazy Load (function(a){a.fn.lazyload=function(b){var c={threshold:0,failurelimit:0,event:"scroll",effect:"show",container:window};if(b){a.extend(c,b)}var d=this;if("scroll"==c.event){a(c.container).bind("scroll",function(b){var e=0;d.each(function(){if(a.abovethetop(this,c)||a.leftofbegin(this,c)){}else if(!a.belowthefold(this,c)&&!a.rightoffold(this,c)){a(this).trigger("appear")}else{if(e++>c.failurelimit){return false}}});var f=a.grep(d,function(a){return!a.loaded});d=a(f)})}this.each(function(){var b=this;if(undefined==a(b).attr("original")){a(b).attr("original",a(b).attr("src"))}if("scroll"!=c.event||undefined==a(b).attr("src")||c.placeholder==a(b).attr("src")||a.abovethetop(b,c)||a.leftofbegin(b,c)||a.belowthefold(b,c)||a.rightoffold(b,c)){if(c.placeholder){a(b).attr("src",c.placeholder)}else{a(b).removeAttr("src")}b.loaded=false}else{b.loaded=true}a(b).one("appear",function(){if(!this.loaded){a("<img />").bind("load",function(){a(b).hide().attr("src",a(b).attr("original"))[c.effect](c.effectspeed);b.loaded=true}).attr("src",a(b).attr("original"))}});if("scroll"!=c.event){a(b).bind(c.event,function(c){if(!b.loaded){a(b).trigger("appear")}})}});a(c.container).trigger(c.event);return this};a.belowthefold=function(b,c){if(c.container===undefined||c.container===window){var d=a(window).height()+a(window).scrollTop()}else{var d=a(c.container).offset().top+a(c.container).height()}return d<=a(b).offset().top-c.threshold};a.rightoffold=function(b,c){if(c.container===undefined||c.container===window){var d=a(window).width()+a(window).scrollLeft()}else{var d=a(c.container).offset().left+a(c.container).width()}return d<=a(b).offset().left-c.threshold};a.abovethetop=function(b,c){if(c.container===undefined||c.container===window){var d=a(window).scrollTop()}else{var d=a(c.container).offset().top}return d>=a(b).offset().top+c.threshold+a(b).height()};a.leftofbegin=function(b,c){if(c.container===undefined||c.container===window){var d=a(window).scrollLeft()}else{var d=a(c.container).offset().left}return d>=a(b).offset().left+c.threshold+a(b).width()};a.extend(a.expr[":"],{"below-the-fold":"$.belowthefold(a, {threshold : 0, container: window})","above-the-fold":"!$.belowthefold(a, {threshold : 0, container: window})","right-of-fold":"$.rightoffold(a, {threshold : 0, container: window})","left-of-fold":"!$.rightoffold(a, {threshold : 0, container: window})"})})(jQuery);$(function(){$("img").lazyload({placeholder:"https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKyDXqEMT6lUOSIPGaZdOS3T88L8qNBF5I-leQvTnMNgloLP-SbWumnbN461wlV_G7hmHMZEXlw24gWzCvJIeRdTOQdHSYNstJbMvJyHYpazThT7SVhtglu0utmFJIyfiGu38ZG1uW_Js2/s640/arlinadesign.gif",effect:"fadeIn",threshold:"-50"})}); //]]> </script>]

Sau đó ' Save " lại và cảm nhận như thay đổi nhé. Chúc các bạn thành công

clash of clan việt

COMMENTS

Name

About-us,1,Airdrop,10,App-paypal,17,Auto,15,Ban-tin-coc,431,Base- hall-10,1,Bay,1,BH-10,1,BH-4,2,BH-5,3,BH-6,2,BH-7,1,BH-8,2,BH-9,3,bi-an,6,BIDV,1,Binance,2,Brawlstars,1,Buit-phong-thu,37,Cake,4,Clans-do-sat,21,Clash-roylae,4,Co-may-cong-thanh,1,Co-the-ban-chua-biet,112,da,1,Dac-tinh-quan,48,Game-lien-quan,50,Game-moblie,43,Game-NFT,6,game-pc,8,Hall-10,17,Hall-11,5,Hall-12,10,Hall-13,7,hall-14,11,Hall-16,3,Hall-3,1,Hall-4,4,Hall-5,8,Hall-6,17,Hall-7,12,Hall-8,14,Hall-9,23,Hall12,1,Hero,12,hidden,1,Kiem-tien-online,151,Kim-chi-va-cu-cai-2019,2,Lap-mang-fpt-hai-phong,89,Lien-he,1,Lien-ket-tiep-thi,7,MBBANK,2,Mo-the-atm-online,23,Momo,7,Mua-lan,38,Mydefipet,2,Null-clash,1,Office,2,Phan-mem,98,phan-mem-mobile,39,phan-mem-pc,23,Phim-anh,3,Pi-network,27,PUBG,8,Quan-doi-base,9,Remitano,1,Sacombank,2,San,6,spell,1,spell-dark-elixir,9,spell-elixir,13,Suc-khoe,9,Template-app,2,Template-ban-hang,2,Template-game,2,Template-nhac,1,Template-phim,17,Template-thu-vien-anh,3,template-tin-tuc,12,Template-truyen-tranh,8,th12,1,The-thao,14,Thong-tin-cong-nghe,53,Thu-thuat-blog,17,Thu-thuat-pc,5,Tien-dien-tu,29,Timo,3,tin,1,Tin-gioi-tre,31,Tin-tuc,68,Tin-tuc-Bitcoin,101,Tin-tuc-tien-dien-tu,4,Toa-nha-tai-nguyen,5,Vat-pham-than-ky,13,Vi-dien-tu,1,video-farm,20,Video-hai,10,video-war,27,Vietcombank,1,Vietinbank,1,Vo-lam-truyen-ky,2,VPBank,2,War-builder-base,4,Xep-nha-hall-12,1,Xep-nha-thu,3,Xep-nha-thu-bh,8,Xep-nha-thu-war,17,Xep-nha-troll,3,
ltr
item
Clash of Clans Việt: Tăng tốc độ tải trang cho blogspot bằng Lazy Load 2021
Tăng tốc độ tải trang cho blogspot bằng Lazy Load 2021
Lazy Load là một khái niệm mà ứng dụng trì hoãn việc tải các đối tượng cho đến thời điểm mà người dùng cần nó. Nói một cách đơn giản là tải theo yêu c
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjh37vhL6IfKfKXpn2WVygX-lleat5D9B8vK0EY92hNE4Cv0irgC4d1AFQCAJsujSMfTM5lL0iynpS3yWGT327Dy2pGb1Cc6YfwRItHmpXg4GjNp7NFajuGPKSXIcSvYHtf0liqSwDkajTO/w640-h298/lazy-load-tang-toc-do-tai-trang-blog-la-gi.jpg
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjh37vhL6IfKfKXpn2WVygX-lleat5D9B8vK0EY92hNE4Cv0irgC4d1AFQCAJsujSMfTM5lL0iynpS3yWGT327Dy2pGb1Cc6YfwRItHmpXg4GjNp7NFajuGPKSXIcSvYHtf0liqSwDkajTO/s72-w640-c-h298/lazy-load-tang-toc-do-tai-trang-blog-la-gi.jpg
Clash of Clans Việt
https://www.clashofclansviet.com/2021/02/tang-toc-do-tai-trang-cho-blogspot-bang-lazy-load-2021.html
https://www.clashofclansviet.com/
https://www.clashofclansviet.com/
https://www.clashofclansviet.com/2021/02/tang-toc-do-tai-trang-cho-blogspot-bang-lazy-load-2021.html
true
3345287795156014315
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All Có Thể Bạn Sẽ Thích LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Like Fanpage phía dưới

STEP 2: Chia sẻ bài đăng lên mạng xã hội Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy Nội Dung Bài Viết