How to make Social widgets or a custom script not to load in Mobile view


#1

How can i make any JavaScript not to load in mobile view of blogger or when internet connection is low so that my blog don’t take enough time to get load :sweat_smile:


#2

Use tag conditional. You can search it on MBT blog :smile:


#3

@iamhammadnawaz: you can use conditional tags to control JavaScript inside your website to target mobile devices.

Solution 1: It’ll appears content only in mobile version.

<b:if cond='data:blog.isMobile'>
<your tags or JS goes here>
</b:if>

Solution 2: It’ll appears content only in desktop version.

<b:if cond='data:blog.isMobile == &quot;false&quot;'>
<your tags or JS goes here>
</b:if>

#4

For showing content on desktop, how about like this ?

    <b:if cond='data:blog.isMobile != &quot;&quot;'>
    <your tags or JS goes here>
    </b:if>