Support » Plugins and Hacks » Quick fix? faster loading lens.css and lens.js

Quick fix? faster loading lens.css and lens.js

  • We ran a e-commerce site with custom domain (eg example.com), mapped with Domain Mapping plugin. SlideDeck2 slides are placed on home page.

    Using tools.pingdom.com, i noticed lens.css and lens.js have longer wait time than other scripts. And they are served from the original domain (eg store1.wphost.org). It was found in slidedeck2/classes/slidedeck-lens.php, line 487, in get_meta function:
    $lens_url = untrailingslashit( WP_PLUGIN_URL ) . str_repla...

    The line is modified as:
    $lens_url = plugins_url() . str_repla...
    After which, both lens.js & lens.css are loaded from mapped domain (example.com).

    Surprisingly, with the minor change, wait time of both lens files are reduced. Specifically, tests on tools.pingdom.com reduced by 0.5s-1s. This could be huge for slow, relative low-bandwidth servers.

    i wonder if similar observation can be reproduced elsewhere.


  • The topic ‘Quick fix? faster loading lens.css and lens.js’ is closed to new replies.