Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Internet Explorer cache + Flash SWF

Posted on 2006-11-06
2
Medium Priority
?
4,576 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
[X]
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
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
Suggested Courses

721 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