WP eCommerce
[resolved] index.php?wpsc_user_dynamic_js Causing long load times (7 posts)

  1. LSB Web Design
    Posted 2 years ago #

    Hi I am trying to optimise a site for a client and one particular file from wp ecommerce is causing me some issues.

    The full file name in questions is: https://www.baccusstore.co.uk/index.php?wpsc_user_dynamic_js=true&ver=

    No matter what sort of configuration I set with w3tc there always seems to be a long wait time on this file.

    For reference you can check a test carried out with pingdom.

    Is there anything that can be done with this file to speed up the site.

    Any assistance would be appreciated.


  2. Jeffrey Schutzman
    Posted 2 years ago #

    I think this file was removed for version That's the best optimization you can get.

  3. LSB Web Design
    Posted 2 years ago #

    Brilliant thanks, updating to the latest version solved this issue.

  4. LSB Web Design
    Posted 2 years ago #

    On another note, there now seems to be a separate file causing long load times.


    Full file name: https://www.baccusstore.co.uk/wp-admin/admin-ajax.php?action=wpsc_validate_customer


    Im guessing this is something to do with the store cart. Can anything be done about this file?

  5. Jeffrey Schutzman
    Posted 2 years ago #

    That's not a file it is an AJAX action. It checks the cookie to make sure it is valid and represents a real user.

    It should be a very quick check. On my slower sites the entire transaction takes less than 200 ms, including the load of wordpress.

    IF you are seeing a delay there it is likely due to a performance issue wider in scope than just that ajax transaction.


  6. Jeffrey Schutzman
    Posted 2 years ago #

    The other issue is that the AJAX transaction you mention should only be called if there isn't a WPeC cookie set for the shopper's visit. It sets the cookie and should happen at the most once per visitor per 48 hours.

    You need to look into why the cookie isn't being set.

    See the code in the wp-e-commerce.js script at line 137. Also, the 'true' condition at line 138 is removed in future versions, and it is safe to remove on your site.

    // a global variable used to hold the current users visitor id,
    // if you are going to user it always check to be sure it is not false
    var wpsc_visitor_id = false;
    if ( ! ( document.cookie.indexOf("wpsc_customer_cookie") >= 0 ) ) {
    	if ( true || ! ( document.cookie.indexOf("wpsc_attempted_validate") >= 0 ) ) {
    		// create a cookie to signal that we have attempted validation.  If we find the cookie is set
    		// we don't re-attempt validation.  This means will only try to validate once and not slow down
  7. LSB Web Design
    Posted 2 years ago #

    Ok brilliant thanks for your help.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.