Casey Bralla on 1 Jan 2009 17:11:41 -0800

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Paint an HTML in the "Background"?

Thansk for your suggstion, Josh.    This system is how my internal music 
player system displays what song is playing.  The graphics are large images 
of the album covers.

Right now, the python cgi-bin script dynamically creates the page on the fly.   
This means that if I have several computers monitoring the web page, each one 
gets a custom-generated page.

Thinking about your suggestion, however, makes me realize I could have a cron 
job updating a semi-static page, and then have the web server present the 
same page to whichever browser is connected.   And, I could use your idea of 
building a temporary HTML file, and then renaming it to the desired web page 
name once the generation has completed.

On Thursday 01 January 2009 7:31:43 pm Josh Goldstein wrote:
> I would try generating the new image under a different name, and then
> renaming the new image to the same name as the old one.  I would assume
> that the renaming would be atomic as far as the web page server (apache?)
> is concerned, so the viewer either gets sent to the old image or the new
> image. If you try to use some synchronization so that the web browser
> happens to reload only between the python script regenerating the
> page/images I think it will be unnecessarily convoluted. What exactly are
> you regenerating every 15 seconds? Are you making the 2 new images and
> regenerating the web page to have its image's src properties match the name
> file names?? -Josh
> I've got an application which regenerates and reloads a web page every 15
> seconds.  (The page is regenerated with a python cgi-bin script, and this
> process is triggered by the HTML directive "<META HTTP-EQUIV='REFRESH'
> CONTENT='15'>").   This system is simple and works very well.  I've got
> mostly text data, but there are 1 or 2 large graphics images in each page.
> Unfortunately, the process of loading a new page clears out the old page,
> and is unsightly while the new one is being regenerated and downloaded.
> I would like to be able to regenerate and download the new page while the
> old one is still being displayed, then instantly switch to the new page so
> as to minimize this 'redraw" phase.
> I'm not skilled enough to try to use some type of Java script, and the
> application isn't critical enough to motivate me to acquire the missing
> skills.
> Does anybody know of a simple way I can freeze the existing page in a web
> browser until the replacement page is fully formed and rendered?


Casey Bralla
Chief Nerd in Residence
The NerdWorld Organisation
Philadelphia Linux Users Group         --
Announcements -
General Discussion  --