• Resolved Matt Biscay

    (@skyminds)


    Hi,

    At the moment, the plugin loads assets sitewide, even on posts/pages/CPT which do not feature a video.

    Could it be possible to add the options to:
    – load video-js.css locally
    – only load the plugin assets when there is an actual video in a given post/page/CPT

    Thank you,
    Matt

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Swarmify

    (@jdadmin)

    We are working on enabling functionality to defer loading JS and CSS until needed by videos on page which should do what you are looking for here.

    In the mean time, even though the files are included on all of your pages, they are only ever loaded a single time by your users. We send over caching headers to indicate these files can be reused across sessions and even across websites. The caching provides a significant reduction in any impact from loading these scripts.

    If you anticipate that most users will load even one page with video on it during their session, then the actual impact of loading our JS/CSS should be minimal since they will need it for the page with video, and on other pages it is completely cached.

    Thread Starter Matt Biscay

    (@skyminds)

    Hi,

    I’m seeing different things using GTMetrix:

    Yslow > Add Expires headers > 3 static components without a far-future expiration date:

    Pagespeed > Leverage browser caching for the following cacheable resources:

    JS/CSS of external resources can also be further compressed.

    Thanks

    Plugin Author Swarmify

    (@jdadmin)

    These are accurate in terms of the caching not being a far future date, which means 1 year+ expirations.

    Our caching is set to enable the files to be cached for 1 day before being checked back on for changed versions. The checking for changed versions doesn’t require a complete reload of the file, it is just a simple check for whether a new version is present and only then loads it. Also, we have configured these new version checks to use the older version while the page loads and use the newer version on the next page load that occurs and needs the file. So that generally prevents any slow downs since even expired javascript files are marked as usable during the cache refresh.

    YSlow hasn’t been updated since 2014 which means it doesn’t have an understanding of these newer caching directives.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Assets loading’ is closed to new replies.