Running maintenance function after page is sent

Results 1 to 2 of 2

Thread: Running maintenance function after page is sent

  1. #1
    theancient Guest

    Default Running maintenance function after page is sent

    On one of my pages, I run a maintenance function once per hour using a method similar to the one described at This function takes up to 20 seconds to run, so I don&#039;t want the user to have to sit and wait for it to complete.<BR><BR>So, my solution was to run the function at the bottom of the page, after the &#060;/html&#062; tag. The theory is that when the browser sees &#060;/html&#062;, it will know the page is done, and display everything on screen. The client stays connected until the 20 second function is complete, but at least the page is displayed.<BR><BR>Or at least that&#039;s the theory.<BR><BR>Even though the browser displays everything on the screen, it won&#039;t start downloading images until the HTML page disconnects.<BR><BR>So here&#039;s my question: How do I tell the client that the page is complete, so it will disconnect and go about its business? (Essentially what I want to do is run the code asynchronously. I want it to run on the server, but not hold up a client connection.)

  2. #2
    Join Date
    Dec 1969

    Default Friday

    Well<BR><BR>IMO, set up a hidden frame that runs the maintenance function<BR><BR>so when you load your frameset, load the "page" frame first, and then the 20 second maintenance function. <BR><BR>When it completes, i suppose you can autoforward the person on, or whatever. <BR><BR>To load one frame before the other, frame faqs.<BR><BR>That is what I would do.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts