• Resolved mgozdis

    (@mgozdis)


    Hi there!

    Can you explain the purpose of the wpcf7_guest_user_id cookie? This appears to be set regularly which ends up busting cache on most servers, causing performance issues.

    Can you introduce a hook/filter or other setting in the plugin to prevent the cookie from being created?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Glen Don Mongaya

    (@glenwpcoder)

    Hi @mgozdis ,

    Thanks for reaching out.
    The purpose of the cookie is to generate unique folder for each user guest/logged-in user, it will expire after 12 hours.

    Can you please guide me on how to check and verify that this could affect the performance?

    Glen

    Thread Starter mgozdis

    (@mgozdis)

    Sure! Any time a cookie is set, cache is generally busted. This means any pages where this cookie is set will never be cached.

    Depending on the server, that can cause the TTFB to increase from milliseconds to seconds. For testing, you would need to use a server or service that utilizes caching where you’ll see setting the cookie causes all cache to be bypassed or missed.

    Here is a GTmetrix report with the cookie set, breaking cache and 697ms TTFB:
    https://d.pr/i/bFDpkV

    Here is a retest with commenting out setcookie in the plugin, cache working, and TTFB of 42ms:
    https://d.pr/i/xMRoLZ

    Because the cookie busts cache, the TTFB is more than 10x slower. It affects all core web vitals including FCP and LCP, which are ~5x slower.

    For sites hosted on WordPress.com, they have a developer doc for checking set-cookie headers to see if plugins are preventing cache from working if you aren’t familiar with this: https://developer.wordpress.com/docs/troubleshooting/site-performance/#8-review-your-site-s-caching-functionality

    Hope that helps!

    Plugin Author Glen Don Mongaya

    (@glenwpcoder)

    Thanks @mgozdis , I will update the plugin and create a cookie using javascript instead of php.

    Plugin Author Glen Don Mongaya

    (@glenwpcoder)

    @mgozdis please update to the latest version and see if this resolves your issue.

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

The topic ‘wpcf7_guest_user_id cookie’ is closed to new replies.