Skip to main content
March 20, 2008
Question

force download video in stead of using the cache ?

  • March 20, 2008
  • 3 replies
  • 669 views
Hello,
Does anyone has expierence with the fact that when you connect to an flv file to play video in flash
the first time it will download the flv file. But suppose i change the content of the flv file but keep the name the same it will play the previous video because it's using the cache of IExplorer.

Is there a way to force the download? Or a way when the movie is finished to clear that cached movie?
I also tried to unload the movie, but that doesn't do the trick.

If someone has a fix for this, please let me know.

This topic has been closed for replies.

3 replies

March 20, 2008
Thanks! That did the trick!
Inspiring
March 20, 2008
You don't need anything more than a simple getTimer() for your cache buster.

"/movies/movie.flv?r=" + getTimer();

--
Dave -
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/


Michael Trout
Inspiring
March 21, 2008
I am still very new action scripting, so please bear with me when I ask newbie questions.

Dave, would that also apply to loading other files, such as text?
My current action reads thus:

loadVariablesNum("news.txt", 0);
stop();

As with the OP, this is loaded into the cache and isn't always updated when the visitor returns to the site.

Would this be an appropriate revision to the code?

loadVariablesNum("news.txt?r=", 0) + getTimer();
stop();
Inspiring
March 21, 2008
Hello Michael,

> I am still very new action scripting, so please bear with me when I
> ask newbie questions.
>
> Dave, would that also apply to loading other files, such as text?
> My current action reads thus:
> loadVariablesNum("news.txt", 0);
> stop();
> As with the OP, this is loaded into the cache and isn't always
> updated when the visitor returns to the site.
>
> Would this be an appropriate revision to the code?
>
> loadVariablesNum("news.txt?r=", 0) + getTimer();
> stop();


loadVariablesNum("news.txt?r="+ getTimer(), 0) ;
stop();



btw. it's absolutely unnecessary to add hash as a parameter. you can just
ad it right after "?" symbol.
Hash purpose is to make your URL unique to browser. Also, if you ass this
hash as a parameter in a URL-encoded string - you pass this parameter to
flash (if dealing with links to flash files) and it's OK if you use it further,
but do you need additional garbage if not? )


Inspiring
March 20, 2008
Hello Michealnl,

> Hello,
> Does anyone has expierence with the fact that when you connect to an
> flv file
> to play video in flash
> the first time it will download the flv file. But suppose i change
> the content
> of the flv file but keep the name the same it will play the previous
> video
> because it's using the cache of IExplorer.
>
> Is there a way to force the download? Or a way when the movie is
> finished to
> clear that cached movie?
> I also tried to unload the movie, but that doesn't do the trick.
> If someone has a fix for this, please let me know.


try an old trick - add some hash to your file URL. smth. like this:

"/movies/movie.flv?FewDa53D2SD"

With a new hash added each time you request url the later will be enterpreted
as a unique one and will be downloaded again regardless browser cache.

P.S. : I guess it's not a problem to code hash generator?