Mar 14, 2012

CSS tips on improving server performance

CSS Sprite for images:

To improve on CSS loading, instead of creating multiple images and loading separately (which incur multiple HTTP GET), we can combine those images together into 1 picture, then use the CSS to slice them up to use later on.

This technique reduce the number of HTTP GET for the images, but its has its own penalty when you want to update/change certain part in the layout of the page: you’ll have to spend more time to tweak the whole sprites instead of editing just one image.

That’s it: pros & cons, performance vs. maintainability. Anyway, most likely for production server, CSS Sprite is in favor as it offer better performance while costing a little bit on maintaining the CSS & images

No comments:

Post a Comment