Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Internet Explorer cache + Flash SWF

Posted on 2006-11-06
2
4,567 Views
Last Modified: 2013-11-19
Hi there!

I've put a voting system on my webpage. Everything seems to be OK. I've started today with the first poll and people come and vote as expected. The problem arises when someone tries to reload in order to see the latest poll results. In Firefox the latest results are shown all the time, but Internet Explorer seems to cache the swf file and there's no way to reload it! Ctrl+F5 doesn't seem to work either! :-( What can I do? Is there anything I can change on my code to prevent Internet Explorer to cache the SWF file?

The poll is here, just in case you might need to take a look at it:
http://oink.elrellano.com/index.php?l=15421

Thanks!
0
Comment
Question by:pablo_picasso
2 Comments
 
LVL 13

Accepted Solution

by:
AngryBinary earned 125 total points
ID: 17883081
Try adding this to the <HEAD> section of the page on which the SWF resides.

<META HTTP-EQUIV="EXPIRES" CONTENT="0" />

This should indicate to IE that the images and other assorted content on the page expire immediately and should not be cached.

However, it is more likely the case that it's not the SWF being cached, but rather the datasource that the SWF is retrieving, since even though it is being requested by the SWF, it is actually a mechanism of the browser to make the request to the server. If the above META tag doesn't work, this indicates that IE is caching whatever XML file or script you are retrieving to get the latest poll results. A commonly used workaround is to append a query string containing a unique value (like the current time) to the URL in the FLA. Since the query string is never the same, the cached file is never used. For instance, instead of:

myXml.load("./results.xml");

You would use:

myXml.load("./results.xml?" + new Date().getTime().toString());

The same would apply for loadVars, or whatever other actionscript you are using.
0
 

Author Comment

by:pablo_picasso
ID: 17884867
Thanks AngryBinary!! :-)

I've opted for creating a 'reload' button on the SWF which will reobtain the latest poll results :-) This way my visitors won't reload the whole page every time they want to see the results! :-)

Thanks for your great help! Very well explained indeed! :-)

Cheers!
  Picasso.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo‚Ķ
Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
This video teaches users how to migrate an existing Wordpress website to a new domain.
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question