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

  • Home
  • SEARCH
  • 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 7038623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:41:29+00:00 2026-05-28T01:41:29+00:00

I allready have this: $(document).ready(function() { // one time stuff $.ajaxSetup({ cache:false }); }

  • 0

I allready have this:

$(document).ready(function() {
    // one time stuff
    $.ajaxSetup({
      cache:false
    });
}

And i now it works cause i had a problem without it and i added it for a file that i read every 100ms. Only that was for this:

$.getJSON('output.json', function(data){    
    faceDetected = data.faceDetected;
    frameCount = data.frameCount;   
});

It doesn’t work for this:

function loadContent(page){

    var xmlhttp = new XMLHttpRequest();

    xmlhttp.onreadystatechange = function(){
        if ((xmlhttp.readyState == 4) && (xmlhttp.status == 200)) {

            $("#content").html(xmlhttp.responseText);
        }
    }
    xmlhttp.open("GET", page, true);
    xmlhttp.send()

}

Does someone know how to fix?

  • 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-05-28T01:41:30+00:00Added an answer on May 28, 2026 at 1:41 am

    The first example is jQuery and the cache: false setting is only about jQuery.

    The second is using the native XMLHttpRequest object. To bust the cache in the second example you could append a timestamp and a random number to the query string.

    var noCache = new Date().getTime() + Math.random() * 1234567;
    xmlhttp.open("GET", page + '&noCache=' + stamp, true);
    

    You may take a look at the following blog post for a more elaborate solution.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this toggleClass function: $(document).ready(function() { $(button#playersize).click(function(){ $(#wrapper).toggleClass(small large); $(.divone).toggleClass(small large); $(.divtwo).toggleClass(small large);
I have the following jQuery script: $(document).ready(function() { $.ajax({ url: 'temp.ajax.php', type: 'GET', success:
http://jsfiddle.net/yrM3H/2/ I have the following code: jQuery(document).ready(function() { jQuery(.toggle).next(.hidden).hide(); jQuery(.toggle).click(function() { $('.active').toggleClass('active').next('.hidden').slideToggle(300); $(this).toggleClass('active').next().slideToggle(fast); });
$(document).ready(function(){ $(li.playerContainer).click(function(){ $(this).animate({paddingBottom:150px, paddingTop:150px, paddingRight:230px, marginTop: -150px, queue:true}); $(p).animate({opacity:1},2500); }); $(.go).click(function(){ $(this).parent().parent().animate({queue:true, paddingBottom:0, paddingTop:0,
Update: I did get this working, here is the new javascript: $(document).ready(function() { $('a').click(
I have this piece of Javascript and it just won't work. I allready checked
This just saves time. Since I already have a web applciation. I can just
I'd like some help with the following jQuery code if possible... $(document).ready(function() { $('table.sortable').each(function()
I already have a jQuery(document).ready fragment defined. Since I'm working on a large-scale modular
If I have multiple $(document).ready(...) functions, do they overwrite each other? For the sake

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.