home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 4
/
AACD04.ISO
/
AACD
/
Online
/
AWebScripts
/
NoCache.awebrx
< prev
next >
Wrap
Text File
|
1999-11-25
|
1KB
|
52 lines
/* $VER: NoCache.awebrx 1.1 (24.11.99) by Jorma Oksanen <tenu@sci.fi>
Adds URL to NoCache-list
Mostly obsolete now when there's CacheControl, but this
one is slightly faster.
Setup:
Menu/ARexx
NoCache RUN AWeb3:Plugins/NoCache.awebrx
*/
options results
parse arg args
parse value address() with '.' n
cname='file:///nocache'n'.html'
if args='' then do
'get url var u'
if (abbrev(upper(u),'FILE://')) then exit
parse source . . . script .
'chanopen' cname; chan=result
'chanheader' chan '"Pragma: No-cache"'
'chanheader' chan '"Content-Type: text/html"'
'chandata' chan '"<html><head><title>NoCache</title><body><form action=*"x-aweb:rexx/'script' *">" nl'
'chandata' chan '"<h3>Add this entry to AWeb''s no-cache list:" nl'
'chandata' chan '"<p><h5><input type=text maxlength=256 name=pat size=80 value=*"'u'*">" nl'
'chandata' chan '"<p><input type=submit value=Add></form></body></html>" nl'
'chanclose' chan
'open' cname
end
else do
parse var args 'pat="' pat '"'
'getcfg nocache stem nc'
do i=1 while (i<= nc.0)&(pat~='')
if nc.i.value=pat then pat=''
end
if pat~='' then 'setcfg nocache add' pat
'go back'
end