Disable Rendering of Unnecessary JavaScript and Widgets from the Mobile Template
Disable Rendering of Unnecessary JavaScript and Widgets from the Mobile Template
We discussed the details of how to remove unnecessary HTML tags from the Mobile Template, in the last post. Now we will learn how to disable rendering of unnecessary JavaScript and widgets. Rendering of unnecessary JavaScript and Widgets needs to be disabled to speed up the mobile templates for Load Time.
There are many types of widgets used in different templates including the sidebar of the Blogger Template, which do not require the use of mobile templates. If you use all types of Widget Mobile templates, then your blog will be very slow in mobile versions. Earlier we have learned that the mobile version is very slow than the computer version. Therefore, all types of options should be used only on mobile phones without using them in the mobile version. Visiting our blog mobile, you can see many widgets are disabled, not hidden only. Therefore, to disable rendering of unnecessary JavaScript and Widgets, it is necessary to use Conditional Tag properly.
See all posts
How to Disable Widgets from Responsive Templates?
First login to the blog.
Then click on Template> Edit HTML.
Now you need to find out the widget that you want to disable. You can take a look at how to search for this link.
The codes of any widget are generally below.
<b: widget id = 'html3' locked = 'false' title = 'Most Commented' type = 'HTML'>
<b: includable id = 'main'>
<! - Only display title if it's non-empty ->
<b: if cond = 'data: title! = & quot; & quot;'>
<h2 class = 'title'> <data: title /> </ h2>
</ b: if>
<div class = 'widget-content'>
<data: content />
</ div>
<b: include name = 'quickedit' />
</ b: includable>
</ b: widget>
To disable correctly, use the Conditional Tag below.
<b: widget id = 'html3' locked = 'false' title = 'Most Commented' type = 'HTML'>
<b: includable id = 'main'>
<b: if cond = 'data: blog.isMobileRequest == "false"'>
<! - Only display title if it's non-empty ->
<b: if cond = 'data: title! = & quot; & quot;'>
<h2 class = 'title'> <data: title /> </ h2>
</ b: if>
<div class = 'widget-content'>
<data: content />
</ div>
<b: include name = 'quickedit' />
</ b: if>
</ b: includable>
</ b: widget>
Here we have falsified the IsMobileRequest Boolean Value. Because of which the widget will only show in the desktop browser and will be disabled from the mobile template.
If you want to display a widget only in the mobile template, then the isMobileRequest Boolean Value can enter True.
After doing all things, please save the template.
How to Disable JavaScript from Responsive Templates?
In most widgets, we use different types of scripts. Although the widget will only be disable in the above manner, but the widgets that you are using for your widgets are still working properly. Not only will Widget Disable, but the scripts that are with Widget will also be disabled. However, Scripts can not render your blog unnecessarily.
Blogger template javascript is usually used to scare the template <head> ...... </ head> So you know yourself where the Scripts of your desired widgets are. After searching for them, follow the procedure below.
To disable JavaScript, the Conditional Tag must be used before and after the Scripts of your blog.
<b: if cond = 'data: blog.isMobileRequest == "false"'>
JavaScript to Hide
</ b: if>
Use unnecessary scripts in the JavaScript to Hide section. Then it will be disabled from the mobile version.
On the other hand, if you want to show only on mobile then enter True on False.
Asking help: If you disable all unnecessary HTML, Widgets and JavaScript in this way, Load Time will increase significantly in your blog. Hopefully, the above simple tips will not be difficult for you to understand. Even then if there is any difficulty in understanding then we can let us know.
We discussed the details of how to remove unnecessary HTML tags from the Mobile Template, in the last post. Now we will learn how to disable rendering of unnecessary JavaScript and widgets. Rendering of unnecessary JavaScript and Widgets needs to be disabled to speed up the mobile templates for Load Time.
There are many types of widgets used in different templates including the sidebar of the Blogger Template, which do not require the use of mobile templates. If you use all types of Widget Mobile templates, then your blog will be very slow in mobile versions. Earlier we have learned that the mobile version is very slow than the computer version. Therefore, all types of options should be used only on mobile phones without using them in the mobile version. Visiting our blog mobile, you can see many widgets are disabled, not hidden only. Therefore, to disable rendering of unnecessary JavaScript and Widgets, it is necessary to use Conditional Tag properly.
See all posts
How to Disable Widgets from Responsive Templates?
First login to the blog.
Then click on Template> Edit HTML.
Now you need to find out the widget that you want to disable. You can take a look at how to search for this link.
The codes of any widget are generally below.
<b: widget id = 'html3' locked = 'false' title = 'Most Commented' type = 'HTML'>
<b: includable id = 'main'>
<! - Only display title if it's non-empty ->
<b: if cond = 'data: title! = & quot; & quot;'>
<h2 class = 'title'> <data: title /> </ h2>
</ b: if>
<div class = 'widget-content'>
<data: content />
</ div>
<b: include name = 'quickedit' />
</ b: includable>
</ b: widget>
To disable correctly, use the Conditional Tag below.
<b: widget id = 'html3' locked = 'false' title = 'Most Commented' type = 'HTML'>
<b: includable id = 'main'>
<b: if cond = 'data: blog.isMobileRequest == "false"'>
<! - Only display title if it's non-empty ->
<b: if cond = 'data: title! = & quot; & quot;'>
<h2 class = 'title'> <data: title /> </ h2>
</ b: if>
<div class = 'widget-content'>
<data: content />
</ div>
<b: include name = 'quickedit' />
</ b: if>
</ b: includable>
</ b: widget>
Here we have falsified the IsMobileRequest Boolean Value. Because of which the widget will only show in the desktop browser and will be disabled from the mobile template.
If you want to display a widget only in the mobile template, then the isMobileRequest Boolean Value can enter True.
After doing all things, please save the template.
How to Disable JavaScript from Responsive Templates?
In most widgets, we use different types of scripts. Although the widget will only be disable in the above manner, but the widgets that you are using for your widgets are still working properly. Not only will Widget Disable, but the scripts that are with Widget will also be disabled. However, Scripts can not render your blog unnecessarily.
Blogger template javascript is usually used to scare the template <head> ...... </ head> So you know yourself where the Scripts of your desired widgets are. After searching for them, follow the procedure below.
To disable JavaScript, the Conditional Tag must be used before and after the Scripts of your blog.
<b: if cond = 'data: blog.isMobileRequest == "false"'>
JavaScript to Hide
</ b: if>
Use unnecessary scripts in the JavaScript to Hide section. Then it will be disabled from the mobile version.
On the other hand, if you want to show only on mobile then enter True on False.
Asking help: If you disable all unnecessary HTML, Widgets and JavaScript in this way, Load Time will increase significantly in your blog. Hopefully, the above simple tips will not be difficult for you to understand. Even then if there is any difficulty in understanding then we can let us know.
No comments