Can't believe the caching bug is STILL there

Hi,
I MUST be missing something. It can't be true that this has not been fixed after so many years.
So well, the problem is, every time you load an external asset or file, say for example using a Loader object or a URLLoader object (the same happened in AS2 with MovieClipLoader, LoadVars, XML.load() etc etc, and even before with loadMovie, etc) - every time you load a file, the Flash Player caches that file, and this is independent from your browser: it is Flash Player's own (and primitive) caching mechanism.
Whenever you load a file with the same URL again, no matter whether the file has been changed or not, Flash Player will use the cached copy, and there's NO WAY to prevent that - there are a few workaround that I will discuss later but they don't solve the problem completely, besides being terribly combersome.
Now, the HTTP protocol has a wonderful mechanism to manage the caching of files in an intelligent way, which has been working for years and, I think, was invented even before flash existed, however at least 10 years ago, and it works fine.
If an HTML page has an IMG tag with an image, for example, and if the browser has already a cached version of the image with that URL, the browser will first ask the server for that file and declare it has a cached version with date xxx; if the server's file is not newer than xxx, then the server replies that the file has not changed and the browser can use its cached version (or insist to redownload it if he wishes). But if the file on the server is newer, the server will reply with the new file, and the browser will NEVER show an obsolete cached version of the image (or whatever file).
Now, I don't know why, Flash Player was designed in a very primitive way that ignores this whole mechanism provided and standardised by the HTTP protocol. Flash Player will ALWAYS use a cached version of the file if he has one, it won't worry about veryfying whether it is obsolete or not.
So, unless the user clears its cache, whenever you update an xml, txt, jpg or whatever file that is loaded within your flash application, users that have previously visited the page may still see the old version.
Now, there's an easy workaround for ensuring that a cached version of the file is NEVER used, which is appending a "?somerandomname="+n to the filename, where n is obtained for example as n=(new Date()).value(); in order to ensure that it is always different.
This way, the complete url of the file is always different and the cached version will never be used.
However, this is not a solution either. For small text files it is ok, but for images and swf's for example, you DO want the cached file to be used IF it is not obsolete. Otherwise, returning visitors will always have to wait for the complete download time of everything, including files that have been downloaded yesterday and have not been modified.
So, this problem has been solved ages ago by the HTTP protocol, but the Flash Player is naive and ignores it.
I used to use 2 workarounds: the one I have mentioned for small files (texts, xml's), and the following one for files that can be updated every once in a while:
In the main html page, I append "?lastupdate=dddddd" to the swf name, where dddddd is a manually edited date of the last time something relevant has been updated. So for example:
<object ....... etc etc> <param name="movie" value="mainswffile.swf?lastupdate=20090625"/>... <embed etc etc etc src="mainswffile.swf?lastupdate=20090625"/></object>
Or something like that.
When I update some of the files that are to be loaded, I manually edit the "lastupdate" thing in the html.
Then in the ActionScript programming I use the _root.lastupdate variable to append to the filenames of images or assets I load.
All this is horribly cumbersome and error-prone. Image you deploy a website to a client that will be able to update his own texts and images: you have either to explain him how to edit the html file also, or create some complicated server-side or client-side script to manage the cache-avoiding system. That is, reinventing the wheel, in this case the cache.
Every time a new version of the player was released, I expected it to fix the stupid caching problem and to make my cumbersome tricks obsolete and unnecessary.
I expected to see that the new version would make proper use of HTTP caching protocol specifications, and use cached files ONLY when they are not outdated, after verifying it with the server according to the HTTP protocol.
Every new version of the player was a disappointment.
Then I hope the new version of the language, Action Script 3.0, would fix this.
No, it seems it doesn't.
I've done some tests with AS3 and with my great and sad surprise, the caching "bug" is still there.
Well, the bug, not the "bug": this is a bug proper, because there's no reason why it should work this way.
So, my question is.
Maybe am I missing something? Is there a way, by using some method or property of URLLoader, Loader and/or URLRequest, to tell Flash Player to use the cache in an intelligent way? I mean, in a not-astonishingly-stupid way?
Note that I'm not talking about forcing it to NOT USE cache at all: I mean using a cached version when it is appropriate, and redownloading the file when needed, as all decent http application have done for years.
Perhaps there IS a way to solve this.... It should be the default behaviour and should be transparent, but however, if there is a SERIOUS fix (not a hackaround), that would at least solve the problem.
Do anybody know of a method that really works?
(I have read of people trying by using http headers with caching directives but without success; or in the best case maybe they were able to force never-caching, which is NOT a solution as I explained)
Thanks in advance.
And if there is any Adobe developer listening, please fix this bug since it is really a shame that an application written in 2008 or 2009 suffers from a problem that was elegantly and definitely solved in the XX century.
Regards,
m.

I wrote a long reply and when I posted it it vanished.
I had even control+c'opied it before submitting but it didn't even get into my clipboard.
Shame on this forum (sorry to say that, but that's what I have to say).
So, I'll try to write it again but it won't be the same: the amount of rage is augmented.
Thank you BWolfe for letting me know that Flash now (since last year) has a bug management system. It was also such an enormous shame that it didn't have one.
Adobe used to confuse bug reports with feature requests; now this kind of confusion is still partially there and it is reflected by the voting thing, which is an absolute aberration. In a decent bug management system, the developers take the responsibility to give the bugs the priority they deserve; and no matter how low the priority, even the smallest bug ALWAYS get into the queue.
Now this bug we are discussing has been well known for AT LEAST EIGHT YEARS and I am not exaggerating at all, as I started using flash in 2001 and the issue was already mentioned here and there in forums etc; probably some blind people didn't see it as a bug (rather as a situation you have to face or work around), but it was known. And the very solution, as I already pointed out, was there even before Flash was conceived (well, for the sake of scientifical rigour, I should say, before Flash was commercialized): the HTTP protocol has the capability to perfectly manage file caching in a manner transparent to the higher layer.
So, since I don't believe that nobody at Adobe (formerly Macromedia) has heard about a bug that every intermediate-level actionscript developer in the world knows of, it is already kind of a shame that we have to report it in 2009, but that's ok. But that we have to get votes, no, that's an insult.
Jesus, ActionScript is a programming language, man, A PROGRAMMING LANGUAGE... it is not like Photoshop or Premiere; and it seems like in so many years, people who manage it haven't yet realised it completely.
Big Brother contestants should be voted. Feature requests may be voted. Bugs cannot be voted should just be fixed one by one as soon as possible.
Well, sorry for the rant and thank you for the answers.
Hope this gets through this time.

Similar Messages

  • I uninstalled acobat X1 so I can reinstall.. the cloud thinks it still there.. how do i install?

    mac crashed... I restored it. I uninstalled acrobat X1 so I can reinstall.. the cloud thinks it still there.. how do i install?

    Problems with re-installing Acrobat XI Pro

  • Where can i find the cached file?

    where can i find the cached file?.
    while one video was getting cached . I could see the cached file in the cache directory that mozilla firefox uses which in my pc is .....Local Settings\Application Data\Mozilla\Firefox\Profiles\uujksq39.default\Cache. but later on when the full video was completely cached i couldnt find the file existing in that directory and i still have my session of that firefox opened and can watch the video from the firefox session.
    since the cached video is still there ,there most be some place where the firefox is storing that file. is it the case that when the file is big (greater than some threshold value) firefox stores in some other directory?

    You can do a search an the about:cache page.

  • Fire Fox sent not all the data in text form. Reached only piece of information. Where can I find the cache of sent text?

    Fire Fox sent not all the data in text form. Reached only piece of information. Where can I find the cache sent the text?
    For example, I posted an article on a news site, but found that only a small part of my article was posted.

    I'm not sure whether Firefox saved that information. There is a chance that it is in the session history file, especially if you haven't closed that tab yet. To check that:
    Open your currently active Firefox settings folder (AKA your Firefox profile folder) using
    Help > Troubleshooting Information > "Show Folder" button
    Find all files starting with the name sessionstore and copy them to a safe working location (e.g., your documents folder). In order to read a .js file, it is useful to rename it to a .txt file. Or you could drag it to Wordpad or your favorite word processing software.
    The script will look somewhat like gibberish, but if you search for a word in your article that doesn't normally appear in web pages, you may be able to find your data.
    Any luck?
    For the future, you might want to consider this add-on, although I don't know how long it saves data after you submit a form: [https://addons.mozilla.org/en-US/firefox/addon/lazarus-form-recovery/].

  • When i open iphoto i see my photo's for 1 second and then they are gone .The photo's are still there but i can see them only on the bottom or top of my screen when i try to open them i get a sign that it is not possible.Can somebody please  help me?

    when i open iphoto i see my photo's for 1 second and then they are gone .The photo's are still there but i can see them only on the bottom or top of my screen when i try to open them i get a sign that it is not possible.Can somebody please  help me?

    Have you upgraded to iPhoto 9.6 for compatibility with Yosemite? If not, try that first.
    It looks like iPhoto has lost the connection between the thumbnails and the original image files.
    This can be caused by a corrupted iPhoto library, or the originals have been deleted or moved.
    Try first to rebuild your iPhoto Library:
    If you do not have a current backup of the iPhoto library, make a copy of the library, but do not overwrite any previous backup.
    Launch iPhoto with the ⌥⌘-key combination (option-command) held down.
    Select "rebuild" from the first aid panel.  This may take a while for a large library.
    Can you now see your photos again?
    If not, rebuild the library with iPhoto Library manager as described by Old Toad:            Re: iphoto crashed

  • TS4209 Wi-Fi 1.0 patch will not install on a 10.7.4 Mac OSX even though the Wi-Fi loss bug is still there

    Hello all,
    The Wi-Fi 1.0 patch will not install on a 10.7.4 Mac OSX even though the Wi-Fi loss bug is still there, every now and then (the iMac does not detect any wi-fi network).
    Are there any other solutions regarding this issue ?
    kind regards

    I figured out the problem.
    This is going to sound a little crazy, but I've spent a lot of time on this one.
    There's some kind of incompatibility with Lion and Seagate ST31000340AS drives. I was trying to install Lion on these drives and it would consistently fail. I've also tried to use these drives in a RAID volume. No go. I tried three different drives of this model. All of them failed.
    I tried to install Lion on a Seagate ST31000528AS and it worked first time and sings beautifully.

  • I'm tring to delete my webpage history but it doesn't work, I've done it the way it is told here on the webpage but all the webpage history is still there and have no star, how can I delete it?

    I'm tring to delete the webpage history and it's impsoible. I've done it the way it's told here on the webpage, I've deleted all the cockies etc and they are all gone but the webpages still stays in the search line. I've tried to delete all of it a couple of times now but nothing happens. When I push the scrolldown thing or write an adress the old once are still there. Why can they go away? What's wrong with it?

    See http://kb.mozillazine.org/Bookmarks_history_and_toolbar_buttons_not_working_-_Firefox

  • When I try to access my original wifi name, I can't.. So I had to create a second one. the first one is still there after resetting numerous times. Any suggestions

    when I try to access my original wifi name, I can't.. So I had to create a second one. the first one is still there after resetting numerous times. Any suggestions

    Hello Oddsbodkin,
    It looks like the creator of Netflix Desktop has a site for the project here:
    https://answers.launchpad.net/netflix-desktop/
    I would try posting your question there and see if anyone else has encountered this error and has a solution.
    Cheers, Patrick

  • Can't figure out why colors don't totally change when you select type with curser? It looks like it has by looking at it, but when you highlight the area after the old color is still there. It happens with objects to. Driving me NUTZ. Help!

    Can't figure out why colors don't totally change when you select type with curser? It looks like it has by looking at it, but when you highlight the area after the old color is still there. It happens with objects to. Driving me NUTZ. Help!

    Select the text, and open the Appearance palette (Come on guys, text highlight is irrelevant, it happens to objects too says the OP), and see what's listed there.  For a simple text object, there should only be a line item "Type", followed by "Characters", and when double-clicked the Characters line item expands to tell you the stroke and fill color.  For a basic object, there should be a fill and/or stroke.
    What happens sometimes, is that you end up adding extra strokes/fills to objects or text, and the appearance palette is where that will be noted.  Especially when you are dealing with groups, and/or picking up a color with the eyedropper, you may inadvertently be adding a fill or stroke on top of something.  You can drag those unwanted thingies from the Appearance palette into its own little trash can.

  • Im trying to free space on my iphone 4 8gb by deleting photos, if i put them onto my icloud can i delete the photo stream but still have the photos

    im trying to free space on my iphone 4 8gb by deleting photos, if i put them onto my icloud can i delete the photo stream but still have the photos

    There's no way to delete all message threads at one go. You can however do one contact thread at a time.
    In Messages app where you see a list of messages from different contacts,  tap Edit (top left), tap the red (on the left), then tap the red Delete button on the right.

  • My bookmark glasses icon is missing as well as the bookmark icon from preference pane.  The reading list is still there although completely grey colour and all the pages have the same blue icon. Can anyone advise how to fix this problem?  Mac os x 10.7 Sa

    My bookmark glasses icon is missing as well as the bookmark icon from preference pane. There is no + sign to add to the reading list.  The reading list is still there although completely grey colour and all the pages have the same blue icon. Can anyone advise how to fix this problem?  Mac os x 10.7.5  Safari 6.1.

    My bookmark glasses icon is missing as well as the bookmark icon from preference pane. There is no + sign to add to the reading list.  The reading list is still there although completely grey colour and all the pages have the same blue icon. Can anyone advise how to fix this problem?  Mac os x 10.7.5  Safari 6.1.

  • My facebook app went dark and had the word "waiting" below it and I can not delete so I downloaded a new facebook app which is ok but the old app is still there but now the word "waiting" is gone and still cannot delete.

    My facebook app went dark and had the word "waiting" below it and I can not delete so I downloaded a new facebook app which is ok but the old app is still there but now the word "waiting" is gone and still cannot delete.

    This is my boilerplate respone for the "waiting apps" problem. Give these suggestions a try in order.
    1. Tap the "waiting" icon and see if you can pause it. If it does pause, then tap it again and see if it will resume. If that works, repeat the same steps for each "waiting" icon.
    2. Reboot the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons.
    3. Make sure that you do not have a stalled download in iTunes - if you have a download in there that did not finish, complete that one first.
    4. If that doesn't work - sign out of your account, restart the iPad and then sign in again.
    Settings>iTunes & App Store>Apple ID. Tap your ID and sign out. Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.
    Go back to Settings>iTunes & App Store>Sign in and then try to update again. Tap one waiting icon only if necessary to start the download stream.
    5. You can also try deleting the waiting icons - tap and hold down on an icon until it wiggles - the tap the X on the icon to delete it. Then try to download again. Apps may also be able to be deleted in Settings>General>Usage>Storage if you cannot get the X to pop up on the icon.
    6. You can try resetting all settings. Settings>General>Reset>Reset All Settings. You will have to enter all of your device settings again.... All of the settings in the settings app will have to be re-entered.
    7. If all else fails, download the updates or the apps in iTunes on your computer and then sync the content to your iPad.

  • After successfully importing my bookmarks through Firefox Sync from my old to new computer, can I purge the old computer and still have the bookmarks on the new

    I want to upgrade my computer and did a Windows Easy Transfer to my new one. My Firefox bookmarks did not show up on my new computer so I used Firefox Sync-which worked fine. Now that I have the bookmarks on the new computer, can I erase the old computer and still have the bookmarks on the new one.

    First, disconnect your old computer from Firefox Sync so you don't accidentally delete the data from sync, but then yes you should be good to go.

  • I am trying to sync my itunes with my ipod, but when I get to step 3 of syncing, it stops. Also, I deleted all the songs on my ipod, and when I go to my music in my ipod the songs are all still there and in a grey color and I'm not able to select them.

    I am trying to sync my itunes with my ipod, but when I get to step 3 of syncing, it stops. Also, I deleted all the songs on my ipod, and when I go to my music in my ipod the songs are all still there and in a grey color and I'm not able to select them. How do I completely clear my ipod music, and how can I solve the syncing problem?

    Sync works the same way it always has, connect the device, select the content desired to sync and sync.
    All the media should be in iTunes already, iDevices are not and have never been backup devices.
    If this is a new computer, move the content from the old computer to the new computer.

  • I recently connected my iPhone 3GS to my computer, for the new update 3.4.5, but it didn't load at all, not even after 3 hours.. so i tried to disconnect to phone, but the loading meter is still there, like it has frozen, what should I do ?

    I recently connected my iPhone 3GS to my computer, for the new update 3.4.5, but i didn't load at all. Not even after 3 hours..
    so i tried to disconnect the phone, but the loading meter is still there like it's frozen can't push any button or anything at all.. what should i do?

    Restart your iPhone by holding down the on/off and home buttons until your see the Apple logo.

Maybe you are looking for

  • A single album cover is going on multiple albums at random.

    This problem has been going on for quite a while on and off, and ready to delete that album.  I downloaded Volbeat Beyond Heaven/Above **** and it keeps going to different albums. Linkin Park Hunting Party, Reel Big Fish Turn off the radio and Soundg

  • Error while generating XML file from rdf report.

    Hi All, we are having a rdf report that displays images retrieved from data base. I need to convert this report to xml report(using rtf template). when i tried to run the report after changing the output of the concurrent program to "XML", i am getti

  • My Macbook Pro is coming on and off

    My MacBook Pro Late 2008, Lion operating system, is coming on and off on its on without encouragement from me.  The other day I clicked on something when checking from some lost emails in (Yahoo an account I no longer use, but occasionaly emails end

  • No Sound from built-in mic recording to a basic track

    I am not a garageband user in the past so please bear with me. I want to record from the built-in mic and I did and there was a obvious record patten on the basic track. BUT No Sound, I thought maybe the file was wrong I then recorded an itunes and t

  • Message Split using BPM for Multiple SOAP Receivers

    hi, I have a scenario where in i have to split the message coming from IDOC(SOURCE) to multiple SOAP(TARGET) receivers through BPM I took a single file as a scenario and tested it. It worked fine. I am using only a single output interface. I have fol