Title: drop query string, use cookie instead
Last modified: September 20, 2024

---

# drop query string, use cookie instead

 *  Resolved [raymond621](https://wordpress.org/support/users/raymond621/)
 * (@raymond621)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/drop-query-string-use-cookie-instead/)
 * Hi Support
 * I am trying to drop query string to limit the number of cache copies. Enable 
   cookie simulation to serve cache copies base on value of cookies.
 * So this query string is dropped > ?wmc-currency
 * Under cookie simulation, I added this cookie wmc_current_currency with values:
   _null, AUD, CAD, NZD etc…
 * when I visit a page [http://www.abc.com/productA/?wmc-currency=AUD](http://www.abc.com/productA/?wmc-currency=AUD),
   a cookie is fired but why isn’t the currency showing as AUD, it reverting back
   to the default USD currency.
 * I had an impression that the cookie simulation can be used for this purpose.

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

 *  Plugin Support [litetim](https://wordpress.org/support/users/litetim/)
 * (@litetim)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/drop-query-string-use-cookie-instead/#post-18026675)
 * The issue is related to crawler by cookies, yes? [https://docs.litespeedtech.com/lscache/lscwp/crawler/#cookie-simulation](https://docs.litespeedtech.com/lscache/lscwp/crawler/#cookie-simulation)
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/drop-query-string-use-cookie-instead/#post-18026933)
 * I don’t think you can do thing this way.
 * when you set a drop query string, then it will no longer be treated as separated
   URI
 * for example by default
 *     ```wp-block-code
       /something//something/?currency=XXX/something/?currency=YYY/something/?currency=ZZZ
       ```
   
 * this is 4 caches
 * when you drop it , these 4 URIs will hit same cache , instead of 4
 * and in the cache `/something/` is cached already , then `?currency=` will be 
   dropped , won’t trigger PHP anymore , so it displays `/something/` content , 
   in your case, the default USD currency
 *  Thread Starter [raymond621](https://wordpress.org/support/users/raymond621/)
 * (@raymond621)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/drop-query-string-use-cookie-instead/#post-18028287)
 * ok, i just removed the cookie simulation. Under cache>advance, I have also left
   it blank under login cookie and cache vary. When I visit my htacess file, it 
   says the following:
 * marker LOGIN COOKIE start
 * RewriteRule .? – [E=”Cache-Vary:,wp-postpass_2cdc91481948393ac7cf30292d6e21d2,
   wmc_current_currency,wmc_current_currency_old,wmc_ip_info”] marker LOGIN COOKIE
   end
 * I try to edit the htacess file by deleting “RewriteRule .? – [E=”Cache-Vary:,
   wp-postpass_2cdc91481948393ac7cf30292d6e21d2,wmc_current_currency,wmc_current_currency_old,
   wmc_ip_info”] ” but it seems on coming back up. Not sure what this is for.
 *  Thread Starter [raymond621](https://wordpress.org/support/users/raymond621/)
 * (@raymond621)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/drop-query-string-use-cookie-instead/#post-18028288)
 * I will also like to add that under database wp_options, there is this litespeed.
   conf.cache-login_cookie with no option_value and autoload is set to yes.
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/drop-query-string-use-cookie-instead/#post-18028366)
 * manually remove won’t work , it will add back by whoever adds it in the first
   place, you may need to figure out what add it first , otherwise each time you
   click “save” button in plugin , it will regenerate
 * if not showing in database, that means some plugin called our API for cookie 
   vary
 *  Thread Starter [raymond621](https://wordpress.org/support/users/raymond621/)
 * (@raymond621)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/drop-query-string-use-cookie-instead/#post-18028546)
 * I am reading this article regarding on cache vary settings from cache>advance
 * [https://gitlab.litespeedtech.com/preview/lscache/vary/index.html#:~:text=VARY%20%3D%20VARY_COOKIE%20%2B%20VARY_VALUE-,Vary%20Cookie,vary%20on%20the%20cookie%20my_cookie%20](https://gitlab.litespeedtech.com/preview/lscache/vary/index.html#:~:text=VARY%20%3D%20VARY_COOKIE%20%2B%20VARY_VALUE-,Vary%20Cookie,vary%20on%20the%20cookie%20my_cookie%20).
 * “The Cache Vary is an important concept for caching. For simplicity’s sake, the
   idea behind cache varies is that they allow the cache to save multiple versions
   of the same URL.”
 * Under the field vary cookies, do I enter this:
 * `VARY = "wmc_current_currrency=USD"`
 * Or
 * wmc_current_currency
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/drop-query-string-use-cookie-instead/#post-18028555)
 * I’d suggest just put
 * `RewriteRule .? - [E=Cache-Vary:my_cookie]`
 * at top of your .htaccess , the field you mentioned was meant for login-vary

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

The topic ‘drop query string, use cookie instead’ is closed to new replies.

 * ![](https://ps.w.org/litespeed-cache/assets/icon-256x256.png?rev=2554181)
 * [LiteSpeed Cache](https://wordpress.org/plugins/litespeed-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/litespeed-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/litespeed-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/litespeed-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/litespeed-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/litespeed-cache/reviews/)

 * 7 replies
 * 3 participants
 * Last reply from: [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * Last activity: [1 year, 8 months ago](https://wordpress.org/support/topic/drop-query-string-use-cookie-instead/#post-18028555)
 * Status: resolved