Hi,
(crossposted in the psdn forum)
My problem: I have a WebSpeed app where a request from one page (page A) to another page (page B) takes lots of time (normally 10-40 seconds sometimes longer). This is because of communication with an external system so I have no real option of speeding it up. While this page is loading the browser displays a white blank page and this isn't very good. What I would like to do is to display a page while processing that says: "Please stand by your request is being processed" or similar.
Facts: OE 10.1 A, Apache Webserver 1.3.x, Sun Solaris 10.
I have 3 ideas:
1) Create a middle page, post from page A to this middle page. Place a META HTTP-EQUIV="REFRESH" tag in this page and direct it to page B. It will cause the browser to display the middle page while loading page B. The problem is that it breaks the default behavior of the browser making the Back button from page B behaving in a wait you wouldnt expect.
2) This one is a bit trickier. It would require one or two new tables in the database. One storing request data and one storing request responses. On loading page "B" I create a record with the request data then I spawn a background process that starts working with this request. The background process writes the response from the external service either in the second table (or possibly in a file on disk). Meanwhile page "B" reloads every other second checking the post to see if the request is done. If it is so it reads data from the second table and displays it. Otherwise it just shows the waiting message again. This feels like a more professional solution but it would require quite much work.
3) This solution is a bit more vague. It's basically solution number 2 but instead of creating a record in a request table page B does an async appserver call and thus starts the request. Then it somehow checks back with the appserver every other second to see if it is done and then reads the response either from a table or from a disk on file. Since I haven't worked with async appserver calls I'm not 100% sure it would work but it's a thought anway.
Does anyone have any comments to this or perhaps other ideas? All input is greatly appreciated. I really think there should be an easier way of doing it without breaking any usability rules (as in solution number 1).
Best regards
Jens Dahlin
Airtours
(crossposted in the psdn forum)
My problem: I have a WebSpeed app where a request from one page (page A) to another page (page B) takes lots of time (normally 10-40 seconds sometimes longer). This is because of communication with an external system so I have no real option of speeding it up. While this page is loading the browser displays a white blank page and this isn't very good. What I would like to do is to display a page while processing that says: "Please stand by your request is being processed" or similar.
Facts: OE 10.1 A, Apache Webserver 1.3.x, Sun Solaris 10.
I have 3 ideas:
1) Create a middle page, post from page A to this middle page. Place a META HTTP-EQUIV="REFRESH" tag in this page and direct it to page B. It will cause the browser to display the middle page while loading page B. The problem is that it breaks the default behavior of the browser making the Back button from page B behaving in a wait you wouldnt expect.
2) This one is a bit trickier. It would require one or two new tables in the database. One storing request data and one storing request responses. On loading page "B" I create a record with the request data then I spawn a background process that starts working with this request. The background process writes the response from the external service either in the second table (or possibly in a file on disk). Meanwhile page "B" reloads every other second checking the post to see if the request is done. If it is so it reads data from the second table and displays it. Otherwise it just shows the waiting message again. This feels like a more professional solution but it would require quite much work.
3) This solution is a bit more vague. It's basically solution number 2 but instead of creating a record in a request table page B does an async appserver call and thus starts the request. Then it somehow checks back with the appserver every other second to see if it is done and then reads the response either from a table or from a disk on file. Since I haven't worked with async appserver calls I'm not 100% sure it would work but it's a thought anway.
Does anyone have any comments to this or perhaps other ideas? All input is greatly appreciated. I really think there should be an easier way of doing it without breaking any usability rules (as in solution number 1).
Best regards
Jens Dahlin
Airtours