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 7780587
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T18:56:46+00:00 2026-06-01T18:56:46+00:00

I am fetching my sites subpages through ajax function. All is working well. But

  • 0

I am fetching my sites subpages through ajax function. All is working well. But when I checked the requests in the console, I am getting the following report

Cache-Control   no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection  close
Content-Length  6663
Content-Type    text/html
Date    Wed, 11 Apr 2012 16:29:51 GMT
Expires Thu, 19 Nov 1981 08:52:00 GMT
Pragma  no-cache
Server  LiteSpeed
Vary    Accept-Encoding, User-Agent
X-Powered-By    PHP/5.3.10

Its showing that the contents are not cached. It shows the header expiry in a past date. But in the jquery page on ajax() I read that by default all the ajax calls are cached.What is the problem? Here is my code

 <script type="text/javascript">
  $("#subpage1").click(function() {
    $("#wrapper").empty();      
    $("#wrapper").html('loading');
    $.ajax({
        url: 'subpage/1.html',
        success: function(data) {
            $("#wrapper").html(data);   
        }
    });
});
</script>

I am new to jquery and ajax.

  • 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-01T18:56:48+00:00Added an answer on June 1, 2026 at 6:56 pm

    You’re simply interpreting the output from the console wrong: This is the response header from the server, that explicitly tells the client not to store that response in the cache.

    If you want it to be cached, you need to make changes at the server side of the transactions, not at the client side. That will be mainly done by sending the right headers: Provide an expiration date in the future or none at all. And remove those “cache” headers. The client will then send the date of the last cached request with its next request (in an If-Modified-Since header) and you just need to make sure that your script checks if there has indeed been a modification since that datetime – if so, return the content as usual, otherwise just respond with http status code 304 Not modified. Google about http headers related to cache control, this is a bit tricky.

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

Sidebar

Related Questions

Im fetching a local xml file using jQuery ajax through an html that i
Now a lot of scripts to facebook-style fetching data from url, but all of
I am fetching a webpage ( http://autoweek.com ) and trying to process it but
I'm fetching some data from an MSSQL table using the mssql_fetch_object, but the text
I'm fetching data from all 3 tables at once to avoid network latency. Fetching
I have created a simple function for fetching xml: function meteor(){ $request_url = http://site.com/xml.xml;
1) I have been working on fetching data from an excel sheet i can
Been following the Core Data tutorial on Apple's developer site , and all is
Bundle install worked. But when I git push heroku master, I got this: C:\Sites\first_app>git
I am fetching url like facebook. For all images in that page I get

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.