• Hi,
    I need some help to identify the cookie scripts of the cookie names below. I found these by right-clicking in my website and then inspect-applications-cookies
    I need the scripts so that I can set up a cookie consent banner and block non-necessary cookies until consent is given. Are the below cookies non-necessary and could you please tell me what their script is?
    Many thanks in advance.
    tk_lr
    tk_or
    tk_tc
    wp-settings-2
    wp-settings-time-s

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    The wp-settings-* cookies only are used for logged in users, they store the current admin area states like whether the editor is in visual or code view, etc. When they are deleted WP reverts to its default state for the admin area.

    The tk_* cookies belong to a plugin or your theme. If you don’t know which one, change your theme to twentytwenty and deactivate all plugins. In another browser or computer, log out if you are logged in there, then delete all cookies for your site. In the first browser where you are still logged in, restore your theme and plugins one at a time. After each, reload your site in the other browser and check your site’s cookies. When the tk_* cookies re-appear, the last activated module is the cause.

    You can search that module’s source code for what scripts it enqueues or cookie headers it sets. They should be done via action hooks, so you could conditionally remove the hooks via custom code when necessary. If you have trouble finding the right code, ask the module’s original devs for assistance. Dequeueing scripts that set cookies could also break plugin functionality.

    Thread Starter everydaybymasha

    (@everydaybymasha)

    Hi, thank you for your help.
    I will try checking with theme and some plugin first, hopefully they can give some clarity.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Cookie script identification’ is closed to new replies.