WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. LSB Web Design
    Member
    Posted 3 months 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=3.8.13.4.e1349d0

    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.
    http://tools.pingdom.com/fpt/#!/enh1TW/https://www.baccusstore.co.uk/

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

    Any assistance would be appreciated.

    https://wordpress.org/plugins/wp-e-commerce/

  2. Jeff Pye Brook
    Member
    Posted 3 months ago #

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

  3. LSB Web Design
    Member
    Posted 3 months ago #

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

  4. LSB Web Design
    Member
    Posted 3 months ago #

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

    wp-admin/admin-ajax.php?action=wpsc_validate_customer

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

    http://tools.pingdom.com/fpt/#!/bVDDdO/https://www.baccusstore.co.uk

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

  5. Jeff Pye Brook
    Member
    Posted 3 months 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.

    -jeff

  6. Jeff Pye Brook
    Member
    Posted 3 months 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
    Member
    Posted 3 months ago #

    Ok brilliant thanks for your help.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.