Bump! need 1.9seconds here to lead refill 3x.
Contact form 7…. whats the fix?
Hi,
I got the same issue.
The line $wpcf7['cached'] = 1; is a js variable localized in the global scope (i.e. window scope), so you can change this var dynamically from anywhere you want after the var is initial by CF7.
You can paste this code in your functions.php:
function delete_refill_cf7() {
?>
<script>
if(wpcf7) {
wpcf7.cached = 0;
}
</script>
<?php
}
add_action('wp_after_admin_bar_render', 'delete_refill_cf7');
-
This reply was modified 8 years, 7 months ago by
shgotlib.
-
This reply was modified 8 years, 7 months ago by
shgotlib.
i try the above function but not working,
../wp-json/contact-form-7/v1/contact-forms/188/refill
is still there and takes a lot of time
anyone find a way to remove this?
maybe the author can give us a help?
thanks
Hello,
what I do is: open the following file:
/contact-form-7/includes/controller.php
Comment out the following lines like this:
### Commented out to resolve "refill" extra loading time
#if ( defined( 'WP_CACHE' ) && WP_CACHE ) {
# $wpcf7['cached'] = 1;
#}
You have to manually comment them out every time you update the plugin but that’s the only way I could successfully solve the issue.
In my opinion, the developer of the plugin could add an option to deactivate the “refill”, should you wish to…
If anyone found a better working solution, please share it with the world 🙂
I hope this helps your needs, at least for now.
Best regards
thank you @auralsolutions for your solution is much better like that.
You’re very welcome @mmichtus!
I saw this solution in another post from this thread:
https://ww.wp.xz.cn/support/topic/file-refill/#post-9461087
Have a nice day!
@takayukister, we use the CF7 math capatcha and WP Super Cache. I’m wondering if there is a solution to the slow load time of the /refill as we have 2-3 different forms on some pages and loading of the /refill takes much longer to load then all other web assets.
Here is a screenshot of an example page load:
https://www.screencast.com/t/Kgf2Smc7
Thank you,
SW
I’ve tried @auralsolutions solution and it works. “refill” no longer show up but it ended up causing a “Reduce server response time” suggestion by Google PageSpeed.
Any other solutions?
-
This reply was modified 7 years, 11 months ago by
imtino.
Same issue here with SG Optimizer and WP Rocket. I haven’t any reCAPTCHA on the page. I’m really surprise seeing that no-one answer us officially.