5 ms·
Here are a few that were not mentioned: - If you have a lot of images like in a product catalog, try lazy loading the images - http://www.appelsiini.net/projec
by niyazpk 15y ago
Here are a few that were not mentioned:
- If you have a lot of images like in a product catalog, try lazy loading the images - http://www.appelsiini.net/projects/lazyload http://www.appelsiini.net/projects/lazyload
- For sprite-ing your images, use some tool which will automatically generate the css for you: http://spritepad.wearekiss.com http://spritepad.wearekiss.com
- Have a git commit hook for compressing images. (It could be part of your build, but then you are doing the work every time and the build will be slow if you have a lot of images.)
- If you are using LessCSS or something similar (hint: you should), have your compiler compress the css for you. - http://wearekiss.com/simpless http://wearekiss.com/simpless
- Have multiple hosts referring to your CDN to facilitate parallel downloads in the browser.
- Compress your HTML too before deploying - http://code.google.com/p/htmlcompressor/ http://code.google.com/p/htmlcompressor/
- Have proper versioning in the name of your JS/CSS files and then cache them for ever. Whenever you change your files, the version should change and only that file will be updated in the client. We normally take the hash of the latest git commit on that file:
cookie-wrapper.js -> cookie-wrapper.bb9303b809210674.js
- Offload whatever you can from your cookies to localStorage or things like that to reduce request size.
- sophacles 15y agoCan you expand on simpleless a bit, and why it is better than using lessc from the lesscss project? I'm not seeing any good resources on the project page and a googling is turning out to be basically useless to find more info.
- chriskelley 15y agoI believe the lessc compiler requires a node environment and simpleless is self contained.