Timed events using Ajax techniques

Guys I am using ajax techniques to read a text file from my computer using apache server. This text file is periodically edited during while the client is browsing and i have developed code that could refresh without clicking i.e. ajax technique. the problem is that after a few edits usually one the text seems to be read from some other place i.e. the contents displayed are those of a previous instance and not the current text from the file specified in the html code.πŸ˜•
This persists even after closing the browser and restarting the computer/and or the apache server. its is only after i have run my tuneup utilities that i am able to see the currents files text.
Any help will be appreciated.

Replies

  • shalini_goel14
    shalini_goel14
    Hi Munguti,

    I guess your current problem states that there is some problem in the paths that you would have provided. This could be a reason that it is reading text from some other place. Can you show us your code(if possible) -what exactly you are trying to do? May be we can be of some help. πŸ˜€
  • Munguti
    Munguti
    I will upload the code later on, I am not in a position to do so right now. Anyway it cannot be the path since the text being displayed is the one the text document had previously but was edited.

    I am trying to do a chat like update using text documents instead of XML, the text document has it's data changed periodically as the client is browsing, the browser should change its display depending on the current content of the text file. The problem is that the browser will change the text then after a while will stop reading the current text and will always be displaying the previous text, maybe its because it may be caching the text, if that is the case i might need guidance on how to stop this cahing.

    Is using a text file the best approach.(The data is in text since it is not that complicated).
  • shalini_goel14
    shalini_goel14
    Hi Munguti,

    Cannot say anything without looking at code. Are you talking about clearing browser cache? What and how exactly you are doing or reading text from files? What kind of editing you are doing?
  • Munguti
    Munguti
    Sorry i didn't reply on time, i have been trying too hard to hack the code but i couldn't. I tried to block the browser from caching the response but i couldn't.
    Anyways i stopped sending my request to a text document, now i am sending them to a php script which reads the text document and it has worked fine, it's real time as i wanted it.
  • Munguti
    Munguti
    Thank you shalini
  • CEMember
    CEMember
    Munguti
    Sorry i didn't reply on time, i have been trying too hard to hack the code but i couldn't. I tried to block the browser from caching the response but i couldn't.
    Anyways i stopped sending my request to a text document, now i am sending them to a php script which reads the text document and it has worked fine, it's real time as i wanted it.
    Hi Munguti,

    Can you please explain your exact problem along with solution here? We all can get benefit from it. πŸ˜€

    Thanks !

You are reading an archived discussion.

Related Posts

HI FRIENDS CAN ANY ONE SEND THE DUMPS FOR CCNA ...πŸ˜’
Hi Guys!!πŸ˜› Well i want to know abt cyber law degree or diploma.... plz any one tell me abt it duration and from which university it will be useful. Is...
Hello All, this is dumes, I am new here πŸ˜€
India’s 12-run defeat to South Africa in their final SuperEights game made it their third defeat on the bounce in the T20 World Cup 2009. The latest misadventure in India's...
hi crazy engineers, Im a 4th year mechanical engg student in an anna univ affiliated college. I wanna be a design engineer.wat all the courses that i have to study...