Title: Assets loading
Last modified: June 14, 2020

---

# Assets loading

 *  Resolved [Matt Biscay](https://wordpress.org/support/users/skyminds/)
 * (@skyminds)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/assets-loading-2/)
 * 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 [JDAdmin](https://wordpress.org/support/users/jdadmin/)
 * (@jdadmin)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/assets-loading-2/#post-12987630)
 * 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](https://wordpress.org/support/users/skyminds/)
 * (@skyminds)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/assets-loading-2/#post-13053287)
 * Hi,
 * I’m seeing different things using GTMetrix:
 * **Yslow > Add Expires headers > 3 static components without a far-future expiration
   date:**
    - [https://assets.swarmcdn.com/cross/css/video-js.css](https://assets.swarmcdn.com/cross/css/video-js.css)
    - [https://assets.swarmcdn.com/cross/swarmcdn.js](https://assets.swarmcdn.com/cross/swarmcdn.js)
    - [https://assets.swarmcdn.com/cross/config/xxx-xxx-xxx-xxx-xxx.js](https://assets.swarmcdn.com/cross/config/xxx-xxx-xxx-xxx-xxx.js)
 * **Pagespeed > Leverage browser caching for the following cacheable resources:**
    - [https://assets.swarmcdn.com/cross/config/xxx-xxx-xxx-xxx-xxx.js](https://assets.swarmcdn.com/cross/config/xxx-xxx-xxx-xxx-xxx.js)(
      1 minute)
 * JS/CSS of external resources can also be further compressed.
 * Thanks
 *  Plugin Author [JDAdmin](https://wordpress.org/support/users/jdadmin/)
 * (@jdadmin)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/assets-loading-2/#post-13064190)
 * 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.

 * ![](https://ps.w.org/smartvideo/assets/icon.svg?rev=2163219)
 * [SmartVideo - Video Player and CDN](https://wordpress.org/plugins/smartvideo/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/smartvideo/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/smartvideo/)
 * [Active Topics](https://wordpress.org/support/plugin/smartvideo/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/smartvideo/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/smartvideo/reviews/)

## Tags

 * [assets](https://wordpress.org/support/topic-tag/assets/)
 * [performance](https://wordpress.org/support/topic-tag/performance/)

 * 3 replies
 * 2 participants
 * Last reply from: [JDAdmin](https://wordpress.org/support/users/jdadmin/)
 * Last activity: [6 years, 3 months ago](https://wordpress.org/support/topic/assets-loading-2/#post-13064190)
 * Status: resolved