• Resolved ofmarconi

    (@ofmarconi)


    Hello, I have some inconsistencies in the number of conversions in a specific form.

    I wanted to confirm that this script is responsible for the resources:

    • Auto prefetch URLs in viewport
    • Auto prefetch URLs on mouse hover

    If not, what scripts are they?

    How can I dequeue this script?
    This way it didn’t work:

    function remove_scripts_instantpage_conditionally() {
    $pages_to_remove = array('service', 'service/thank you');
    
    if (is_page($paginas_para_remover)) {
         wp_dequeue_script('swcfpc_instantpage-js');
     }
    }
    add_action('wp_enqueue_scripts', 'remove_scripts_instantpage_conditionally', 0);

    thx

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor iSaumya

    (@isaumya)

    Hi,
    You can dequeue the instant page like the the way you have mentioned above just don’t add the -js part inside the wp_dequeue_script.

    But unfortunately, auto prefetch on the viewport cannot be removed.

    Thread Starter ofmarconi

    (@ofmarconi)

    Got it, thanks for the tip!

    Is Auto Prefetch done by another script? Can you tell me which one?

    Thanks!

    Plugin Contributor iSaumya

    (@isaumya)

    Yah it’s an internal JS script you can’t dequeue it. Better to disable it in such case.

    Thread Starter ofmarconi

    (@ofmarconi)

    I understand, just using plugins like FDP to completely disable the plugin on specific pages, right?

    Would there be a snippet for functions.php?

    Thanks for your attention iSaumya!

    Plugin Contributor iSaumya

    (@isaumya)

    As I said, you can definitely use a code snippet to dequeue the instant page JS file from some pages, but you can’t do anything about the auto prefetch on the viewport option. It cannot be selectively disabled. You have to disable that option completely.

    Thread Starter ofmarconi

    (@ofmarconi)

    Thx!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Instant.Page ? How to dequeue specific pages?’ is closed to new replies.