Re: How to test response cache is working or not?
From: Paul Barfoot (Paul_at_theglobalfamily.fsworld.co.uk)
Date: 10/28/04
- Previous message: Bhavin Patel: "How to test response cache is working or not?"
- In reply to: Bhavin Patel: "How to test response cache is working or not?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 28 Oct 2004 16:28:37 +0100
Hi Bhavin
Try this, it worked for me.
Put the following line in your html script so that it is placed in the
<head> section of the html after <title>:
<meta name="Date" content ="<?print date('d/m/y H:i:s') ?>" />
(1) Load the page and view the source html of the page - <meta name="Date"
content = ??? should show the time/date of when the page was created.
(2) Now re-load the page (don't use Refresh as this will override the
cache!) and view the source html again.
- If you were within the 60s then the time/date should be the same as in
(1)
- If you were outside the 60s then you should have a new time/date.
You might want to increase the time to 120s during testing to give yourself
more time.
-- Paul Barfoot The Global Family Website is at: http://tgf.athnic.com "Bhavin Patel" <bhawin13@indiatimes.com> wrote in message news:eef24e5f.0410280401.42b6e902@posting.google.com... > Hello, > > I have written this code in php file. to set cache for 60 second. > > ============================================================== > > Header("Cache-Control: must-revalidate"); > $offset = 60; > $ExpStr = "Expires: " . gmdate("D, d M Y H:i:s", time() + $offset) . " > GMT"; > Header($ExpStr); > > ============================================================== > How to test response cache is working or not? Please help me to find > out correct way towards solution. I want to cache page for 60 second. > > Thanks for valuable time. > bhawin13
- Previous message: Bhavin Patel: "How to test response cache is working or not?"
- In reply to: Bhavin Patel: "How to test response cache is working or not?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|