lighthouse perf recommendation: use passive touchstart listeners

p.pischel's Avatar


13 Apr, 2017 02:18 PM

running on our website which uses royal-slider leads to a warning
"Consider marking your touch and wheel event listeners as passive to improve your page's scroll performance"

more details see
and also for a technical background why one should passivate scroll listeners.

what do you think about using a passive "touchstart" listener for rscontainer in royal slider?

  1. Support Staff 1 Posted by Dmytro Semenov on 13 Apr, 2017 02:54 PM

    Dmytro Semenov's Avatar


    For now jQuery doesn't support passive event listeners and using vanilla JS addEventListener isn't an option, as the plugin still supports old browsers like IE8.

    Besides that, mobile Chrome already treats "touchstart" as passive by default.

  2. 2 Posted by p.pischel on 18 Apr, 2017 07:03 AM

    p.pischel's Avatar

    do you have a policy how long you are willing to support browser versions like oldIE?
    (or alternatively: do you plan to provide a version of this lib which does not support those old browsers and doesnt require jQuery?)

    file-size is the biggest downside of this library for us.

  3. Support Staff 3 Posted by Dmytro Semenov on 18 Apr, 2017 11:51 AM

    Dmytro Semenov's Avatar

    Yes, there are plans on making pure vanilla js version, but the size of a script won't be significantly reduced after that. The logic of handling Mouse, Touch and Pointer events requires quite a large chunk of code.

  4. 4 Posted by p.pischel on 18 Apr, 2017 12:15 PM

    p.pischel's Avatar

    the safe in code-size would result from the fact that we no longer need to inlcude jquery ;-).

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac