In this recipe, we will learn about running PhantomJS with an on-disk cache that is enabled using the
max-disk-cache-size command-line arguments. We can use this to test how browsers cache our static assets.
To run this recipe, we will need a script to run with PhantomJS that accesses a website with cacheable assets. Optionally, we will also need a sense of how large we wish to set the on-disk cache (in kilobytes).
The script in this recipe is available in the downloadable code repository as
chapter01. If we run the provided example script, we must change to the root directory for the book's sample code.
Lastly, the script in this recipe runs against the demo site that ...