Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Internet Explorer cache + Flash SWF

Posted on 2006-11-06
2
Medium Priority
?
4,578 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 500 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
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.
Suggested Courses

877 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