Along with caching the objects, you can also enhance a script's performance by caching the entire scriptin other words, by including it in a
.js file. This way, the browser loads the script only once and recalls it from the cache for the subsequent requests:
<script src="reqscripts.js"></script>
You can use this method when your scripts are large or being used in multiple pages.