Solve the flash cache problem)

Source: Internet
Author: User
Tags stock prices
Solutions to flash cache Problems

Author: wangwaizi time: 2003-12-27 document type: translated from: Blue ideal

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.