PDA

View Full Version : automatically reload text files


rsekiya
04-06-2007, 03:08 PM
Hello,

Is there are way to automatically reload a linked to and sometimes cached text file? I am working on a web-based records system that automatically recreates a specific text file everytime a change is made. The process and problems works like this.

1. Main screen
2. Link to record create/edit screen
3. Create a record so the text file is created.
4. Main screen
5. Link to text file

This first half of the process works fine.

6. Main screen
7. Link to record create/edit screen
8. Edit the record that was created in step 3 so that the text file is recreated.
9. Main screen
10. Link to text file

Here is where the problem occurs. The text file had been previously cached during step 5 so step 10 shows the old text file instead of the newly recreated text file. To see the new version of the text file I just need to hit reload on the browser, but the end users of the system wouldn't know to or want to do that.

The current link to the text file is a simple:

<a href="../records/51P.txt">

Is there a way to change this using javascript, html, or something else so that the browser displays the new version of the text file automatically? Unfortunately, it does have to be stored and displayed in a text file. I would really appreciate any insights any of you may be able to provide.