I\'m experimenting with PHP together with Ajax and JQuery to make a site where I can write to a text file and then have the site load the textfile\'s contents into a div.
Append a time string to the title of the file in the load statement to prevent caching -
$(document).ready(function() {
setInterval(function() {
var ms = (new Date).getTime(); // epoch time
$("#text").load("storydoc.txt?ms=" + ms ); // add query string
}, 2000);
});
The added string is inconsequential to the actual file but will have the affect of making the request 'new' each time because the added time string will be different and there will not be a copy in the cache.