GDPR合规中@@History/@@scroll|# Cookie的来源及用途咨询
Great question—this is a tricky one because that cookie name isn’t standard for core WordPress or most widely used plugins. Let’s break down what we can deduce and how to track down its origin:
What It Likely Does (Based on the Name)
Your initial guess is spot-on. The scroll and History keywords strongly suggest this is a functional cookie used to remember a user’s scroll position on the site. For example:
- If a user scrolls halfway down a long page, clicks a link to another page, then uses the back button, this cookie would let the site jump back to their last scroll position instead of resetting to the top.
- It’s almost certainly not a tracking cookie (unless the code is repurposing it for that, which is unlikely given the naming).
How to Find Its Origin
1. Core WordPress? No Way
Core WordPress never uses this naming convention. Its default cookies are all prefixed with wordpress_, wp-settings-, or wp-auth-—so this is definitely from a third-party tool or custom code.
2. Check Plugins & Themes
This is the most common source:
- Plugin Test: Disable all plugins, refresh your site, and check if the cookie disappears. If it does, re-enable plugins one by one until the cookie comes back—you’ll find the culprit.
- Theme Test: Switch to a default WordPress theme (like Twenty Twenty-Four). If the cookie is gone, your custom theme is generating it.
- Code Search: Dig into your theme and plugin files (use your hosting’s file manager or a local editor) to search for
setcookie(PHP) ordocument.cookie(JavaScript) paired with keywords likescroll,History, or the full cookie name@@History/@@scroll|#.
3. Custom Code?
It could also be a snippet added directly to your site:
- Check your theme’s
functions.phpfile for custom PHP cookie logic. - Look in your theme’s JS files (like
main.jsorcustom.js) for frontend code that saves scroll position to a cookie.
Quick Way to Confirm Its Purpose
- Delete the cookie via your browser’s dev tools (Application > Cookies > Select your site > Find and delete
@@History/@@scroll|#). - Scroll down a page on your site, navigate away, then come back.
- Check if the cookie is recreated, and look at its value—if it’s a number (like
500), that’s the pixel position of your scroll. This confirms it’s purely for UX, not tracking.
内容的提问来源于stack exchange,提问作者TwoLunch
相关产品推荐
相关产品推荐

