Set-cookie: wp_wpfileupload
-
Hi,
I am using the
wfu_before_frontpage_scriptsfilter to prevent the plugin from loading on pages other than my specific upload page (ID: 216). Here is the snippet I am using:PHP
add_filter('wfu_before_frontpage_scripts', function($changable_data) { global $post; if ( isset($post->ID) && $post->ID != "216" ) { $changable_data["return_value"] = 0; } return $changable_data; }, 10, 1);The Problem: While this hook successfully prevents the JS/CSS files from being enqueued in the HTML, the plugin is still sending the
Set-Cookie: wp_wpfileupload_...header on the HomePage.Impact: Since the server (Nginx + SiteGround CDN) detects a
Set-Cookieheader, it treats the page as dynamic/private. This results in a “MISS” or bypass of the Edge Cache, significantly increasing the TTFB (Time to First Byte) for my users.Question: Is there a specific hook or a way to completely prevent the plugin from initializing its session and sending the
Set-Cookieheader on pages where the shortcode is not present? I need the Homepage to remain cookie-free to ensure 100% cacheability at the CDN level.Thank you for your help!
The page I need help with: [log in to see the link]
You must be logged in to reply to this topic.