Powered Cache offers four different JavaScript execution methods.


The traditional, default method for executing JavaScript on a web page is “blocking”. When the browser encounters a script during the parsing of HTML, it stops downloading and executes the script before continuing. This can lead to perceived delays in page load time.

<script src="script.js"></script>


The async attribute is a boolean attribute. When present, it specifies that the script will be executed asynchronously as soon as it’s available.

<script async src="script.js"></script>


The defer attribute is a boolean attribute that specifies that the script should be executed after the document has been parsed, but before firing DOMContentLoaded.

<script defer src="script.js"></script>


The “Delayed” method allows the script to only be loaded and executed when the user interacts with the page in a certain way (like scrolling or clicking). This method can be particularly useful for scripts that are not necessary for the initial rendering of the page.

<script data-type="lazy" data-src="script.js"></script>

If there is no user action in 5 seconds, it will execute the JS after reaching the time limit.