Can Rank Math Work Without jQuery?

#1052311
  • Resolved Vimal Roy
    Rank Math free

    Hi Rank Math Team,

    I noticed that the Rank Math plugin enqueues jQuery on the frontend, even though my custom theme and scripts do not rely on it. I’m aiming to optimize performance and reduce unnecessary dependencies on my site.

    Could you please clarify:

    Is jQuery essential for the frontend functionality of Rank Math (e.g., schema output, breadcrumbs, rich snippets, etc.)?

    If not critical, is there a supported way to prevent Rank Math from enqueuing jQuery?

    What parts of the plugin may break if jQuery is manually dequeued using something like:

    
    add_action('wp_enqueue_scripts', function() {
        wp_dequeue_script('jquery');
    }, 100);
    

    I’d appreciate your guidance on how best to proceed without compromising SEO features or plugin stability.

    Thanks!

Viewing 1 replies (of 1 total)
  • Hello,

    We apologize for the issue you are facing regarding jQuery and its relation to the Rank Math plugin. Thank you for raising this concern.

    Rank Math is designed to perform its functions primarily at the backend, and it does not rely on jQuery for its core functionalities such as schema output, breadcrumbs, or rich snippets. However, some features or integrations may use jQuery for specific functionalities or enhancements on the frontend.

    If you want to optimize performance and reduce unnecessary dependencies, you can consider dequeuing jQuery. However, doing so may affect certain features that rely on it, particularly if you are using any of Rank Math’s frontend features that might utilize jQuery for dynamic interactions or enhancements.

    To prevent Rank Math from enqueuing jQuery, you can use the code snippet you provided. Just be cautious, as this may lead to unexpected behavior in parts of the plugin that depend on jQuery. Here’s the code snippet again for reference:

    add_action('wp_enqueue_scripts', function() {
        wp_dequeue_script('jquery');
    }, 100);

    Before proceeding with this change, we recommend testing your site thoroughly after dequeuing jQuery to ensure that all Rank Math features are functioning as expected. If you notice any issues, you may need to re-enable jQuery or find alternative solutions to optimize your site’s performance without compromising essential functionalities.

    If you have further questions or need assistance with specific features, please reply to this ticket, and a human agent from our support team will be happy to assist you further.

    Thank you for your understanding!

    Sources:
    The #1 WordPress SEO Plugin in 2024 – Rank Math

    This is an automated reply from Rank Math Support Bot. If you need further assistance, please reply to this topic and a human support agent will reply to you shortly.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 1 replies (of 1 total)

The ticket ‘Can Rank Math Work Without jQuery?’ is closed to new replies.