PDA

View Full Version : prevent caching


aboans
02-24-2003, 03:27 PM
I'm trying to build an e-learning website but I want to prevent the swf files from caching in the user temporary files
Can u help me please

tost
02-24-2003, 05:20 PM
instead of loading like this:

loadMovie("myMovie.swf", this);

add a dummy random variable to your yrl, this will result in a different url for every call, thus the files won't be cached:

loadMovie("myMovie.swf?noCache="+Math.random(), this);

grtz
tost

tost
02-24-2003, 05:22 PM
btw, welcome aboard :)
(you don't HAVE to use a poll if you don't need it)

aboans
02-25-2003, 11:39 AM
I tried the code u suggest Tost but this code make the file loaded every time from another url so when u open the internet temporary files directory u find many copies of the same files.

what I want to do "when the user open the internet temporary files directory to get the file he found nothing"

can u help me with that please ?
thank u for ur help .

tost
02-25-2003, 12:11 PM
huh? in that dir, everything what you will see as as user is stored, de facto. nothing to do about it, except asking the user to use no cache. and that would be complete nonsense.
is there a reason for it? are you afraid your work will get ripped?

aboans
02-26-2003, 07:17 AM
thank for ur help I'm really appreciate ur efforts
but I have to find a way to solve this problem, if I could I'll confirm u .

littleRichard
02-27-2003, 06:41 PM
you can't definitively stop caching....ever.

all you can do is trick the browser into loading a new copy by tagging random junk onto the URL as already suggested.

aboans
03-03-2003, 08:06 AM
thank u everybody for helping .
but I want to ask one more thing if I cann't prevent caching, can I make a trick or somtghing that delete files that have been caching or even change thier name or somthing like that ?

Please Help me ??

jaybee
03-03-2003, 12:29 PM
the main timeline has a _url property that shows the path you're on - you can do something like this to make sure it will only run from your website:

//on first frame
if(_url.indexOf("file:" > -1) {
stop();
} else {
gotoAndPlay("content");
}


or be more specific by going if _url.indexOf("http://www.myserver.com") == -1)

Northchild
03-11-2003, 07:34 PM
Wanted to mention that the first version of this, posted by tost, works like a charm. Just set up a first, blank .swf with this script in frame 1 that points to a second .swf and you're golden.


loadMovie("myMovie.swf?noCache="+Math.random(), this);

merciless
03-11-2003, 08:16 PM
Yup you cant stop the cache even if its set to 0.

If you want to try and mask your .swf files in the cache. Use a base.swf that loads your content.swf s

But, rename the extension to something common or make one up like content.icu. Flash will know its flash file and load it proper. But you cant tell unless you change the extention to .swf and try to open to make sure. So most likey not worth the time. Also make the name nondescript.

I dont know why you would go through all this trouble tho.

Northchild
03-11-2003, 11:35 PM
I can sort of see why. Hiding your filenames in this manner might deter casual users from using a program to suck the frame-by-frame information and scripting out of your SWFs and importing it into their own FLA files.

Of course, determined hackers will *always* be able to deconstruct/crack and reconstruct anything that's on (or off) the web, but sometimes it's fun to give people a run for their money. ;)

For my part, anything that I do for personal stuff is open source - there are far too many wonderful people who give away for free stuff that I couldn't do given 2 years of uninterrupted work time and all of the training in the world. Companies that have secrets that they need to keep should keep these secrets off of the Internet. But I digress.

tost
03-11-2003, 11:56 PM
Originally posted by Northchild
I can sort of see why. Hiding your filenames in this manner might deter casual users from using a program to suck the frame-by-frame information and scripting out of your SWFs and importing it into their own FLA files.


unless they are mac osx users like myself, and they found out about a panel in the safari browser called 'activity', like a download monitor, but for browser traffic.
check out the results for this page (attachment)

for flash movies, all swf's that are loaded are listed, i was a little in shock to see how easy it was for any foolish schmuck to find out the paths to the movies.

littleRichard
03-12-2003, 02:19 PM
opera has something like that also. you just can't organize by site.