Config screen
Create a Context - css
Create a context - js

This project is not covered by Drupal’s security advisory policy.

Often the pages any drupal site loads lots of css/js file which are not specifically required for that page. Some injected by drupal itself, some by modules and we dont have a easy way to purge them. That hits performance and may cause other complexities. This an advanced tool to attach purge unnecessary css/js files from your site and insert page specific assets as required. As it comes as a context plugin, you have the flexibility to set what ever condition you like and accordingly dress up the pages.

It is inspired from the module Context Add Assets where you can add additional css/js based context without purging the existing one.

Here, while rendering pages, you can config to purge all existing css/js ( indluding drupal core) or only the assets injected by the contrib/custom modules before you inject css/js files for your own choice. You also have advanced options to decide how you want load each files,

  1. Set scope, group and weight of the file to make it appear exact where you like
  2. Set if you want to load Async or Defer. ( JS files )
  3. Set if you want to minimize and embed the css content inline in DOM instead of injecting as file ( good for performance )
  4. Set if you want to add a preload tag

Its a good tool for enhancing the site performance, specially with Light house or Pagespeed. It can help with,

  1. Minimize render blocking resources
  2. Enhance Page load by defer loading non critical resources.
  3. Enhance Page load by inlining critical css
  4. Enhance page interactive Time
  5. Reduce DOM size by eliminating unnecessary resources.
  6. Preload tag also help performance
Supporting organizations: 

Project information

Releases