c9 .txt file not updating between IDE and server?



Hi! I’m new to c9, and im trying to code something that is related to a text file, which is basically just a chat log. It is called chat.txt, and the chat gets displayed from the chat.txt onto a webpage. Anyway, for the chat.txt file to display on the webpage, I have to go back to the chat.txt file (by going to https://phptest-rycao18.c9users.io/chat.txt), refresh that page , the chat then shows up there, and then the chat will update on the web page. I can see in my IDE that the chat is coming through correctly, almost instantly, (i am using php to post the data to the text file), but getting the data from the file appears to be troublesome. If anyone could tell me how to keep constantly getting the chat file onto the page would be great. I am using jquery and php .
My current jquery code to get the chat from the file looks like this

        setInterval(function() {
            $( "#chatarea" ).load( "chat.txt" );
        }, 100);

I thought this should work, but i have very limited jquery knowledge.
If i’m doing anything wrong or you need any more information , please let me know :slight_smile: i’ll be glad to answer any questions you have. Thanks for helping


I’ve fixed the issue, have no idea why it started working now… thx anyway