# Preventing caching of loaded txt and xml files

**URL:** https://forum.kirupa.com/t/preventing-caching-of-loaded-txt-and-xml-files/145642
**Category:** Uncategorized
**Created:** [April 24, 2005, 2:51pm UTC](https://forum.kirupa.com/t/preventing-caching-of-loaded-txt-and-xml-files/145642 "2005-04-24T14:51:42Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![littlered](https://avatars.discourse-cdn.com/v4/letter/l/e5b9ba/32.png) [@littlered](https://forum.kirupa.com/u/littlered)
#### Post date: [April 24, 2005, 2:51pm UTC](https://forum.kirupa.com/t/preventing-caching-of-loaded-txt-and-xml-files/145642/1 "2005-04-24T14:51:42Z")

</div>

hi there,

I’m having trouble with my text and xml files seeming to be cached. They are altered by a php script called from flash, and this overwrites the text files correctly, but when they are reloaded into flash (eg. when the page is refreshed) the old data is still being used.

I was reading [this](http://www.kirupa.com/web/xml/examples/simpleeditor.htm) article and was interested in this line:

```auto
input_xml.load(xml_file + "?uniq=" + new Date().getTime());

```

could someone please explain why this would work, and whether this would prevent the problem that I’m having. I’m presuming that this unique number is never used in any way, it just forces the new file to be loaded, but I’m just a bit unsure why.

thanks for any help!
