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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:13:22+00:00 2026-06-15T23:13:22+00:00

My site had a problem in that certain browsers (especially opera and gecko) were

  • 0

My site had a problem in that certain browsers (especially opera and gecko) were “over-caching” (caching far too much for my taste).

I’ve just added the following PHP snippet to hopefully disable caching in all browsers:

<?php 
header("Expires: Tue, 01 Jan 2000 00:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
?>

Question: How would you test this out, to make sure it actually works?

Additions, Notes: I need a stupidly simple test; my skill level is pretty low. I can’t do cache busting (url changes) because it’s a one-page site.

  • 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-15T23:13:23+00:00Added an answer on June 15, 2026 at 11:13 pm

    Get the current time() and store it in the PHP session. Use var_dump() to print out the $_SESSION array, and also to print the current time(). Click “refresh” a few times. Expect the session array to remain stable and the current time to change. If both remain stable, the script output is being cached.

    Example here: http://www.laprbass.com/RAY_cache_test.php

    <?php // RAY_cache_test.php
    error_reporting(E_ALL);
    date_default_timezone_set('America/Chicago');
    
    // SEND HEADERS
    header("Expires: Tue, 01 Jan 2000 00:00:00 GMT");
    header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
    header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
    header("Cache-Control: post-check=0, pre-check=0", false);
    header("Pragma: no-cache");
    
    // START SESSION
    session_start();
    
    // GET CURRENT TIME
    $now = date('c');
    
    // IF NO TIME IN SESSION YET, STORE ONE
    if (!isset($_SESSION['myTest'])) $_SESSION['myTest'] = $now;
    
    // SHOW THE SESSION AND THE CURRENT TIME
    echo 'SESSION TIME: ' . $_SESSION['myTest'];
    echo '<br/>';
    echo 'CURRENT TIME: ' . $now;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I had a problem with new member spam in an ExpressionEngine Site. Over a
I had a problem in site map path I had navigation bar which take
I once found a web site that had some 'Requires .net 1.0', 'Requires .net
I had this error when I browse new web site that site sub from
We have a site that currently runs auctions at a certain time (picked by
I've had this problem numerous times with even the simplest layouts. It seems that
I've had an intermittent problem that I thought was due to un-cleared floats. What
I had my mvc site with runAllManagedModulesForAllRequests=true and had no problem, then I found,
I'm currently hacking on an events site and have never had a problem optimizing
I am having a problem that has had me stuck for a day and

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.