Oct 24, 2016

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

data:blog.title
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 you learn here today is given in below Table of Content list>>>

  1. What is the default JavaScript [Widgets.js] in Blogger?
  2. Is removing default JavaScript from Blogger Possible?
  3. Will you face any problem after removing default JavaScript Widgets.js file link from Blogger?
  4. Which Widgets Will Not Work After Removing Default JavaScript from Blogger Template?
  5. Which widget is most Important and will not work after removing JavaScript?
  6. How To Properly Remove JavaScript [Widgets.js] file link from Blogger?
  7. How to fix widget not working problem after removing the JavaScript link from Blogger?

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 closing </body> tag and replace it with below code.

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


  5. 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?blogID\x3d8252179772515204428','//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': 'http://www.mybloggerguides.com/', 'canonicalUrl': 'http://www.mybloggerguides.com/', 'homepageUrl': 'http://www.mybloggerguides.com/', 'searchUrl': 'http://www.mybloggerguides.com/search', 'canonicalHomepageUrl': 'http://www.mybloggerguides.com/', 'blogspotFaviconUrl': 'http://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 rel\x3d\x22alternate\x22 type\x3d\x22application/atom+xml\x22 title\x3d\x22My Blogger Guides | Blogging With Expert Guider! - Atom\x22 href\x3d\x22http://www.mybloggerguides.com/feeds/posts/default\x22 /\x3e\n\x3clink rel\x3d\x22alternate\x22 type\x3d\x22application/rss+xml\x22 title\x3d\x22My Blogger Guides | Blogging With Expert Guider! - RSS\x22 href\x3d\x22http://www.mybloggerguides.com/feeds/posts/default?alt\x3drss\x22 /\x3e\n\x3clink rel\x3d\x22service.post\x22 type\x3d\x22application/atom+xml\x22 title\x3d\x22My Blogger Guides | Blogging With Expert Guider! - Atom\x22 href\x3d\x22https://www.blogger.com/feeds/8252179772515204428/posts/default\x22 /\x3e\n', '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 type\x3d\x22text/javascript\x22\x3ewindow.___gcfg \x3d {\x27lang\x27: \x27en\x27};\x3c/script\x3e'}}}, {'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': '?view\x3dclassic'}, 'flipcard': {'name': 'flipcard', 'url': '?view\x3dflipcard'}, 'magazine': {'name': 'magazine', 'url': '?view\x3dmagazine'}, 'mosaic': {'name': 'mosaic', 'url': '?view\x3dmosaic'}, 'sidebar': {'name': 'sidebar', 'url': '?view\x3dsidebar'}, 'snapshot': {'name': 'snapshot', 'url': '?view\x3dsnapshot'}, 'timeslide': {'name': 'timeslide', 'url': '?view\x3dtimeslide'}, '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': 'http://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 at 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 </body> tag and replace it with below code.


  4. <b:if cond='data:blog.url != &quot;http://www.mybloggerguides.com/p/contact-us.html&quot;'>&lt;!--</b:if></body><b:if cond='data:blog.url != &quot;http://www.mybloggerguides.com/p/contact-us.html&quot;'>--&gt;&lt;/body&gt;</b:if>


  5. Now replace http://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!
how to remove default JavaScript widgets.js from blogger, Remove Default JavaScript [Widgets.js] from Blogger, How to Remove Default JavaScript [Widgets.js] from Blogger Template, Get Rid of the Default Widgets JavaScript(Widgets.js) from Blogger.

No comments:

Post a Comment

We’re eager to see your comment. If you have any query related to the topic then drop a comment below. We will help you out of sure. However, Please Keep in mind that all comments are moderated manually by our human reviewers. According to our comment policy all link are nofollow so keep in mind that never use links in comments, we consider link comments as a spam.