AJAX Made Easy - Learn AJAX



AJAX-Tips Tutorials

 
Home AJAX-Tips
 

Preventing Latency in Client Side

 

Latency in the client side should be reduced or even prevented as possible. More often than not, users will have to deal with latency because of different factors. It could be on the bandwidth of the user, the server problem or just the coding of the application. Any of these factors could be the cause of latency.


However, the first two factors could be easily optimized since it is just the hardware or bandwidth requirement of the user and the server. On the other hand, coding of the application especially on an Ajax based website is a little bit difficult to optimize to prevent further latency.


To prevent latency, the developer has to build the Ajax based application wherein the data request by the user will be requested locally instead to the server. The initial UI of the online application will have no data so latency is not a problem there.


When the user continues to use the application more data will be requested and latency from the server to the user will increase. If the developer builds an Ajax based application wherein data validation and requests are local, latency will be reduced and could be virtually removed.


In order to do this, the developer has to build an Ajax based application wherein the user interface is updated while the user is on the website. Some will say that the client side will eventually crash since data will be overloaded in the client’s website.


This will never happen since data will be stored as cached in the local hardware and will be easily retrieved. Data in an Ajax based website usually requires lesser footprint. If you are not sure about the footprint, you can optimize the data through different compression tools online.


The information added in the client side is a great feature but this feature will never be used to its full extent unless the online application informs the user of the new information available. Data streaming should be able to alert the user as well so that unnecessary request from the server will never happen.


Along with the new information, user should be updated that the information is locked so that users will be informed of the security of the websites. This may not be a necessary feature but the developer could assure their users that their sessions with the online application are safe.


But these features are just temporary to ensure that the speed is still possible. When the output of the user arrives, the locked data is no longer needed so it could be released from cache and eventually make way for new request of services from the user.


Last but not the least, errors should be expected at all times and solutions should be made as soon as possible. From the worst case scenario to the least error that could occur, developers should create a function before something happens. These are the things that the developers should do to ensure that their application will have the least amount of latency for any user.



Read Next: Speeding Up Object Instantiation



 

 

Comments



Post Your Comment:

Members Please Login
Your Name:*
e-mail ID:(required for notification)*
Image Verification: 
 
 Subscribe    

Sponsored Links