A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Preventing XML Caching - tried the obvious

  1. #1
    Senior Member
    Join Date
    Jan 2001
    Posts
    567

    Preventing XML Caching - tried the obvious

    Darn-ed XML is caching in my browser(s). There's been a random string added to both the XML file pointer in the actionscript and a random string added to the swf location in the html.

    Code:
    var XML_URL:String = "xmls/projects.xml?cacheisbad=" +Math.random();
    Firebug says everything is being called correctly with the random string attached. XML view by itself in the browser has been updated.

    I thought it might be some strange SWFObject thingie, but the XML still caches if I bring up the swf directly from the url without embedding it.

    If I try on a different network the xml is also cached! (But if I view the xml in the browser it has been updated.)

    Any thoughts?

  2. #2
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    Adding a string to the URL only works for browsers.
    - The right of the People to create Flash movies shall not be infringed. -

  3. #3
    Senior Member
    Join Date
    Jan 2001
    Posts
    567
    Do you mean how I tested if it was the javascript (SWFObject) is pointless? Or that there is a better way to prevent the XML from caching?

    Hmm, once I changed the name of project.xml on the server (and subsequent reference to it in the actionscript) my problems went away. Must have been the server doing something strange?

  4. #4
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    All what I was saying is that preventing to cache the XML works only with a movie in a browser by adding something unique to the XML name.
    - The right of the People to create Flash movies shall not be infringed. -

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center