[ic] A 'timed' BOUNCE

Kevin Walsh interchange-users@icdevgroup.org
Mon Aug 19 19:14:00 2002


> >In your <head> section, you could add this sort of thing:
> >
> >    [if scratch autorefresh]
> >    <meta http-equiv="refresh" content="1; url=[scratch autorefresh]">
> >    [/if]
> >
> >Then each page that wants to auto-refresh to another page should only
> >need to add the following code before calling the template:
> >
> >    [tmp autorefresh][area otherpage][/tmp]
> >
> >
> >The [tag] code, suggested above, should work as well, but I think it
> >may look better written like this:
> >
> >    [tag op=header interpolate=1]
> >    Content-Type: text/html
> >    Refresh: 1; URL=[area somepage]
> >    [/tag]
> >
> >Or in [perl] or [calc] etc., using $Tag->tag() and $Tag->area().
> >
> >  
> >
> Humm... Ok, the problem.  I really do not want to put the meta statement 
> into the HTML header because I'm using standard includes, and that would 
> require me to define the refresh values prior to entering the page, an 
> error page that I'm not expecting to hit unless they turn off Java or 
> Cookies mid-stream....
>
That will work with "standard includes."  Just set the [tmp] scratch
before including the <head> block.  If you use the code, presented above,
the <meta> tag won't be added unless the variable is present.

The answer to your concern would be to set the [tmp autorefresh]
value on the error page and nowhere else; as long as the [if] is
present in the <head> section, no other pages will be affected.

> 
> I tried the [tag] suggestions, both as a perl PUSH and as the straight 
> ITL, and neither redirected.
> 
I don't see why the [tag] should fail; I haven't looked into it.  If I
needed to do this, I'd stick with the <meta> tag anyway.

>
> I also tried my original thought of doing it all in Perl and it appears 
> that IC will not let me use sleep as SAFE is trapping it.  
> 
I doubt that you want the Interchange page server to sleep for x
seconds, potentially keeping other users waiting.  Also, a sleeping
process will act like a dead/looping process - prompting Interchange's
housekeeping routine to hammer it if it stays asleep for too long.

Safe prevents you from shooting yourself in the foot.  Long live Safe. :-)

>
> So, is my only option in fact embedding the meta data into the header???
> 
I'd use the <meta> tag, yes.

-- 
   _/   _/  _/_/_/_/  _/    _/  _/_/_/  _/    _/
  _/_/_/   _/_/      _/    _/    _/    _/_/  _/   K e v i n   W a l s h
 _/ _/    _/          _/ _/     _/    _/  _/_/    kevin@cursor.biz
_/   _/  _/_/_/_/      _/    _/_/_/  _/    _/