The original article is the Flash Support Center.Article. Solved the flash cache problem | solved the variable loading cache problem. Use the following method to force the SWF file not to read the local cache from the browser. Or force its SWF file to read the latest media file every time. Make sure that the latest SWF file is read every time. 1: use the "expires" header to tell the browser not to read the local cache in the HTML file. Place the following in the middle of Code <! -- Begin insert --> <Meta HTTP-EQUIV = "expires" content = "mon, 04 Dec 1999 21:29:02 GMT"> <! -- End insert --> In this way, every time you access this file, the browser will be notified that the Cache version has expired and the latest file will be read from the server again. 2: directly tell the browser that there is no cache at all Insert </body> in the HTML page that contains the SWF file: <! -- Begin insert --> <Head> <Meta HTTP-EQUIV = "Pragma" content = "no-Cache"> </Head> <! -- End insert --> Ie5 is not supported without cache headers. Therefore, Microsoft recommends using headers with cacahe control. 3: When the link between HTML pages jumps When you click "HYPERLINK", it will force it to download the latest documents from the server instead of browsing from the local cache. For example: <A href = "stockprices.htm? 1 "> current stock prices </a> The above method will prevent reading the local cache How to prevent reading variables from the cache
Problem: When loading data from external data sources, sometimes the browser stores the data in the local cache. When the loadvariables method is called to load data, the data will be read from the local cache instead of the original data. Read information. Solution: To ensure that flash loads the latest variables, append a random number variable to load the latest data in the original file. For example: Method 1: Loadvariables ("mypage. asp? Nocache = "+ random (65000), 0," Post "); Method 2: Loadvariables ("mypage. asp? Nocache = "+ gettimer (), 0," Post "); This ensures that the data loaded each time is up-to-date. |