With the advent of broadband connectivity, the websites are nowadays loading much more faster than the past without much optimisation. But at the same time, the visitors are probably looking for something more faster. They are not in a mood to wait for more than a few seconds to see the requsted url being loaded.
So, in view of this changing scenario one needs to optimise webpages so that they load faster.
So here is the brief guideline you may follow to make it load your webpages faster.
1. Load as much information as you can when a page loads for the first time. Use CSS to show/hide parts, instead of loading them afresh each time an url is requested.
As for example, you can check out how fast content can be refreshed in the home page of Rediff.com.
3. Disable the buttons and change their captions appearing in your webpage, once the user has clicked it. This will prevent them from clicking the same button repeatedly. Captions like 'requesting the server' will help them to understand what is going on.
<input type="button" value="Submit" onclick="this.value='Requesting the server...'; this.disabled='true'; return false;" />
4. You need not reload the entire content each time your visitor has requested for a specific information. You can use xmlHTTPRequest, to query the server for the piece of information requested by your visitor, and display it in the appropriate part of your webpage without reloading the entire webpage. This helps to load the pages really fast.
5. Import your CSS code from an external file instead of writing them directly in your webpages, so that it need not be loaded each time.
6. Make your CSS clean, delete redundant codes and for each selector in your CSS, try to use one line of code. You can try out this tool to do the task for you.
Hope this helps the newbies atleast.
|VIEW ORIGINAL||REGISTER||GET FREE HOSTING|