1. A method implemented at least in part by a computer, the method comprising: prefetching a package that includes source code of software to install on a target device, wherein the package is a script file for a page of a website for which an explicit reference to the script file has not been encountered; installing the package on the target device; and performing a first set of actions to initially compile the source code prior to executing the software unless a request to execute the software is received before starting or completing the first set of actions, the first set of actions including: compiling the source code into the second code, and persisting the second code in nonvolatile memory.