• Resolved justin-bigscoots

    (@justin-bigscoots)


    Is it possible to disable cookies?

    set-cookie: _delicious_recipes_session=64aeda85b15c082c7a3a50cdee66b07b%7C%7C1646194308%7C%7C1646193948; expires=Wed, 02-Mar-2022 04:11:48 GMT; Max-Age=1742; path=/

    This causes the cache to bypass on all pages when using Cloudflare for page caching since it automatically bypasses when a Cookie is set

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author WP Delicious

    (@wpdelicious)

    Hello @justin-bigscoots,

    The cookie had been set up in the plugin as a part of handling and displaying notices in the plugin’s frontend User Dashboard.

    Currently the feature to disable the cookie is not yet available in the plugin. We will however look into ways to add compatibility with caching like Cloudflare services and implement them in our future updates.

    Regards.

    Plugin Author WP Delicious

    (@wpdelicious)

    Hello @justin-bigscoots

    With the new version of Delicious Recipes plugin, we have now added a filter to disable the session / cookie in the frontend. Disabling the cookie will resolve the issues related to your server cache.

    To disable the cookie, you will need to add the following code in your site through child theme, or custom snippets plugin:

    add_filter( 'dr_session_allow_js_cookie_fe', '__return_false' );

    This will prevent DR plugin from setting the cookie in frontend of the site.

    If you have any queries further, please feel free to create a support ticket here.

    Regards!!

    Hello @wpdelicious

    i tried to disable the cookie by adding the filter to my child themes function.php, but the $allow_js_cookie keeps always 1 in class-wp-session.php:94

    (first tried your example code, which also didn’t disable the cookie)

    add_action('after_setup_theme', function() {
    	add_filter( 'dr_session_allow_js_cookie_fe', function(){
    		error_log('adding filter dr_session_allow_js_cookie_fe');
    		return false;
    	}, 1 );
    });
    Plugin Author WP Delicious

    (@wpdelicious)

    Hi @halimat,

    We have released a new update. Can you please update the plugin and let us know if it solves the issues or not?

    Thank you.

    Hi @wpdelicious

    I’ve tested the latest plugin version with both ways adding the filter, the way like you mentioned and also wrapping the filter in after_setup_theme, with both methods i still get the cookie header:

    $ curl -IL https://stage.eatclub.tv/
    HTTP/2 200 
    server: nginx
    date: Fri, 08 Jul 2022 09:50:06 GMT
    content-type: text/html; charset=UTF-8
    set-cookie: _delicious_recipes_session=eed0586686bcd4c6961332111d1ce14f%7C%7C1657275605%7C%7C1657275245; expires=Fri, 08-Jul-2022 10:20:05 GMT; Max-Age=1800; path=/
    x-hacker: If you're reading this, you should visit wpvip.com/careers and apply to join the fun, mention this header.
    x-powered-by: WordPress VIP <https://wpvip.com>
    host-header: a9130478a60e5f9135f765b23f26593b
    x-robots-tag: noindex, nofollow
    p3p: CP="ALL DSP NID CURa ADMa DEVa HISa OTPa OUR NOR NAV DEM"
    link: <https://stage.eatclub.tv/wp-json/>; rel="https://api.w.org/"
    link: <https://stage.eatclub.tv/wp-json/wp/v2/pages/1394>; rel="alternate"; type="application/json"
    link: <https://stage.eatclub.tv/>; rel=shortlink
    x-rq: hhn1 0 4 9980
    age: 0
    x-cache: miss
    accept-ranges: bytes

    Looks like the filter never get’s applied.

    Regards

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Cookies’ is closed to new replies.