Current location: Hot Scripts Forums » General Web Coding » Flash & ActionScript » Flash and Web Caching


Flash and Web Caching

Reply
  #1 (permalink)  
Old 05-06-09, 12:45 AM
Dan Man Dan Man is offline
Newbie Coder
 
Join Date: Sep 2006
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Flash and Web Caching

Hi

I have a flash player that cycles through images. It can be seen here:

http://www.rapforums.com

This player reads from an XML file that indicates the image locations.

I've noticed that when I upload the XML file after changes, the browser will use the old cached version. If i go straight to the XML file's url and refresh it, everything works as expected. This is the same with images uploaded with the same name.

I don't want the users of the site to manually refresh their cache (obviously). Is there any thing I can do from either the Flash or server side scripting to solve this?

I am using PHP and have access to the .fla and .as files (although I am not a flash developer - I hired someone to make the player)

Thanks!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 06-26-09, 03:10 PM
Dan Man Dan Man is offline
Newbie Coder
 
Join Date: Sep 2006
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Since no one has responded, let me rephrase my problem in a simpler fashion....

How can you ensure that up-to-date content will be displayed with a flash player that shows images who's locations are read from an one XML file with a constant file name (the XML file's name never changes)?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 06-27-09, 07:00 AM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,074
Thanks: 11
Thanked 88 Times in 83 Posts
You could use .htaccess to send some specific cache-control headers for .xml files.
Code:
<FilesMatch "\.xml$">
Header set Cache-Control "no-cache"
Header set Pragma "no-cache"
Header set Expires "-1"
</FilesMatch>
Save this as ".htaccess" (or add it to your existing .htaccess file if you have one already) in your root directory.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 06-27-09, 02:05 PM
Dan Man Dan Man is offline
Newbie Coder
 
Join Date: Sep 2006
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
great! The XML file was the biggest concern. Thanks for the help Nico
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Outsourcing web design to Bulgaria - Marin Todorov gal_flower Job Offers & Assistance 4 02-14-06 09:05 PM


All times are GMT -5. The time now is 04:55 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.