Last night one of our readers asked me is there any way to remove blogger default widget.js and related other junky snippets that create a great hamper in responding resources by browsers and site load time elongates which create a negative impact of blogger blogs in search engine ranking as we know page speed is a ranking factor. After getting this heads up i checked it manually and found it, also form Google Page Speed insights API reported me to remove these codes which creating 24% extra load of my blog. Fortunately i found a suggested code that is made by one of my friends and it gave me the instant solution. This is what i made and is going to share with you all.
Why These Junky Snippets Created in Blogger?
Blogger templates are totally leveraged by blogger team we just can change the style but we can't change the format which is default to every internet browser. It's a complete XHTML(a combination of XML and HTML) format which can parse all the snippets as XML.
Somehow blogger templates are secured than WordPress blogs or Joomla websites but due to some default technical issues blogger templates do not perform well in such cases like data representations, page speed, bounce rate, leverage browser caching, and the most common factor is default widget bundles may be in CSS or JavaScript. You can't find these widgets within your template but these are auto generated by Blogger when browsers load any blogspot blog.
Again we can't remove these widgets as they will destroy our entire template but we can apply some tricks to make browsers ignore them like our previous article of leveraging blogger default widget bundle CSS. Here we will make the Widget.js as a comment line so that browsers will ignore them and our tasks will become possible.
Remove Blogger Default Widget.js
1. Go to Blogger → Template2. Backup Your Template
3. Now click on Edit HTML
4. Push Ctrl + F of your keypad
5. Now search for </body>
N.B. It should remain closing </html> tag
6. Found It? Now replace </body> with following code
<!---</body>---></body>7. Now save your template and you're completely done!
Check Your Site Performance.
Doing up you give your site more speed to load and render resources faster by browsers. Now all of the webkits and windows default browsers will obey the programming comment line and ignore elements as usual. Naturally blogger default junky javascript codes will be covering within a simple comment line like
<!---YOUR HEADINGS-->In the above example YOUR HEADINGS will be replaced with blogger junky javascript snippet also a default </body> tag.
You can check out whether the snippet is still remaining or not, simply doing below
1. Go and open a new tab of your browser
2. Type of your blog URL and load
3. After loading, right click of your mouse → View Page Source
4. Push Ctrl + F and search for </body>
You should see following occurances
Which means the junky blogger default javascript codes now within a comment line but it's active in your blog, although browsers will ignore it as it's a comment line now. The only benefit you got is your site performances improved as your page speed improved and this will help your blog in SEO because Google denounced that "Page Speed is a Ranking Factor".
Need Help More?
I think the script should work for your template as it's now working for also i got my page speed back after doing this. If it creates any problem for yours don't forget to ask i feel happy to handle anybody's trouble if it's related to technical issue.
Peace and blessings pals:
0 comments