• Resolved johndos

    (@johndos)


    Hello Paul, is there a way to async jquery for mobile only? In my pc version of the page I am using revslider and if I globally async jquery it breaks, on the other hand I am not using any sliders when in responsive for mobile. Is there a way to async jquery for mobile only?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Raul P.

    (@alignak)

    Hello,

    Currently, there is no way to filter out mobile vs desktop users.
    The chance of jquery working in async mode in mobile and not working in desktop, is pretty low as well.

    I recommend you to read what async really means, and the impact it may have on your site functionality.

    https://idiallo.com/javascript/async-jquery

    Async means that your browser and network will decide when to download the file, which can be faster that the time it needs to render the html page, or slower.
    If it’s slower (ex: slow 3G mobile), any function that depends on jquery will stop working, and since this never behaves the same… you cannot test it, but your users will have trouble.

    In short, you can only async scripts which work independently, such as ads, or libraries that do not depend on anything else AND no inlined code also depends on it.

    jQuery is on most of the cases, render blocking because plugins and themes inject inline javascript on the page that rely on jquery being loaded first.
    With async, there is no guarantee that it will ever load first, even if for you, it always works.

    Thread Starter johndos

    (@johndos)

    I do know what async is mate I was just asking because I can not use jquery async on pc version as revslider breaks, on the mobile version I am NOT using the revslider thus I was asking if it was possible.

    Plugin Author Raul P.

    (@alignak)

    If you know, then all good.
    Unfortunately, that functionality is not available on FVM, sorry.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘async for mobile’ is closed to new replies.