HOME       >>       Programming

Make Your Web Applications Faster


iGuest

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.

 

2. Use Javascript and Ajax to load requested content.

 

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.


k_nitin_r

Hi!Clean CSS / CSS Tidy is a pretty useful utility for optimizing cascading style sheets and it something I would want to use on future web design projects.I'm, however, not sure I entirely agree with you on loading as much information as possible when the page is first loaded. By loading just what is needed for the page to appear, one reduces the response time to the user's request while loading any additional information in the background through a separate request. Yes, this does increase the load for the web server which has to process two requests instead of just one, but with the Javascript libraries available that enable us to leverage the possibilities provided to us by AJAX, content that is not crucial for the user to perform his or her actions can be loaded after the core of the web page has been loaded. I do, however think that there is an excessive use of AJAX functionality that has been scripted in a quick-and-dirty manner, creating a perception that AJAX is slow. When the AJAX functionality has been built correctly, it would be hard to tell that a particular functionality was put together with AJAX rather than loaded initially with the rest of the page.Disabling buttons can sometimes keep users from getting to the information they need because if a request fails, which happens every one in a couple of requests, the user is left waiting on a page with a button that no longer works. Having a working button means that the user can make another request. Perhaps a possible compromise between the two solutions would be to incorporate a timeout such that when the timeout does occur and the request does not complete, the button can be enabled again and perhaps an error message can be displayed to the user indicating that the request was unsuccessful.The web wasn't really meant to provide the application interface that it has grown to provide today and plugins on web pages such as Flash objects or Java applets are adaptations that make it possible to serve an entire application within the web browser. There are security limitations that increase the overhead of development so if a particular functionality was meant to be an application, then it would be best to provide a desktop application with a limited-functionality web interface, such as that provided for Yahoo! Messenger.



VIEW ORIGINAL REGISTER GET FREE HOSTING

Xisto.com offers Free Web Hosting to its Members for their participation in this Community. We moderate all content posted here but we cannot warrant full correctness of all content. While using this site, you agree to have read and accepted our terms of use, cookie and privacy policy. Copyright 2001-2019 by Xisto Corporation. All Rights Reserved.