your opinion - would ajax be helpful for my app?
Hi, I have a Perl web application that consists of an HTML table structure and a lot of SSIs. The page is user-interaction free; it constantly refreshes (HTML refresh) to give me status of my servers (it's an intranet app.) It is effective, but a bit slow since on every refresh it takes about 8 seconds or so for all the perl scripts to be executed and then their output included in my HTML.
I know that ajax can reload server-side information without refreshing the page...your opinion: would ajax give my app a significant performance boost?
thanks! ^^
[579 byte] By [
GDevWeb] at [2007-11-11 10:00:18]

# 1 Re: your opinion - would ajax be helpful for my app?
I don't think Ajax would help much if most of the refresh time is spent gathering the information. I think it would help if there's a significant amount of static content on the page, and it just needs to update a small portion. (E.g. if it shows server statistics for yesterday, last week, last month, year-to-date, etc. that don't need updating.)
# 2 Re: your opinion - would ajax be helpful for my app?
How ajaxs works is it sends out a request asychronously then when the response is recieved it is written to the screen without a refresh. You could in theory create a function that sends a request ever n seconds and then updates the information with the response. You will still experiance the server side lag (8 secs) but you won't nes notice it because the page is not held in limbo till the request is processed. A minor downside would be you may not have the most "up to date" info as a request could be processing and not yet be displayed. To avoid this you can add a request loading area that is activitated when the readystate changes.
Hope that helps