[futurebasic] Re: [FB] Programatically clearing web cache/buffer

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : October 2004 : Group Archive : Group : All Groups

From: bernie <fblist@...>
Date: Sat, 23 Oct 2004 06:46:58 +0100
Peter & Brian (of the 'S' variety),

Can't find a refresh command in either IE or Safari AS dictionaries.

Tried the UNIX thingie a while back but it was too unreliable for me so 
I use a little URLDownload function robbed from Alain's CodeStyler.

This has been a pain for quite a while. It's not just my app's version 
file that I have problems with... If I upload an amended web page to my 
site and access it with Safari, most of the time it still shows the old 
page. A refresh in Safari sometimes cures it but I usually have to 
launch IE, do a few refreshes from that until the new page is 
displayed, then do a refresh in Safari (!)   :(

The old file (page) info is obviously still being found in some sort of 
cache on my Mac.

It's obviously not a browser problem (although IE is better at fixing 
it) because it can still show up when downloading the file 
programatically.

I need a way to programatically clear out any traces of any previous 
file downloads on the machine running my app.

Hey up... just noticed a ton of Safari .cache files, with today's date, 
lurking. Will try exterminating these in between uploads and see what 
happens.

Thanks for your help boys

Bernie



On 23 Oct 2004, at 5:34, Peter Bancroft wrote:

> Maybe. Using AppleScript, you could look in the Browsers Dictionary of
> AppleScript commands to see if such an instruction is available using 
> an
> AppleScript or AppleEvents command.

On 23 Oct 2004, at 5:46, Brian Stevens wrote:

> This is not a direct answer to your question but, I've been using the 
> method posted by (forgive me if I've overlooked someone) Robert 
> Covington and possibly Ken S. It uses open "UNIX", filenum,"curl -LsS 
> " + urlStr  to download a file's contents (like your version number 
> which is what I do too) to my program. Since it bypasses web browsers, 
> there is no issue with the browser consulting the cache. Primary 
> restriction is it only works in OS X.
> If it has to be the browser route, maybe IE's dictionary supports 
> Applescript to enable you to tell it to dump/refresh the cache. Of 
> course, before you do this the program would need to check all the 
> open processes to make sure IE is one of them (not too difficult).
> I've got code for the open unix, and checking for open processes but 
> not the applescript. I haven't checked the examples but they might 
> provide a good starting point.
> Be happy to send any code offlist.  The list has seen this stuff many 
> times and I don't want to bore anyone.