Title: ?v=random_string in URL
Last modified: February 6, 2025

---

# ?v=random_string in URL

 *  Resolved [docjojo](https://wordpress.org/support/users/docjojo/)
 * (@docjojo)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/vrandom_string-in-url/)
 * Hello,
   I understand that ?v=random_string is related to WooCommerce -> Settings-
   > General -> Default customer location.But i wonder why the ?v=random_string 
   is added to all pages even if they are not woo pages?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fvrandom_string-in-url%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [Moses M. (woo-hc)](https://wordpress.org/support/users/mosesmedh/)
 * (@mosesmedh)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/vrandom_string-in-url/#post-18291743)
 * Hi [@docjojo](https://wordpress.org/support/users/docjojo/),
 * In WordPress, the `v` parameter in the URL, such as `?v=66e10e9ff65e`, is typically
   used by themes or plugins to handle versioning or prevent caching issues. This
   is especially common with dynamically generated or updated CSS and JavaScript
   files.
 * It’s not exclusive to WooCommerce, so it seems a plugin may have added it to 
   your site’s URL. Could you share your system status report by going to **WooCommerce
   > Status > Get Report**, then copying and sharing it using [https://gist.github.com](https://gist.github.com)
   or [pastebin.com](https://pastebin.com)? This will help me better understand 
   your setup.
 *  Thread Starter [docjojo](https://wordpress.org/support/users/docjojo/)
 * (@docjojo)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/vrandom_string-in-url/#post-18291880)
 * It is woo related.
   If I switch to geolocate, the ?v= is gone.[https://fastturn.net/](https://fastturn.net/)
 * Question is, why is ?v= added on contact page an other pages that are not woo
   related, even main page / get’s ?v= added.
   In code it says:
 *     ```wp-block-code
       public static function geolocation_ajax_redirect() {
           if ( 'geolocation_ajax' === get_option( 'woocommerce_default_customer_address' ) && ! is_checkout() && ! is_cart() && ! is_account_page() && ! wp_doing_ajax() && empty( $_POST ) ) { // WPCS: CSRF ok, input var ok.
       ```
   
 * so what can i do to prevent woo from adding ?v= to pages that are not woo related?
 *  Plugin Support [shahzeen(woo-hc)](https://wordpress.org/support/users/shahzeenfarooq/)
 * (@shahzeenfarooq)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/vrandom_string-in-url/#post-18293189)
 * Hi there!
   Sorry for the confusion, You’re correct that the `?v=random_string`
   parameter is related to **WooCommerce → Settings → General → Default Customer
   Location**, specifically when **“Geolocate (with page caching support)”** is 
   enabled.
 * This parameter is added to help serve cached pages with the correct currency 
   and tax settings based on the customer’s location.
   To remove that string, I suggest
   setting the **Default Customer Location** to **Geolocate** instead of **Geolocate(
   with page caching support)**. Once you select **Geolocate**, the `?v=random_string`
   will automatically be removed.If you want to use the **Geolocate (with page caching
   support)** option and remove the string from the URL, you will need to apply 
   a customization. Please note that we do not provide support for customizations.
   If you need more in-depth support or want to consider professional assistance
   for customization, I can recommend [WooExperts](https://partners.woocommerce.com/English/marketplace/)
   and [Codeable.io](https://woocommerce.com/codeable/) as options for getting professional
   help. Alternatively, you can also ask your development questions in the [ WooCommerce Community Slack](https://woocommerce.com/community-slack/)
   as custom code falls outside our usual [scope of support](https://woocommerce.com/support-policy/#customization)
   Let me know how that goes.
 *  Thread Starter [docjojo](https://wordpress.org/support/users/docjojo/)
 * (@docjojo)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/vrandom_string-in-url/#post-18293231)
 * Thank you.
   But that does not answer my question, why is woo adding this string
   and the geo cookie on pages that have no product, cart or any other woo component,
   like the contact or privacy page.Woo should only add the ?v= string if the page
   contains any woo content.
 *  [Moses M. (woo-hc)](https://wordpress.org/support/users/mosesmedh/)
 * (@mosesmedh)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/vrandom_string-in-url/#post-18293471)
 * Hi [@docjojo](https://wordpress.org/support/users/docjojo/),
 * Apologies for the earlier confusion.
 * The reason WooCommerce adds the `?v=random_string` parameter and the geo cookie
   to all pages, even those without WooCommerce content, is because the geolocation
   setting applies site-wide. When **“Geolocate (with page caching support)”** is
   enabled, WooCommerce appends the `?v=` parameter to ensure that the correct tax
   and currency settings are applied for each visitor based on their location.
 * Since caching affects the entire site, WooCommerce does this globally to avoid
   inconsistencies, even on pages that don’t directly contain WooCommerce elements.
   If you’d prefer this behavior to be limited to WooCommerce pages, switching to**“
   Geolocate”** instead of **“Geolocate (with page caching support)”** should help.
 *  Thread Starter [docjojo](https://wordpress.org/support/users/docjojo/)
 * (@docjojo)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/vrandom_string-in-url/#post-18293506)
 * I see, i think that is a drawback, as the woo_geo_hash function also includes
   the customer object which unnecessarily slows down things, plus it is implement
   with safe_redirect which results in a 307 redirect, which means another request
   to the server.
   I am writing a page cache plugin and it is really hard to support
   woo product pages with geo based tax.
 * caching with geo enabled is renders useless because
   1) 307 redirect is an additional
   request, thus super slow2) cached page are relative to country, or if a registered
   user, relative to user, which means several pages in cache for the same product
   page.caching without geo means1) cached page is quasi static, thus will not show
   the correct tax price2) cached page will not response to cart or geo cookie
 * So, i really have no idea to handle this, except completely excluding woo pages
   
   Is there any ideas, advice, recommendation about how to do page caching with 
   woo?
 *  [Zee](https://wordpress.org/support/users/doublezed2/)
 * (@doublezed2)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/vrandom_string-in-url/#post-18294276)
 * Hello [docjojo](https://wordpress.org/support/users/docjojo/),
 * Thank you for your reply.
 * I understand your question about WooCommerce’s geo-based tax calculation and 
   page caching.
 * I recommend posting this question at [Woo Community Slack](https://woo.com/community-slack/).
   
   There are many WooCommerce developers and merchants available there who might
   be able to help you develop a custom plugin.
 * Let me know if you have any other questions.
 * Best regards.
 *  Thread Starter [docjojo](https://wordpress.org/support/users/docjojo/)
 * (@docjojo)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/vrandom_string-in-url/#post-18294279)
 * Thank you.

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

The topic ‘?v=random_string in URL’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

 * 8 replies
 * 4 participants
 * Last reply from: [docjojo](https://wordpress.org/support/users/docjojo/)
 * Last activity: [1 year, 4 months ago](https://wordpress.org/support/topic/vrandom_string-in-url/#post-18294279)
 * Status: resolved