Re: Preventing Safari caching
This WebDNA talk-list message is from 2003
It keeps the original formatting.
numero = 53805
interpreted = N
texte = Rob Marquardt wrote:> Has anyone come up with a method to get around Safari's tenacious caching?> > I've tried every combination of meta tag cache controls without success.Did you try my MIMEHeaders.inc file? The
tags are not now, and havenever been, that effective. They are hints only and individual browsers andinline caches regularly ignore them. Setting the correct MIME headers has beenmuch more consistent for me.I've included the latest version of the files at the end of this message (watch out for line wraps).John-- John PeacockDirector of Information Research and TechnologyRowman & Littlefield Publishing Group4501 Forbes BoulevardSuite HLanham, MD 20706301-459-3366 x.5010fax 301-429-5748[!] ------- MIMEHeaders.inc -------[/!][if "[expires]"="[raw][expires][/raw]"][!] ---- Check for input variable[/!][then][!][/!][math show=f]expires=0[/math][/then][!][/!][/if][!][/!][SETMIMEHEADER name=Date&value=[include file=^Includes/GMTdate.inc]][SETMIMEHEADER name=Last-modified&value=[include file=^Includes/GMTdate.inc]][SETMIMEHEADER name=Expires&value=[include file=^Includes/GMTdate.inc&offset=[expires]]][!] ------- GMTdate.inc -------Takes optional parameter offset in minutes and returns current date/time in GMT long formatReplace the {5:00:00} with your non-DST offset from GMT[/!][math time&show=f]GMT={[date %X]}+{5:00:00}[showif [date format=%Z]^Daylight]-{1:00:00}[/showif][/math][!][/!][math time&show=f]NOW={[date %X]}[/math][!][/!][if "[offset]"="[raw][offset][/raw]"][!][/!][then][!][/!][math show=f]offsettime=0[/math][/then][!][/!][else][!][/!][math show=f]offsettime=[offset]*60[/math][/else][!][/!][/if][!]--- Create the GMTexpires variable[/!][math time&show=f]GMTexpires=[GMT]+[offsettime][/math][!]--- Create the MIMEexpires string[/!][text show=t]MIMEexpires=[!][/!][if ([GMT]>[NOW]) and ([GMTexpires]>[GMT]) and ([GMTexpires]<86400)][!] ---- all in the same day ----[/!][then][!][/!][date format=%a, %d %b %Y][!][/!][/then][!] ---- at least one day later ----[/!][else][!][/!][format days_to_date %a, %d %b %Y][math]{[date]}+{00/[!][/!][showif [GMTexpires]>86400][math]floor([GMTexpires]/86400)[/math][/showif][!][/!][showif [GMTexpires]<86401]01[/showif][!][/!]/0000}[/math][/format][!][/!][/else][!][/!][/if][!][/!] [Format Seconds_To_Time][GMTexpires][/Format][!][/!] GMT[/text]-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list
.To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Rob Marquardt wrote:> Has anyone come up with a method to get around Safari's tenacious caching?> > I've tried every combination of meta tag cache controls without success.Did you try my MIMEHeaders.inc file? The tags are not now, and havenever been, that effective. They are hints only and individual browsers andinline caches regularly ignore them. Setting the correct MIME headers has beenmuch more consistent for me.I've included the latest version of the files at the end of this message (watch out for line wraps).John-- John PeacockDirector of Information Research and TechnologyRowman & Littlefield Publishing Group4501 Forbes BoulevardSuite HLanham, MD 20706301-459-3366 x.5010fax 301-429-5748[!] ------- MIMEHeaders.inc -------[/!][if "[expires]"="[raw][expires][/raw]"][!] ---- Check for input variable[/!][then][!][/!][math show=f]expires=0[/math][/then][!][/!][/if][!][/!][SETMIMEHEADER name=Date&value=[include file=^Includes/GMTdate.inc]][SETMIMEHEADER name=Last-modified&value=[include file=^Includes/GMTdate.inc]][SETMIMEHEADER name=Expires&value=[include file=^Includes/GMTdate.inc&offset=[expires]]][!] ------- GMTdate.inc -------Takes optional parameter offset in minutes and returns current date/time in GMT long formatReplace the {5:00:00} with your non-DST offset from GMT[/!][math time&show=f]GMT={[date %X]}+{5:00:00}[showif [date format=%Z]^Daylight]-{1:00:00}[/showif][/math][!][/!][math time&show=f]NOW={[date %X]}[/math][!][/!][if "[offset]"="[raw][offset][/raw]"][!][/!][then][!][/!][math show=f]offsettime=0[/math][/then][!][/!][else][!][/!][math show=f]offsettime=[offset]*60[/math][/else][!][/!][/if][!]--- Create the GMTexpires variable[/!][math time&show=f]GMTexpires=[GMT]+[offsettime][/math][!]--- Create the MIMEexpires string[/!][text show=t]MIMEexpires=[!][/!][if ([GMT]>[NOW]) and ([GMTexpires]>[GMT]) and ([GMTexpires]<86400)][!] ---- all in the same day ----[/!][then][!][/!][date format=%a, %d %b %Y][!][/!][/then][!] ---- at least one day later ----[/!][else][!][/!][format days_to_date %a, %d %b %Y][math]{[date]}+{00/[!][/!][showif [GMTexpires]>86400][math]floor([GMTexpires]/86400)[/math][/showif][!][/!][showif [GMTexpires]<86401]01[/showif][!][/!]/0000}[/math][/format][!][/!][/else][!][/!][/if][!][/!] [Format Seconds_To_Time][GMTexpires][/Format][!][/!] GMT[/text]-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
John Peacock
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
SQL db type (2006)
Sending Email (2004)
RE: OK, here goes... (1997)
[OT] HTML Table Cell Problem (2003)
best way to limit # of attempts to login to protected page? (2000)
Cart ID Duplication (2001)
Stats (2004)
ImageMagick (2005)
Re:Version 2.0 and 1.6 simultaneous (1997)
Force leading zeros (1998)
credit card authorization question (1997)
Bug Report, maybe (1997)
Need Photo Placement Suggestions (2002)
Upgrading old WebCat Database Files (1997)
Repost: Orderfile, Grandtotal: How do I get it to all add up. (2000)
WebCatalog can't find database (1997)
Beta Documentation (1997)
[input] [/input] (1997)
Page Showing 3 times (2000)
Re[2]: Next X hits (1996)