• Resolved jscrm

    (@jscrm)


    I have a contact form (powdered by the Contact Form 7 plugin) on a website.

    When running PageSpeed Insights, I get near perfect score but a warning is shown:

    Leverage browser caching for: https://domain.com/index.php/wp-json/contact-form-7/v1/contact-forms/2523/refill (expiration not specified)

    I have the Browser Cache option enabled on LSCache plugin. Is this the expected behaviour? Would it be possible to add browser cache to this request to achieve perfect score? ??

    Report number: GMFRMXES

    • This topic was modified 7 years, 1 month ago by jscrm.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Hai Zheng?

    (@hailite)

    LOL I don’t think so as that refill action is done by CF7 by purpose. With browser cached it, it can’t hit PHP anymore. However, you can try to contact CF7 to see if it’s possible or not.

    I have found the solution to fix this, go to Contact Form 7 Plugin Directory and then open JS folder inside that you will find file called scripts.js edit the file and find following code (line 35 to 37)

    if ( wpcf7.cached ) { wpcf7.refill( $form );}

    Edit this code to the following

    if ( wpcf7.cached ) { wpcf7.cached = 0;}

    or comment the code

    Issue fixed.

    Regards
    Sachin G.

    thank u @sachinghare

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Browser Caching Pagespeed Warning using Contact Form 7’ is closed to new replies.