I have a large 40,000 words array loading from a database into a JavaScript/HTML array on every page of our web application... What would be the best way/technology to optimize it? In order to avoid this unnecessary downloads. 

1. Somehow keep the array in a cookie and read from there?
2. Use ajax to load the array dynamically only parts that are needed?

What is the common practice?