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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:18:13+00:00 2026-06-16T01:18:13+00:00

I have a large json data object (over 300K uncompressed, 40K gzipped) which is

  • 0

I have a large json data object (over 300K uncompressed, 40K gzipped) which is used on every page of my internal system. I want to fetch it every 15 minutes. In this time user will probably visit tens of pages of my system.

The HTTP Response headers in Firebug look like:

Cache-Control   max-age=899, public
Connection  Keep-Alive
Content-Encoding    gzip
Content-Length  44017
Content-Type    text/html; charset=iso-8859-2
Date    Tue, 04 Dec 2012 16:21:45 GMT
Expires Tue, 04 Dec 12 17:36:45 +0100
Keep-Alive  timeout=15, max=99
Last-Modified   Tue, 04 Dec 12 17:21:45 +0100
Pragma  no-cache
Server  Apache
Set-Cookie  user_auth=xxx; expires=Wed, 12-Dec-2012 16:21:45 GMT; path=/; domain=example.com 
Vary    Accept-Encoding
X-Genaration-Time   0.13282179832458 sec.
X-Genarator vCRM 3.1 (c) Veracomp S.A.
X-Powered-By    PHP/5.3.3-7+squeeze14

The cache headers are set to 15 minutes in future, but neither Chrome nor Firefox caches it.
The Firebug says this about cache:

Data Size   44017
Device  disk
Expires Thu Jan 01 1970 01:00:00 GMT+0100
Fetch Count 5
Last Fetched    Tue Dec 04 2012 17:21:45 GMT+0100
Last Modified   Tue Dec 04 2012 17:21:45 GMT+0100

It seams the Expires header is ignored, but why?

This sould not mattery, but I better write, that the content type is text/html, so the server can gzip it, but in reality the content is JSON.

I am using Prototype.js to request this. I set the request header:

Cache-control: max-age=900

Prototype.js does not add any cache buster parameter to the url.
I am using PHP with Zend_Framework to set serve the response.

What am I doing wrong?

  • 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-16T01:18:14+00:00Added an answer on June 16, 2026 at 1:18 am

    Problem solved.

    As @Victor pointed out, I had the “Pragma: no-cache” header set. The header was somehow set by PHP. I worked with our webserver admin and we had managed to unset the header with Apache.
    Still it was not enough. Our framework sets cookies with every page refresh and I could not turn it of. Browsers did not want to cache the requests which set cookies. We had to unset the Set-Cookie headers too.
    Finally this two unsets allowed us to enable cache:

    <LocationMatch "(?i)/url/we/want/to/be/cached/.+">
           Header unset Pragma
           Header unset Set-Cookie
    </LocationMatch>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two test cases using a reasonably large json object (1.2mb): source: data
Ok, I have a large multidimensional JSON object being poured into my app, of
I have a javascript rich page that is passing a large JSON formatted to
I have a jqGrid on a web page, with large data sets. Up to
So I have a large JSON object i'm returning from the server, then building
I have a large list of objects inside JSON like this: var data =
I have a large JSON file that contains A LOT of similar code. It's
How to store large JSON String in cookie ? I have to use cookie
I am building a Railo app which deals with a lot of JSON data
I have a large XML file (converted to JSON) that consists of multiple repeating

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.