Title: Delay third party scripts until user interaction
Last modified: July 8, 2022

---

# Delay third party scripts until user interaction

 *  [lear2000](https://wordpress.org/support/users/lear2000/)
 * (@lear2000)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/delay-third-party-scripts-until-user-interaction/)
 * Delay third party scripts until user interaction feature no longer works for 
   any site I have updated to Version 3.2.8
 * instructions say we can use fbq( .. this doesnt delay facebook at all. I have
   tested with my own scripts as well.
 * also all the preloading is gone 100% , it used to preload everything, now nothing
   shows

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Raul P.](https://wordpress.org/support/users/alignak/)
 * (@alignak)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/delay-third-party-scripts-until-user-interaction/#post-15811149)
 * What is your site url, and do you see any reference to fvm minified files when
   you “view source” in incognito mode (google chrome).
 * And when you search for fbq( on the same source, did it change from the original(
   before enabling fvm) in any way?
 * The way you are explaining means, either FVM is not processing the page at all(
   no changes, so no delay) or the server (or some other cache plugin) cached the
   page before FVM could be executed.
 * Is there any error on the server logs?
    Did you change the theme or add other
   plugins? From which version did you update FVM?
 * Wordpress hooks run in order, so if some other code is stopping execution earlier(
   could be an error, or some `ob_start()` buffer), FVM may not have the chance 
   to execute.
 * FVM executes on the `template_redirect` hook at the last position.
 * Thanks
 *  Thread Starter [lear2000](https://wordpress.org/support/users/lear2000/)
 * (@lear2000)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/delay-third-party-scripts-until-user-interaction/#post-15813087)
 * edit..
    i found out what it was: your firing order made me dig deeper All on 
   one seo pack was the culprit.
    -  This reply was modified 3 years, 10 months ago by [lear2000](https://wordpress.org/support/users/lear2000/).
 *  Thread Starter [lear2000](https://wordpress.org/support/users/lear2000/)
 * (@lear2000)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/delay-third-party-scripts-until-user-interaction/#post-15826698)
 * so both of you are using output buffering and they are competing against yours
   
   they have a flush for this issue, but if i install it all my content doubles
 * add_filter( ‘aioseo_flush_output_buffer’, ‘__return_false’ );
 * literally if disable all in one everything works just fine
    any other tricks 
   to maybe delay our OB after theres?
    -  This reply was modified 3 years, 10 months ago by [lear2000](https://wordpress.org/support/users/lear2000/).
 *  Thread Starter [lear2000](https://wordpress.org/support/users/lear2000/)
 * (@lear2000)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/delay-third-party-scripts-until-user-interaction/#post-15826719)
 * if i set your redirect to 0 it works everytime
    [https://snipboard.io/G4IVKM.jpg](https://snipboard.io/G4IVKM.jpg)
 * question is PHP_INT_MAX is a server setting? can it be increased? or set too 
   high?
    -  This reply was modified 3 years, 10 months ago by [lear2000](https://wordpress.org/support/users/lear2000/).
    -  This reply was modified 3 years, 10 months ago by [lear2000](https://wordpress.org/support/users/lear2000/).
 *  Plugin Author [Raul P.](https://wordpress.org/support/users/alignak/)
 * (@alignak)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/delay-third-party-scripts-until-user-interaction/#post-15829090)
 * The purpose of the buffer is to capture the page and apply the optimization, 
   hence it starts as late as possible, after the template loads on the (MAX) (latest)
   hook priority.
 * If you set it to zero and it works, that means the other plugin hooks somewhere
   between 0 and PHP_INT_MAX.
 * PHP_INT_MAX is the highest number possible, depending on your server.
    Usually
   2147483647 in 32 bit systems and 9223372036854775807 in 64 bit systems.
 * From a quick search, that plugin resorts to the buffer when the theme does not
   support overwriting the titles, and there is an option to disable that here:
   
   [https://aioseo.com/docs/aioseo_disable_title_rewrites/](https://aioseo.com/docs/aioseo_disable_title_rewrites/)
 * You can try or wait until I have some time to investigate this conflict (and 
   meanwhile you can use zero by editing the plugin… but watch out if the update
   breaks things again)
 *  Thread Starter [lear2000](https://wordpress.org/support/users/lear2000/)
 * (@lear2000)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/delay-third-party-scripts-until-user-interaction/#post-15835851)
 * in previous versions use went negative:
    add_action(‘template_redirect’, ‘fvm_start_buffer’,-
   PHP_INT_MAX);
 * im sure you know that, but i just logged into a site and noticed…

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Delay third party scripts until user interaction’ is closed to new replies.

 * ![](https://ps.w.org/fast-velocity-minify/assets/icon-128x128.jpg?rev=1440946)
 * [Fast Velocity Minify](https://wordpress.org/plugins/fast-velocity-minify/)
 * [Support Threads](https://wordpress.org/support/plugin/fast-velocity-minify/)
 * [Active Topics](https://wordpress.org/support/plugin/fast-velocity-minify/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/fast-velocity-minify/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/fast-velocity-minify/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [lear2000](https://wordpress.org/support/users/lear2000/)
 * Last activity: [3 years, 10 months ago](https://wordpress.org/support/topic/delay-third-party-scripts-until-user-interaction/#post-15835851)
 * Status: not resolved