We're designing a web app in which some operations will take a long time
to complete (maybe two minutes). Because it's a high-volume application,
we don't want browser connections hanging open for these two-minute
intervals; that would cause a huge resource drain on the server (open
threads, etc.).
We've implemented a page which has a <meta refresh> tag in it of 15
seconds, so that the browser can "check back" with the server every so
often to see if it's done with this operation.
However, we don't like the constant page reloading.. We'd rather script
this as a javascript "background process" if this is possible...
My question is, is there a way to script some kind of page reload in
Javascript, which is done without any visible window on the screen? I'd
script it to reload every 15 seconds or so, until (for example) the text
"OK" appears in the <body> tag (or some other indicator), which would
then signal the main page to reload.
Sorry if this is a tortuously confusing question. Appreciate it if you
got this far and can offer any suggestions.
--
Bryan Field-Elliot http://netmeme.org 5 4577
I'd like to see more pages doing this kind of thing.
One thing you can do is to have an IFrame and set its source to be something like
mydomain.com/perhaps/a/directory/statusChecker.php?some=arguments&go=here
On the server side, you will then realize that this is a directive to check some status.
If it's ready, return appropriate data, otherwise send back a not ready message.
This sending back data/message is actually a page which has an onLoad
which knows about its container document (the original page)
and can access the necessary functions.
You'll have timing issues (but then again, that's your whole
reason for doing this). In particular, You'll have to have some
timeout and set semaphores in case the server or connection
goes belly up, or the response time is longer than expected
and then returning.
Good luck,
Csaba Gabor from New York
PS. You can do one way communication by setting the src on
IMAGE elements, but you have said that you actually want
returned information.
You would think that you could just load a new SCRIPT element
instead of needing to suck up pages, but I have not gotten this
to work, especially cross platform. I'd be happy to read about
other peoples' approaches.
"Bryan Field-Elliot" <br***@netmeme.org> wrote in message news:3LQ9b.481514$o%2.214880@sccrnsc02... We're designing a web app in which some operations will take a long time to complete (maybe two minutes). Because it's a high-volume application, we don't want browser connections hanging open for these two-minute intervals; that would cause a huge resource drain on the server (open threads, etc.).
We've implemented a page which has a <meta refresh> tag in it of 15 seconds, so that the browser can "check back" with the server every so often to see if it's done with this operation.
However, we don't like the constant page reloading.. We'd rather script this as a javascript "background process" if this is possible...
My question is, is there a way to script some kind of page reload in Javascript, which is done without any visible window on the screen? I'd script it to reload every 15 seconds or so, until (for example) the text "OK" appears in the <body> tag (or some other indicator), which would then signal the main page to reload.
Sorry if this is a tortuously confusing question. Appreciate it if you got this far and can offer any suggestions.
--
Bryan Field-Elliot http://netmeme.org
This is clever, thank you. The returned "Status" document can contain
the javascript needed to cause the parent to reload (after the server is
done processing). Nice!
So I guess the last follow-on question is, if an IFRAME has a width and
a height of "0", does it cause any funny stuff to happen in any of the
popular browsers, or is it fine?
--
Bryan Field-Elliot http://netmeme.org
Csaba2000 wrote: I'd like to see more pages doing this kind of thing.
One thing you can do is to have an IFrame and set its source to be something like mydomain.com/perhaps/a/directory/statusChecker.php?some=arguments&go=here
On the server side, you will then realize that this is a directive to check some status. If it's ready, return appropriate data, otherwise send back a not ready message. This sending back data/message is actually a page which has an onLoad which knows about its container document (the original page) and can access the necessary functions.
You'll have timing issues (but then again, that's your whole reason for doing this). In particular, You'll have to have some timeout and set semaphores in case the server or connection goes belly up, or the response time is longer than expected and then returning.
Good luck, Csaba Gabor from New York
PS. You can do one way communication by setting the src on IMAGE elements, but you have said that you actually want returned information. You would think that you could just load a new SCRIPT element instead of needing to suck up pages, but I have not gotten this to work, especially cross platform. I'd be happy to read about other peoples' approaches.
"Bryan Field-Elliot" <br***@netmeme.org> wrote in message news:3LQ9b.481514$o%2.214880@sccrnsc02...
We're designing a web app in which some operations will take a long time to complete (maybe two minutes). Because it's a high-volume application, we don't want browser connections hanging open for these two-minute intervals; that would cause a huge resource drain on the server (open threads, etc.).
We've implemented a page which has a <meta refresh> tag in it of 15 seconds, so that the browser can "check back" with the server every so often to see if it's done with this operation.
However, we don't like the constant page reloading.. We'd rather script this as a javascript "background process" if this is possible...
My question is, is there a way to script some kind of page reload in Javascript, which is done without any visible window on the screen? I'd script it to reload every 15 seconds or so, until (for example) the text "OK" appears in the <body> tag (or some other indicator), which would then signal the main page to reload.
Sorry if this is a tortuously confusing question. Appreciate it if you got this far and can offer any suggestions.
--
Bryan Field-Elliot http://netmeme.org
"Bryan Field-Elliot" <br***@netmeme.org> wrote in message news:0r*******************@rwcrnsc52.ops.asp.att.n et... This is clever, thank you. The returned "Status" document can contain the javascript needed to cause the parent to reload (after the server is done processing). Nice!
Or, the returned "Status" document can contain the javascript needed to
REPAINT or reconfigure the page, IF there is not much change, which
will reduce the amount of flicker the user sees
So I guess the last follow-on question is, if an IFRAME has a width and a height of "0", does it cause any funny stuff to happen in any of the popular browsers, or is it fine?
I seem to recollect that there are some issues with the visibility of the
IFrame, but I don't remember details. One option is to set
..style.display="none" on it. If I remember right, trying to set
focus to one of its elements when the element is not visible hangs
the page on one browser (probably NN), but I'm not sure on that.
The upshot is, you'll have to be on the lookout for issues.
Also, didn't I see that Opera allows you to permit inline frames
or not - but frankly, even if true, I think market share on this
is so small you needn't worry.
Csaba
PS. I almost forgot another idea (but I like the IFrame one better).
I think (I'm not sure - my testing was a while ago), that you could
set cookies when sending information by means of altering
the src on an IMAGE element. This would allow passive
(where the returned data can't notify the requester - which is
why I'd use the IFrame) communication of limited size. It doesn't
strike me as being structurally more simple, however, than
the IFRAME scheme.
--
Bryan Field-Elliot http://netmeme.org
Csaba2000 wrote: I'd like to see more pages doing this kind of thing.
One thing you can do is to have an IFrame and set its source to be something like mydomain.com/perhaps/a/directory/statusChecker.php?some=arguments&go=here
On the server side, you will then realize that this is a directive to check some status. If it's ready, return appropriate data, otherwise send back a not ready message. This sending back data/message is actually a page which has an onLoad which knows about its container document (the original page) and can access the necessary functions.
You'll have timing issues (but then again, that's your whole reason for doing this). In particular, You'll have to have some timeout and set semaphores in case the server or connection goes belly up, or the response time is longer than expected and then returning.
Good luck, Csaba Gabor from New York
PS. You can do one way communication by setting the src on IMAGE elements, but you have said that you actually want returned information. You would think that you could just load a new SCRIPT element instead of needing to suck up pages, but I have not gotten this to work, especially cross platform. I'd be happy to read about other peoples' approaches.
"Bryan Field-Elliot" <br***@netmeme.org> wrote in message news:3LQ9b.481514$o%2.214880@sccrnsc02...
We're designing a web app in which some operations will take a long time to complete (maybe two minutes). Because it's a high-volume application, we don't want browser connections hanging open for these two-minute intervals; that would cause a huge resource drain on the server (open threads, etc.).
We've implemented a page which has a <meta refresh> tag in it of 15 seconds, so that the browser can "check back" with the server every so often to see if it's done with this operation.
However, we don't like the constant page reloading.. We'd rather script this as a javascript "background process" if this is possible...
My question is, is there a way to script some kind of page reload in Javascript, which is done without any visible window on the screen? I'd script it to reload every 15 seconds or so, until (for example) the text "OK" appears in the <body> tag (or some other indicator), which would then signal the main page to reload.
Sorry if this is a tortuously confusing question. Appreciate it if you got this far and can offer any suggestions.
--
Bryan Field-Elliot http://netmeme.org
Bryan Field-Elliot wrote: We're designing a web app in which some operations will take a long time to complete (maybe two minutes). Because it's a high-volume application, we don't want browser connections hanging open for these two-minute intervals; that would cause a huge resource drain on the server (open threads, etc.).
We've implemented a page which has a <meta refresh> tag in it of 15 seconds, so that the browser can "check back" with the server every so often to see if it's done with this operation.
However, we don't like the constant page reloading.. We'd rather script this as a javascript "background process" if this is possible...
My question is, is there a way to script some kind of page reload in Javascript, which is done without any visible window on the screen? I'd script it to reload every 15 seconds or so, until (for example) the text "OK" appears in the <body> tag (or some other indicator), which would then signal the main page to reload.
[...]
Could the HTTPRequest object be useful for this? http://jibbering.com/2002/4/httprequest.html
Regards,
Stephen
Hi all,
I have the same problem,
I need make a controler with javascript for background process.
My app registration values and take a 1 minutes if the user press f5 or button post
the process start again.
Can i controle this?
Thanks
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Marek Kotowski |
last post by:
The problem:
I'd like to build – with PHP – a background-image url
on a server (Apache) (url itself or a full directory name).
I'd like to use a portable mechanism, I mean a PHP script
should...
|
by: Thue Tuxen Sørensen |
last post by:
Hi everybody !
I´m maintaining a large intranet (approx 10000 concurrent users) running on
one IIS box and one DB box with sqlserver 2000.
Currently there is 2,5 GB Ram, 1 1400 mhz cpu and 2...
|
by: VB Programmer |
last post by:
I only have 1 set of <FORM> tags in my HTML file, but I keep getting this
error. Any ideas?
***********
A page can have only one server-side Form tag.
Description: An unhandled exception...
|
by: Weston Weems |
last post by:
I've got the simple problem where I'd like to transfer
somewhat large files to my webserver via
http/webservice/something like that.
My question is what kinda limits have people been able to...
|
by: frog |
last post by:
Hi, all:
I tried to call Server.Execute in Application_Start
and got exception.
Any help is appreciated
You might ask why I want to do that in the first place.
Well, I need to
start a...
| |
by: Steve Franks |
last post by:
I am using VS.NET 2005 beta 2. When I run my project locally using the
default ASP.NET Development Web Server it runs using a root address like
this:
http://localhost:11243/testsite/
However...
|
by: Patient Guy |
last post by:
I don't think I have ever encountered something like this before.
On a Windows XP running Apache 2.0.53 I do my page development (XP
machine).
I then upload the stuff to a Linux/Redhat/Fedora...
|
by: Maxwell2006 |
last post by:
Hi,
Using ASP.NET 2.0,
I have this tag in my asp page:
<td runat =server background="~/Images/Header2.gif"> </td>
The problem is when I run the page, the server side TD tag renders...
|
by: SYT |
last post by:
Hello,
I wrote C program for connecting to postgresSQL server to retrieve data from the postgres database. The program is:
#include <stdio.h>
#include <stdlib.h>
#include "libpq-fe.h"
int...
|
by: nathanwb |
last post by:
I have the following code and at times, it seems at randome I get the SERVER 500 error.. any ideas? or may code tweaks?
Thanks
<?
include('../application.php');...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |