# Prevent external txts from caching

**URL:** <https://forum.kirupa.com/t/prevent-external-txts-from-caching/165032>\
**Category:** Uncategorized\
**Created:** [October 6, 2005, 11:29pm UTC](https://forum.kirupa.com/t/prevent-external-txts-from-caching/165032 "2005-10-06T23:29:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![stardust](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@stardust](https://forum.kirupa.com/u/stardust)\
**Post date:** [October 6, 2005, 11:29pm UTC](https://forum.kirupa.com/t/prevent-external-txts-from-caching/165032/1 "2005-10-06T23:29:32Z")

</div>

Hi all,  
I know this question has been asked to death, I did search and tried to fix the problem with solutions from other posts, but none of them work!  
Whenever i use a random generator to load the external texts it always ends up as undefined. This is the code i use to call the external txts

```php
newstxt.html = true;
loadText = new LoadVars();
loadText.load("news.txt");
loadText.onLoad = function() {
newstxt.htmlText = this.newstext;
};

```

That loads everything fine, but caches.  
Ive tried slapping the random number generators at the end like this

```php
loadText.load("news.txt"+ Math.round(Math.random(1,999999)));

```

but then it becomes undefined. Anyone can shed some light for me?
