Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8200611
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T06:30:34+00:00 2026-06-07T06:30:34+00:00

When updating the content of a text file, it does not update. Instead, I

  • 0

When updating the content of a text file, it does not update. Instead, I have to delete all cache and whatnot in my Google Chrome to make it refresh it. However, it does work when using a Apache server (local host).

I tried adding a: <meta http-equiv="expires" content="Mon, 26 Jul 1997 05:00:00 GMT"/> <meta http-equiv="pragma" content="no-cache" />, but the problem still occurs.

function MakeRequest()
{
  var xmlHttp = getXMLHttp(); // just a basic XML request
  xmlHttp.onreadystatechange = function()
  {
    if(xmlHttp.readyState == 4)
    {
      HandleResponse(xmlHttp.responseText);
    }
  }
  xmlHttp.open("GET", "counter.txt", true); 
  xmlHttp.send(null);
}

And I have another JavaScript just printing this in a div: (timed to run with some delay)

document.getElementById('counterHolder').innerHTML = response;

Click here if you need to see the webpage live.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T06:30:37+00:00Added an answer on June 7, 2026 at 6:30 am

    This appears to be a caching problem. I can’t exactly describe why it happens the way it does, but in my experience, adding a random string of characters to the end of your url in your get request should work. I would suggest something like below:

    xmlHttp.open("GET", "counter.txt?" + Math.random(), true);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a website updater(people can update content(text) not the look of the website)
I'm having problems updating a div's content in IE using .update; I also tried
I have a view file like this : <html> <head> <meta name=layout content=main />
I have an Ajax.ActionLink that successfully calls my controller action but instead of updating
I have the following file file: <html> <head> <title></title> <script type=text/javascript src=/Prototype.js></script> <script type=text/javascript>
In my application I have a listView . I want to update its content
I have a textViewController class. I want to set(basically update) the corresponding textView's content
I have an update button on which I want to pull attention when updating
How do i do that - Updating the content of a code behind generated
When updating a row, I want to have a built-in check to do some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.