WordPress.org

Support

Support » Plugins and Hacks » [Resolved] index.php?wpsc_user_dynamic_js Causing long load times

[Resolved] index.php?wpsc_user_dynamic_js Causing long load times

Viewing 6 replies - 1 through 6 (of 6 total)
  • Jeffrey Schutzman
    Member

    @jeffpyebrookcom

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

    LSB Web Design
    Member

    @danceyrselfclean_admin

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

    LSB Web Design
    Member

    @danceyrselfclean_admin

    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?

    Jeffrey Schutzman
    Member

    @jeffpyebrookcom

    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

    Jeffrey Schutzman
    Member

    @jeffpyebrookcom

    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
    LSB Web Design
    Member

    @danceyrselfclean_admin

    Ok brilliant thanks for your help.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Resolved] index.php?wpsc_user_dynamic_js Causing long load times’ is closed to new replies.