Download the PHP package styletools/async without Composer
On this page you can find all versions of the php package styletools/async. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download styletools/async
More information about styletools/async
Files in styletools/async
Package async
Short Description A lightweight and high performance async CSS and script loader for frontend optimization.
License MIT
Informations about the package async
$async Async CSS and Script Loader
A lightweight and high performance async CSS and script loader with state of the art features for frontend optimization (FEO).
Install via npm
Install via PHP Composer
Examples
$async can be controlled from a HTML attribute which enables strict security.
The JSON configuration can be compressed to save size in the HTML (online compressor).
Documentation
Documentation is available on docs.style.tools/async.
Description
$async is designed as the ultimate CSS and script loader for modern frontend optimization (FEO). It provides state of the art features, the absolute best performance and the tiniest HTML footprint. $async supports all browsers including IE9+.
- 100% JSON control.
- Google Closure Compiler (GCC) with Advanced mode script compression (reliable and performant in all browsers).
Modular
$async is modular and easy to use: select only the features that are needed to achieve the tiniest script size.
- simply stitch pre-optimized GCC modules together for a performant IIFE. You can wrap the modules in package.json.
- Online IIFE generator (adds an extra GCC Advanced mode compression layer)
- Node.js/CLI IIFE generator (adds an extra GCC Advanced mode compression layer)
- PHP IIFE generator (available on request: [email protected])
Chainable
Security
$async supports a strict Content-Security-Policy (CSP) and SRI security by using a HTML attribute on the script element. The data-c attribute accepts JSON config.
Advanced download and exec/render timing
$async provides advanced loading and timing techniques.
- control the insert target.
- time the download and/or exec/render using methods such as
requestAnimationFrame,requestIdleCallbackand $lazy (Intersection Observer). - dependency based loading.
- responsive
Media Querybased loading with cross-browser support for viewport changes. just-in-timeloading using a custom javascript method.
just-in-time loading
API's
$async provides API's for access to the dependency resolver and timing methods.
localStorage cache
$async enables to load stylesheets and script from localStorage or Cache API cache which is much faster than browser cache.
For a demo, see css-art.com.
JSON compression
$async provides a JSON compression technique to minimize the size of configuration.
Online compressor | Node.js/CLI
Async script-injected stylesheet/script capture
$async provides an innovation to capture and rewrite, remove or modify/optimize script-injected stylesheets and scripts. The solution supports both native DOM insert method rewriting and MutationObserver.
- rewrite
- remove
- modify
- optimize (code optimization, apply timing, responsive loading, dependencies etc.)
Performance API timings for loading performance optimization
$async provides a debug mode with advanced Performance API timings that enables to analyse and optimize the CSS and script loading performance.
Demo
$async is in use on www.e-scooter.co (demo website) and css-art.com (test environment).
