Remove Default JavaScript [Widgets.js] from Blogger to Improve Loading Time

How to Remove Default JavaScript [Widgets.js] file from Blogger Template?Blogger’s default CSS Bundle widgets and JavaScript Widgets are the biggest sources to increase blog load time, and the only way to get rid of it is by removing these widgets entirely from your Blogspot blog. Loading time is the primary signal to search engines to give you rank higher. We have already talked about the importance of reducing blogger blog loading time So I don’t want to explain here why you should remove blogger default CSS Bundle widgets and Widgets.js file or you can say Widgets.js link.
Remove JavaScript from Blogger, Ignore Widgets.js JavaScript from Blogger

How to Remove Default JavaScript [Widgets.js] file from Blogger Template?

Removing Blogger’s Default JavaScript Widgets.js from Blogger is the best way to make your blog fast to load, but there are some disadvantages too. But don’t worry guys there are also some solutions available.

What is the Default JavaScript [Widgets.js] in Blogger?

Blogger platform always generates some JavaScript and CSS in the template which can’t be found or removed from blogger template because they’re hidden in all BlogSpot blogs by the default setting. JavaScript [Widgets.js] script is also one of them.

You can check this script code link by open any page of your blogger blog and after that view the source code (CTRL+U Keyboard Shortcut). Code looks like below one;

<script type=”text/javascript” src=”https://www.blogger.com/static/v1/widgets/2423294629-widgets.js”></script>

 

Is removing default JavaScript from Blogger Possible?

As I’ve, tell you that, There is no way to removing default JavaScript from Blogger Template, but there is a way to avoid this script to load when someone opens your blog. I mean to say you can’t remove it but you can add some codes to make it ineffective. Although I’m using ‘Remove’ word in the title to describe the post content.

Must Read – 7 Powerful Tips to Increase Organic Traffic to A New Blog.

Will you face any problem after removing default JavaScript Widgets.js file link from Blogger?

This is complicated. 😉 Because the answer is both (Yes and No.). It depends on upon what widgets you’re using and how much you’ve knowledge about handling the Blogger template. Many of us are thinking that removing default JavaScript link will generate some serious damages and some widget will not work, and they’re not entirely wrong.

I’ve done some experiments and find there some widgets are not working. List is given below;

Which Widgets Will Not Work After Removing Default JavaScript from Blogger Template?

After researching on this topic, I’ve found following widgets will not work after removing/ignoring the JavaScript in Blogger.

  1. Contact Form Widget.
  2. The blog’s Stats. (A widget to show Page Views.)
  3. Slideshow Widget.
  4. Blog Archive widget. (If you use as a drop down widget.)
  5. Wikipedia widget.
  6. Newsreel widget will not work.
  7. Default search box widget will not work.
  8. Lightbox. (This is not a widget but will be affected by removing the JavaScript.)

Recommended – Amazing Ways To Write Effective Post Titles to Improve CTR.

Which widget is most Important and will not work after removing JavaScript?

The most important widget is Blogger’s default Contact form plugin which will not work after removing the Script code if you want to use. All other widgets are of no use and have many best alternatives. But if you’ll not remove for only Contact form gadget, then I have a solution for this which is also given below just after of the main JavaScript removing guide.

How To Properly Remove JavaScript [Widgets.js] file link from Blogger?

Okay! Now you’re at the main point of this article. Now you’ll get to how to remove JavaScript [Wdgets.js] from Blogger template to make your blog load faster.

    1. As usual, Go to Blogger.com and download a backup copy of your Blogger Template.
    2. Now click on Edit HTML button.
    3. Using CTRL+F or CMD+F search for the closing </body> tag and replace it with below code.

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

  1. Now click on Save Template button to save this setting correctly.

That’s it. You’ve done it and applied this technique to your Blogger blog successfully. Now view source code of your blog and search for the widgets.js and you’ll see something like this;

<!–
<script type=”text/javascript” src=”https://www.blogger.com/static/v1/widgets/1235661846-widgets.js”></script>
<script type=”text/javascript” src=”https://apis.google.com/js/plusone.js”></script>
<script type=’text/javascript’>
window[‘__wavt’] = ‘AOuZoY655FX-d_38L8ae97FFRfZnZUT60Q:1477284532213’;_WidgetManager._Init(‘//www.blogger.com/rearrange?blogIDx3d8252179772515204428′,’//www.mybloggerguides.com/’,’8252179772515204428′);
_WidgetManager._SetDataContext([{‘name’: ‘blog’, ‘data’: {‘blogId’: ‘8252179772515204428’, ‘bloggerUrl’: ‘https://www.blogger.com’, ‘title’: ‘My Blogger Guides | Blogging With Expert Guider!’, ‘pageType’: ‘index’, ‘url’: ‘https://www.mybloggerguides.com/’, ‘canonicalUrl’: ‘https://www.mybloggerguides.com/’, ‘homepageUrl’: ‘https://www.mybloggerguides.com/’, ‘searchUrl’: ‘https://www.mybloggerguides.com/search’, ‘canonicalHomepageUrl’: ‘https://www.mybloggerguides.com/’, ‘blogspotFaviconUrl’: ‘https://www.mybloggerguides.com/favicon.ico’, ‘enabledCommentProfileImages’: true, ‘gPlusViewType’: ‘FILTERED_POSTMOD’, ‘adultContent’: false, ‘analyticsAccountNumber’: ‘UA-65040647-2’, ‘useUniversalAnalytics’: false, ‘pageName’: ”, ‘pageTitle’: ‘My Blogger Guides | Blogging With Expert Guider!’, ‘metaDescription’: ‘My Blogger Guides is a Online Portal to find quality Blogger Widgets, Plugins, Templates x26 Blogger Guides to Make Money Online x26 SEO Tips.’, ‘encoding’: ‘UTF-8’, ‘locale’: ‘en’, ‘localeUnderscoreDelimited’: ‘en’, ‘isPrivate’: false, ‘isMobile’: false, ‘isMobileRequest’: false, ‘mobileClass’: ”, ‘isPrivateBlog’: false, ‘languageDirection’: ‘ltr’, ‘feedLinks’: ‘x3clink relx3dx22alternatex22 typex3dx22application/atom+xmlx22 titlex3dx22My Blogger Guides | Blogging With Expert Guider! – Atomx22 hrefx3dx22https://www.mybloggerguides.com/feeds/posts/defaultx22 /x3enx3clink relx3dx22alternatex22 typex3dx22application/rss+xmlx22 titlex3dx22My Blogger Guides | Blogging With Expert Guider! – RSSx22 hrefx3dx22https://www.mybloggerguides.com/feeds/posts/default?altx3drssx22 /x3enx3clink relx3dx22service.postx22 typex3dx22application/atom+xmlx22 titlex3dx22My Blogger Guides | Blogging With Expert Guider! – Atomx22 hrefx3dx22https://www.blogger.com/feeds/8252179772515204428/posts/defaultx22 /x3en’, ‘meTag’: ”, ‘openIdOpTag’: ”, ‘mobileHeadScript’: ”, ‘adsenseClientId’: ‘ca-pub-8416782262746209’, ‘adsenseHostId’: ‘ca-host-pub-1556223355139109’, ‘view’: ”, ‘dynamicViewsCommentsSrc’: ‘//www.blogblog.com/dynamicviews/4224c15c4e7c9321/js/comments.js’, ‘dynamicViewsScriptSrc’: ‘//www.blogblog.com/dynamicviews/c258b0f953fb615c’, ‘plusOneApiSrc’: ‘https://apis.google.com/js/plusone.js’, ‘sharing’: {‘platforms’: [{‘name’: ‘Get link’, ‘key’: ‘link’, ‘shareMessage’: ‘Get link’, ‘target’: ”}, {‘name’: ‘Facebook’, ‘key’: ‘facebook’, ‘shareMessage’: ‘Share to Facebook’, ‘target’: ‘facebook’}, {‘name’: ‘BlogThis!’, ‘key’: ‘blogThis’, ‘shareMessage’: ‘BlogThis!’, ‘target’: ‘blog’}, {‘name’: ‘Twitter’, ‘key’: ‘twitter’, ‘shareMessage’: ‘Share to Twitter’, ‘target’: ‘twitter’}, {‘name’: ‘Pinterest’, ‘key’: ‘pinterest’, ‘shareMessage’: ‘Share to Pinterest’, ‘target’: ‘pinterest’}, {‘name’: ‘Google+’, ‘key’: ‘googlePlus’, ‘shareMessage’: ‘Share to Google+’, ‘target’: ‘googleplus’}, {‘name’: ‘Email’, ‘key’: ’email’, ‘shareMessage’: ‘Email’, ‘target’: ’email’}], ‘googlePlusShareButtonWidth’: 300, ‘googlePlusBootstrap’: ‘x3cscript typex3dx22text/javascriptx22x3ewindow.___gcfg x3d {x27langx27: x27enx27};x3c/scriptx3e’}}}, {‘name’: ‘features’, ‘data’: {‘widgetVisibility’: true}}, {‘name’: ‘messages’, ‘data’: {‘linkCopiedToClipboard’: ‘Link copied to clipboard!’, ‘postLink’: ‘Post Link’}}, {‘name’: ‘template’, ‘data’: {‘name’: ‘custom’, ‘localizedName’: ‘Custom’, ‘isResponsive’: false, ‘isAlternateRendering’: false, ‘isCustom’: true}}, {‘name’: ‘view’, ‘data’: {‘classic’: {‘name’: ‘classic’, ‘url’: ‘?viewx3dclassic’}, ‘flipcard’: {‘name’: ‘flipcard’, ‘url’: ‘?viewx3dflipcard’}, ‘magazine’: {‘name’: ‘magazine’, ‘url’: ‘?viewx3dmagazine’}, ‘mosaic’: {‘name’: ‘mosaic’, ‘url’: ‘?viewx3dmosaic’}, ‘sidebar’: {‘name’: ‘sidebar’, ‘url’: ‘?viewx3dsidebar’}, ‘snapshot’: {‘name’: ‘snapshot’, ‘url’: ‘?viewx3dsnapshot’}, ‘timeslide’: {‘name’: ‘timeslide’, ‘url’: ‘?viewx3dtimeslide’}, ‘isMobile’: false, ‘title’: ‘My Blogger Guides | Blogging With Expert Guider!’, ‘description’: ‘My Blogger Guides is a Online Portal to find quality Blogger Widgets, Plugins, Templates x26 Blogger Guides to Make Money Online x26 SEO Tips.’, ‘url’: ‘https://www.mybloggerguides.com/’, ‘type’: ‘feed’, ‘isSingleItem’: false, ‘isMultipleItems’: true, ‘isError’: false, ‘isPage’: false, ‘isPost’: false, ‘isHomepage’: true, ‘isArchive’: false, ‘isSearch’: false}}]);
_WidgetManager._RegisterWidget(‘_HeaderView’, new _WidgetInfo(‘Header1’, ‘header’, null, document.getElementById(‘Header1’), {}, ‘displayModeFull’));
_WidgetManager._RegisterWidget(‘_HTMLView’, new _WidgetInfo(‘HTML1’, ‘header-right’, null, document.getElementById(‘HTML1’), {}, ‘displayModeFull’));
_WidgetManager._RegisterWidget(‘_HTMLView’, new _WidgetInfo(‘HTML6’, ‘navigation’, null, document.getElementById(‘HTML6’), {}, ‘displayModeFull’));
_WidgetManager._RegisterWidget(‘_BlogView’, new _WidgetInfo(‘Blog1’, ‘content’, null, document.getElementById(‘Blog1’), {‘cmtInteractionsEnabled’: false, ‘lightboxEnabled’: true, ‘lightboxModuleUrl’: ‘https://www.blogger.com/static/v1/jsbin/1515155163-lbx.js’, ‘lightboxCssUrl’: ‘https://www.blogger.com/static/v1/v-css/368954415-lightbox_bundle.css’}, ‘displayModeFull’));
_WidgetManager._RegisterWidget(‘_HTMLView’, new _WidgetInfo(‘HTML4’, ‘sidebar’, null, document.getElementById(‘HTML4’), {}, ‘displayModeFull’));
_WidgetManager._RegisterWidget(‘_HTMLView’, new _WidgetInfo(‘HTML3’, ‘sidebar’, null, document.getElementById(‘HTML3’), {}, ‘displayModeFull’));
_WidgetManager._RegisterWidget(‘_PopularPostsView’, new _WidgetInfo(‘PopularPosts1’, ‘sidebar’, null, document.getElementById(‘PopularPosts1’), {}, ‘displayModeFull’));
_WidgetManager._RegisterWidget(‘_HTMLView’, new _WidgetInfo(‘HTML2’, ‘sidebar’, null, document.getElementById(‘HTML2’), {}, ‘displayModeFull’));
_WidgetManager._RegisterWidget(‘_ContactFormView’, new _WidgetInfo(‘ContactForm1’, ‘sidebar’, 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’: ‘8252179772515204428’, ‘contactFormNameMsg’: ‘Name’, ‘contactFormEmailMsg’: ‘Email’, ‘contactFormMessageMsg’: ‘Message’, ‘contactFormSendMsg’: ‘Send’, ‘submitUrl’: ‘https://www.blogger.com/contact-form.do’}, ‘displayModeFull’));
</script>
</body>–></body>

After applying this trick; you will see an increase of loading speed in your blogger blog. Also, check it using Google Page Speed Insight Tool.
Don’t Ignore – How To Get Google to Index New Blog Post in 1 Minute [Super Fast].

How to fix Contact form Gadget Problem after Applying this Method?

This step is optional. If you want to use contact form gadget and also want to remove the JavaScript file, then there is also another way I’ve for you. But in this case, you’ve to use contact form widget on a static page. This trick will not work if you add contact form to sidebar or footer. You should read- Stylish Contact form for Blogger Static Page.

Okay now learn how you can make contact form still working after removing the default JavaScript.

  1. Just like as before Go to Blogger.com & backup your template
  2. Click on Template >> Edit HTML button.
  3. Using CTRL+F OR CMD+f search for the </body> tag and replace it with below code.
  4. <b:if cond=’data:blog.url != &quot;https://www.mybloggerguides.com/p/contact-us.html&quot;’>&lt;!–</b:if></body><b:if cond=’data:blog.url != &quot;https://www.mybloggerguides.com/p/contact-us.html&quot;’>–&gt;&lt;/body&gt;</b:if>

  5. Now replace https://www.mybloggerguides.com/p/contact-us.html with your contact page link.
  6. Now click on Save Template button. That’s it.

As you can see, In above code I’ve used conditional tags, so the default JavaScript widgets.js file only loads when someone views contact page, and on other pages, it will be ignored. Now open your Blog’s contact page, and you’ll find it working well just like as before. 🙂 Is it helpful?

Conclusion:

So above guide is about, “How to Remove Default JavaScript [Widgets.js] from Blogger Template?” I’ve tried my best to make this guide easy to understand for everyone. In case you’ve any query or any other suggestion on this topic, then use below Disqus comment box.

Now it’s your turn to share this article with your friends, and you can also subscribe us if you’re interested in being a part of this blog.

Thank You!
Stay Blessed & Stay Happy!

Paramjot Singh
 

Hey, How you all are? Myself Paramjot Singh, A young (Not Old :P) addicted Blogger from Lucknow, India who want to learn Aha to Shit of the Blogging. I’m blogging since 2 years, and here on My Blogger Guides, I’m sharing my little mind knowledge which I learned in these past two years. :)

Click Here to Leave a Comment Below 0 comments

Leave a Reply:

0 Shares
+1
Pin
Tweet
Stumble
Share
Share