Reputation: 1149
Currently I'm working on a huge project that involves thousands of lines of CSS, JavaScript and a bunch of images. Minifying CSS style sheets and JavaScript files with added compression helps a lot, but it still isn't perfect.
For preloading images in CSS stylesheets, I have found a bunch of plugins, including here on stackoverflow. However, since there are a lot of jQuery and JavaScript libraries - preloading just CSS images in stylesheets doesn't help my cause at all. Is there a way to preload the CSS files themselves, along with images found in those files, and JavaScript libraries in one go? I would use such a feature after confirming user credentials, and after preloading the required content redirecting users to the inner content.
Also: I could easily provide an array of files needed for preloading, without having JavaScript to parse any files.
Upvotes: 1
Views: 914
Reputation: 10658
You might take a look at using the appcache to cache resources. That will speed things up for modern browsers, though won't help you with older ones. There's a good tutorial here.
I'm guessing most of your page size comes from images. You might try spriting your images and using gzip, which is supported by even older browsers (IE 5.5+ for example).
Upvotes: 1