UNPKG

systemjs-cachebuster

Version:

Patches SystemJS loader with a cache buster query string

52 lines (42 loc) 1.27 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <script src="lib/system.src.js"></script> <script src="lib/system.cachebuster.js"></script> <script> System.config({ defaultJSExtensions: true, }); SystemCacheBuster.config({ enableLogs: true }); System.import("src/module3"); </script> </head> <body id="body"> <h1>systemjs-cachebuster Plugin Sample App</h1> <h2> This sample application demonstrates the caching problem with SystemJS and the way you can solve that with the systemjs-cachebuster plugin </h2> <ol> <li> Open src/module1.js and change the innerHTML value </li> <li> Refresh the browser. You should not see the new value </li> <li> Execute "gulp watch" and refresh the browser again </li> <li> Now you should see the value </li> <li> Open browser's dev tools and look at the network tab. The systemjs-cahcebuster plugin effects SystemJS XHR requests </li> </ol> <span id="data"></span> </body> </html>