in Blogger

How to Remove Default Widgets JavaScript(Widgets.js) from Blogger

If you use Google’s Blogger platform for blogging then; do you feel that your blog(s) takes way to long to load in the browser. If you are visiting a Blogger/Blogspot blog with a slow internet connection then you will see that most Blogger blogs takes forever to load.

How to Remove Default Widgets JavaScript(Widgets.js) from Blogger

Removing the default widgets JavaScript in Blogger is a way of decreasing the loading time, thus making it faster.

In this post you will know:-

  • What is the default JavaScript for Blogger?
  • Will removing it cause any problem for your blog?
  • Should you remove it in from your blog?
  • Can you really remove it
  • Possible solutions of problems created by removing it.

What is Default Widgets JavaScript in Blogger?

Blogger’s generate some default CSS and JavaScript in the template which cannot be found and/or removed from Blogger template as they are automatically generated and added to all Blogger/Blogspot blog’s. The “widgets.js” script is one of them.

Go to any page of your blog and view the source code (keyboard shortcut CTRL + U in any browser) and look for this code;

<script type="text/javascript" src=""></script>

As we told you before there is no way that is can be removed but there is a way that it can be ignored. Before i tell you that there are few things you must know if you are using Blogger.

Can You Remove Widgets.js from Blogger Blog

Here let me apologize to you and allow making a little correction. You cannot actually totally remove the default widgets JavaScript(Widgets.js) from Blogger. But you can comment it out thus making it ineffective.

Although I am going to use the term ‘remove’ to describe it couple of time in the post after this.

Will Ignoring / Removing the Default Widgets JavaScript in Blogger Cause Any Problem?

Answer is both yes and no. Actually it depends on your expertise on Blogger template and what widgets you are using on your blog.

Many think that removing widgets.js will cause some serious damage to the blog and many widgets to no load properly. They are not entirely wrong. It comes down to your knowledge of blogger and use of widgets in blogger blog.

I applied the medicine for making widgets.js ineffective in a blog of mine and found out some which widgets are working and not.

Which Widgets will not work after removing the default widgets JavaScript(Widgets.js) from Blogger and Alternative Options

These are some widgets I found not functioning at all after removing (actually ignoring/ commenting out) the widgets JavaScript.

  1. ‘Contact Form’ widget; recently introduced and got very popular.
  2. Default ‘Search Box’ widget by blogger.
  3. Lightbox. Not exactly a widget but will be affected.
  4. ‘Blog’s stats’; the widget for showing page-views stats.
  5. ‘Slideshow’ widget.
  6. If you try to use ‘Blog Archive’ widgets in drop-down format.
  7. Default ‘Wikipedia’ widget by blogger.
  8. ‘Newsreel’ widget for displaying current headlines from Google News to your blog. I suggest you do not use this anyway as it is not good for your blog’s Page-Rank.

Some tips about these widgets.

You also should consider the usefulness, impact and other alternative of these affected widgets:-

  • Among all this only ‘Contact Form’ widget is the important one.If your really have to use this in every page of the blog then do not remove the widgets.js. If you have a contact us page that’s where you show ‘Contact Form’ widget; then you can get rid of widgets.js using our simple solution given later in the post.
  • Default ‘Search Box’ widget but there are lots of better alternative for a search box in blogger.There are lots of better alternative of for the default ‘Search Box’ widget. You can use the search box that will lead visitors to your blog’s query pages or better option use a Google’s custom search box. Also the default ‘Search Box’ widget comes with a heavy render-blocking CSS ( file that slows your blog further more.
  • Using Lightbox widget is depending open you. If you are posting multiple high resolution pictures in a post then you might use them.
  • I suggest the ‘Newsreel’ should not be used. It’s bad for page-rank and what’s the point of promoting other websites in your blog.
  • ‘Blog Archive’ is not really used in a professional blog. Also it can be used in formats other than a drop-down menu. You should add ‘rel=nofollow’ to the archive and label links of the Blogger blog.
  • It is not necessity to use ‘Wikipedia’. People have enough knowledge and expertise of using the Wikipedia. So you not really need to show a search box for Wikipedia.
  • ‘Blog’s stats’ widgets is not requires as your blog’s page-view stats adds no value to the visitor / reader of your blog. They are looking forward to you blog spot.
  • Not really used much but only if you really need to show off some images then use ‘Slideshow’.

Which Widgets will work after removing the default widgets JavaScript(Widgets.js) from Blogger

Expect these widgets mentioned above; all other widgets even the default ones; will work perfectly.

Should You Remove Default Widgets JavaScript(Widgets.js) from Blogger

This completely depends on you, your knowledge of blogger, your way of designing and coding your blog, and your willingness.

Who should not use this:-

  • Completely novice users should avoid this.
  • If you have no or very little knowledge about blogger’s templates; widgets; HTML, CSS, JavaScript, etc…
  • If your blog is very much depended on the affected (mentioned above) widgets by this method.
  • If you are not willing to do this.

Who could use this:-

  • If you do not use/ not require to use ‘Contact Form’ widget in every pages of your blog.
  • If your blog do not heavily depended on the affected widgets (mentioned above) then you should definitely use this.
  • If you use mostly third party JavaScript, widgets, custom JavaScript (HTML widget) then you can use this method.
  • If you want to make your blog’s loading time as fast as possible. If your blog’s pages take a long time to loading then you should use this. Go to Google-Developers PageSpeed Insights page and check out your blogger blog’s speed and optimization score and suggestions.
  • Expert users how likes to tune their blogs to make more fast and functional.
  • If you like to learn. And you like doing new staff to your blog.

I hope these are enough for making up your mind for using this method of Remove Default Widgets JavaScript(Widgets.js) from Blogger.

Editing Blogger Template to Get Rid of the Default Widgets JavaScript(Widgets.js) from Blogger

Now; see how to remove the default widgets JavaScript(Widgets.js) from Blogger and the result of it. Follow these steps below;

    1. You must backup your Blogger template.
    2. Go to the Blogger dashboard > Template.
    3. Click “Edit HTML”
    4. Find </body> in you blog.(hit CTRL + F in the template editor)
    5. Replace it with the following code.
    6. Click “Save template”.

That’s it you have do it. Go to any one of your blog’s pages and view the source code; search for the widgets.js and the result will look something like this:-

<!--<script type="text/javascript">
if (window.jstiming) window.jstiming.load.tick('widgetJsBefore');
</script><script type="text/javascript" src=""></script>
<script type="text/javascript" src=""></script>
<script type='text/javascript'>
if (typeof(BLOG_attachCsiOnload) != 'undefined' && BLOG_attachCsiOnload != null) { window['blogger_templates_experiment_id'] = "templatesV1";window['blogger_blog_id'] = '367973271035573867';BLOG_attachCsiOnload(''); }_WidgetManager._Init('//','//','367973271035573867');
_WidgetManager._SetDataContext([{'name': 'blog', 'data': {'blogId': '000000000000000000', 'bloggerUrl': '', 'title': 'Tech Info Know', 'pageType': 'index', 'url': '', 'canonicalUrl': '', 'canonicalHomepageUrl': '', 'homepageUrl': '', 'blogspotFaviconUrl': '', 'enabledCommentProfileImages': true, 'adultContent': false, 'disableAdSenseWidget': false, 'analyticsAccountNumber': 'UA-00000000-0', 'searchLabel': '', 'searchQuery': '', 'pageName': '', 'pageTitle': 'Tech Info Know', 'metaDescription': 'Latest Technology News, Updates, Tips, Tricks, Hacks about Web, Internet, Social Media, Software, Mobile, Apps, Web Development, Blogger, WordPress', 'encoding': 'UTF-8', 'locale': 'en_GB', 'localeUnderscoreDelimited': 'en_gb', 'isPrivate': false, 'isMobile': false, 'isMobileRequest': false, 'mobileClass': '', 'isPrivateBlog': false, 'languageDirection': 'ltr', 'feedLinks': '74link rel7542alternate42 type7542application/atom+xml42 title7542Tech Info Know - Atom42 href7542 /76n74link rel7542alternate42 type7542application/rss+xml42 title7542Tech Info Know - RSS42 href7542 /76n74link rel7542service.post42 type7542application/atom+xml42 title7542Tech Info Know - Atom42 href7542 /76n', 'meTag': '', 'openIdOpTag': '74link rel7542openid.server42 href7542 /76n74link rel7542openid.delegate42 href7542 /76n', 'latencyHeadScript': '74script type7542text/javascript4276(function() { var b75window,f7542chrome42,g7542tick42,k7542jstiming42;(function(){function d(a){this.t75{};this.tick75function(a,d,c){var e75void 0!75c?c:(new Date).getTime();this.t[a]75[e,d];if(void 07575c)try{b.console.timeStamp(42CSI/42+a)}catch(h){}};this[g](42start42,null,a)}var a;b.performance4646(a75b.performance.timing);var n75a?new d(a.responseStart):new d;b.jstiming75{Timer:d,load:n};if(a){var c75a.navigationStart,h75a.responseStart;074c4646h7675c4646(b[k].srt75h-c)}if(a){var e75b[k].load;074c4646h7675c4646(e[g](42_wtsrt42,void 0,c),e[g](42wtsrt_42,42_wtsrt42,h),e[g](42tbsd_42,42wtsrt_42))}try{a75null,nb[f]4646b[f].csi4646(a75Math.floor(b[f].csi().pageT),e4646074c4646(e[g](42_tbnd42,void 0,b[f].csi().startE),e[g](42tbnd_42,42_tbnd42,c))),null7575a4646b.gtbExternal4646(a75b.gtbExternal.pageT()),null7575a4646b.external4646(a75b.external.pageT,e4646074c4646(e[g](42_tbnd42,void 0,b.external.startE),e[g](42tbnd_42,42_tbnd42,c))),a4646(b[k].pt75a)}catch(p){}})();b.tickAboveFold75function(d){var a750;if(d.offsetParent){do a+75d.offsetTop;while(d75d.offsetParent)}d75a;7507675d4646b[k].load[g](42aft42)};var l75!1;function m(){l||(l75!0,b[k].load[g](42firstScrollTime42))}b.addEventListener?b.addEventListener(42scroll42,m,!1):b.attachEvent(42onscroll42,m);n })();74/script76', 'mobileHeadScript': '', 'view': '', 'dynamicViewsCommentsSrc': '//', 'dynamicViewsScriptSrc': '//', 'plusOneApiSrc': '', 'sf': 'n'}}, {'name': 'skin', 'data': {'vars': {}, 'override': ''}}, {'name': 'view', 'data': {'classic': {'name': 'classic', 'url': '?view75classic'}, 'flipcard': {'name': 'flipcard', 'url': '?view75flipcard'}, 'magazine': {'name': 'magazine', 'url': '?view75magazine'}, 'mosaic': {'name': 'mosaic', 'url': '?view75mosaic'}, 'sidebar': {'name': 'sidebar', 'url': '?view75sidebar'}, 'snapshot': {'name': 'snapshot', 'url': '?view75snapshot'}, 'timeslide': {'name': 'timeslide', 'url': '?view75timeslide'}}}]);

After implementing it; you can see the upgrade in your blog’s page speed. Check it out on the Google’s page speed analysis tool.

Solution to the Problems Created by Removing the Default Widgets JavaScript(Widgets.js) from Blogger

You will see that your blog’s speed become significant faster than before. But as I have mentioned before few of the default widgets of blogger will not work. This particular solution is not particularly solves all the problems. But it will solve a crucial problem of your blog; running the ‘Contact Form‘ or any other affected widget properly is a specific page or URL of the blog.

As I informed you earlier in the post that you cannot run few widgets after you use this method. But only two widgets that really will be missed is the ‘Contact Form’. Others are not that important as much as these two as I mentioned the reason earlier.

I think that the ‘Contact form’ widget is the best among the available widgets in blogger. Most Blogger user very much like to use ‘Contact Form’ widget as it gives your blog a professional boost at no cost of time, energy and money of yours.

At first I had to sacrifice it for the sake of page-speed but using this method now I am using the ‘Contact Form’ widget and also got rid of the Widgets.js too in the rest of my blog using a simple modified code.

This solution works if you have a ‘contact us’ page in your blog and that’s where you show ‘Contact Form’ widget; then you can get rid of widgets.js using our simple solution.

First you have to make your blog’s ‘Contact form’ widget is showing only in a particular designated page/URL of your blog using CSS code and/or conditional tags. You should check out the post I have written on properly adding ‘Contact form’ widget to Blogger.

I guess that you have properly added the ‘Contact form’ widget in your blog. now follow these instructions below:-

    1. You must backup your Blogger template.
    2. Go to the Blogger dashboard > Template.
    3. Click “Edit HTML”
    4. Find </body> in you blog.(hit CTRL+F in the template editor)
    5. Replace </body> by the following code.
      <b:if cond='data:blog.url != &quot;;'>&lt;!--</b:if></body><b:if cond='data:blog.url != &quot;;'>--&gt;&lt;/body&gt;</b:if>
    6. Replace with the URL of your blog’s contact-us page by your contact page URL.
    7. Click “Save template”.

Now your ‘Contact Form’ widget will work just fine in the selected page of your blog. As you see in the above code; I used conditional tags of blogger so that the widgets.js will only load in the selected URL using the

I am currently using this on my blogs(including this one) and I did not face any problem using it. Using the above solution I am also able to use ‘Contact Form’ widget in the blog. I am sure you won’t too.

The post is bit long but it has all the information that you need to get rid of widgets.js from your Blogger blog without any problem. Thank you for reading and if you face any difficulties or have any question then do not hesitate to let me know in the comments section.

Related Posts