I'm using Primefaces 3.3 in combination with Twitter Bootstrap 2.0.
When I load my homepage in chrome for the first time and inspect what is being loaded I can see the following javascript and css.
From PrimeFaces
- primefaces.js 172KB
- jquery.js 308KB
- primefaces.css 43KB
- theme.css 28KB
- bootstrap.min.css 93KB
- bootstrap.min.js 22KB
Needless to say the page loads really slowly the first time a user hits the home page and all this javascript and css has to be fetched from the server. On subsequent pages the scripts are retrieved from the browser cache which helps.
So far I have tried the following with to try and help performance:
- set the glassfish 3.1.2 server to use HTTP/1.1 GZIP to try and reduce the network traffic.
- set file caching on the server.
- targeted the bootstrap.min.js for the end of the body content
Is there anything else I can try to reduce the page load when the user first hits the homepage?