Formated by GeSHi
Hi, there is an easy way to speed up page load, and decrease server load at the same time. In theory: Since most of u'r pages uses small images, the server has to answer many http requests. To minimize this effect put several images in one larger, and use it via css background-image, positioned to show only the needed part, and setting backgroundrepeat to no. In praxis: All the flags could be in one img. Assuming the following things: -the first 3 flags in the img are: eng, ger, hun -they are next to each other -the width of one flag is 20px -the height of one flag is 10px; -the name of the big image is all_flags.png u can show the flags like this: in the html file: <div class="flag" style="background-position:0px 0px"></div> english <div class="flag" style="background-position:-20px 0px"></div> german <div class="flag" style="background-position:-40px 0px"></div> hungarian in the css file: div.flag { width: 10px; height: 10px; background-image: url('all_flags.png'); background-repeat: no; } This way, the number of http request for the flags will be only 1 instead of a lot, and the network traffic will also be less, since one file has only one header. Please implement this technique, to speed up the page load. It's good for the server, it's good for the user. Have a nice day. nb000Parsed in 0.01409817 seconds
| :: Download | ||||
| :: Print into | ||||
:: Make Diff
:: Erase Post