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 have never been, that effective. They are hints only and individual browsers and inline caches regularly ignore them. Setting the correct MIME headers has been much 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 Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4501 Forbes Boulevard Suite H Lanham, MD 20706 301-459-3366 x.5010 fax 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 format Replace 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:

    
  1. Re: Preventing Safari caching ( Rob Marquardt 2003)
  2. Re: Preventing Safari caching ( Larry Hewitt 2003)
  3. Re: Preventing Safari caching ( Rob Marquardt 2003)
  4. Re: Preventing Safari caching ( Kenneth Grome 2003)
  5. Re: Preventing Safari caching ( John Peacock 2003)
  6. Preventing Safari caching ( Rob Marquardt 2003)
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 have never been, that effective. They are hints only and individual browsers and inline caches regularly ignore them. Setting the correct MIME headers has been much 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 Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4501 Forbes Boulevard Suite H Lanham, MD 20706 301-459-3366 x.5010 fax 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 format Replace 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:

Q: old cart serial problem (2000) WebCat2b15MacPlugin - showing [math] (1997) Need help with emailer- 2 issues (1997) WebDNA > IM Client? (2004) Search in 2 or more catalogs (1997) Extended [ConvertChars] (1997) list/menus (2000) Credit card types (1997) Wanted: Broader string manipulation functions (1997) Running _every_ page through WebCat ? (1997) SiteGuard Admin Feature ? (1997) [WebDNA] How to get a screen size (2009) Plain Language Manual? (1998) Suffix Mapping (1997) Locking up with WebCatalog... (1997) Bug? (1997) Reloading adds items - how to prevent?? (1998) Unexpected error (1997) Show if time tags (1997) Limit on nested [ShowIf]'s? (1997)