FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


How do I get it so a swf file doesnt cache?





mnx12
Because im making a website in flash right now, and whenever I update the file, and re-upload it, my browswer still shows the old file. And I dont want that since I update it so often. Thanks (yeah, I know, Flash is a really big pain, geesh)
gameking
I think you must delete your cookies and buffer
I had the same problem! by deleting this all you dont have a problem enymore

----
sorry 4 bad english Confused Sad
mnx12
I dont really know what you mean by that. I want it so that everytime a person comes to my website, it wont cache the file.
mnx12
can someone help me, please??
mperro
Question What browser are U using? Question

MP
mnx12
Well I have the same problem for both IE and Firefox
dacode
Hello,

For testing purpose (local) :

Try to refresh the page [ctrl+F5 on IE]
Clear the cache on both browsers.

For public release :

Add an extra PHP header at the very TOP of your file, ie :

Code:

<?php
// Out of date
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");

// Always modified
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");

// HTTP/1.1
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);

// HTTP/1.0
header("Pragma: no-cache");
?>
<html>
<head>...


this way the browser will always download a fresh copy of the page embedding your swf file instead a serving an old copy from the cache.

To try this out, publish your swf file under a new name.
Hope this helps !
Naif
I too face the same problem all the time. Not only with flash files, but even with images and style sheets. This has nothing to do with the browsers catch. What I understand is that this is an ISP's proxy server issue. The proxy server caches the files so that it doesnt need to redownload it again and send it to its client who makes a request for it.

Deleting the temporary files, both from IE and manually doesnt help me ever. I have to wait atleast for an hour or so for the updated images/stylesheets to be downloaded.
gameking
I found a progam that can help u. The begin is in Dutch but the later it is all english visit http://www.hitmanpro.nl/ for more info.
mnx12
Hey thanks a lot! Ill let you know if it works later today when I get home.
a_dubDesign
dacode wrote:

Code:

<?php
// Out of date
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");

// Always modified
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");

// HTTP/1.1
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);

// HTTP/1.0
header("Pragma: no-cache");
?>
<html>
<head>...


this way the browser will always download a fresh copy of the page embedding your swf file instead a serving an old copy from the cache.

I've used a code very similar to this before to keep the page from caching, but does it do it to all the files that are refrenced in the page?
dacode
Hi there,

What the above code does is mainly about the core code of the page (ie. html / php / inline css / inline javascript etc)

That's why I advised mnx12 to also rename the files that were to be called from that very page.
Relentless
I know what you are looking for...

Copy to following into the Head of your HTML page'S

Code:
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">

And for server types

<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">


Paste both in it will not hurt both work with diffrent browsers

But make sure you inclue them @ the top of every webpage before you braodcast your website... Otherwise regular users will not cache the non cacheable copy if you see where i am coming from..

This helps me because I use FLASH and I stream .FLV videos to my SWF and I keep updating the .FLV so I need to stop the orginal .FLV from caching and the PRAGMA one does that one. But like I said yous both if you are using FLASH and TEXT.
Related topics
A "small" list of free apps
swf to gif
Content not updating
Hi please post-need your help
Signature trouble
Database Privilege
Flash Intro's $30 each
HELP!PLZ HELP ME!Convert swf to gif
convert a .swf into .fla which soft?
Problems with WP-Cache, wordpress & SSH
Embedding swf clips in Flash files
Portable Games
Download SWF files and its resource files from web
flash template
Reply to topic    Frihost Forum Index -> Webmaster and Internet -> Design Tips

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.