943,428 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 2792
  • PHP RSS
Jan 21st, 2005
0

A php question

Expand Post »
Ive created this awesome CMS, you see, but one problem... It reades every thing from the catch! NOT GOOD! Like that I have to refresh the page every time I wan't to see changes in it! Is there a way to make is so that the website doesn't read from the catch?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
joey101 is offline Offline
45 posts
since Nov 2004
Jan 21st, 2005
0

Re: A php question

Do you mean cache ?
This is really a html question.
You can make the browser not cache the webpages by adding the following html meta tag within your header tags ( <head> )
PHP Syntax (Toggle Plain Text)
  1. <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">

Hope that helps
Reputation Points: 12
Solved Threads: 5
Junior Poster
ReDuX is offline Offline
127 posts
since Sep 2004
Jan 22nd, 2005
0

Re: A php question

actually ReDux there are ways of doing this with php

Quote ...
PHP scripts often generate dynamic content that must not be cached by the client browser or any proxy caches between the server and the client browser. Many proxies and clients can be forced to disable caching with:

<?php
// Date in the past
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");

// always modified
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");

// HTTP/1.1
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);

// HTTP/1.0
header("Pragma: no-cache");
?>

Note: You may find that your pages aren't cached even if you don't output all of the headers above. There are a number of options that users may be able to set for their browser that change its default caching behavior. By sending the headers above, you should override any settings that may otherwise cause the output of your script to be cached.

Additionally, session_cache_limiter() and the session.cache_limiter configuration setting can be used to automatically generate the correct caching-related headers when sessions are being used.

Remember that header() must be called before any actual output is sent, either by normal HTML tags, blank lines in a file, or from PHP. It is a very common error to read code with include(), or require(), functions, or another file access function, and have spaces or empty lines that are output before header() is called. The same problem exists when using a single PHP/HTML file.
the above quote was taken directly from an official PHP Mirror
Reputation Points: 13
Solved Threads: 4
Posting Whiz
paradox814 is offline Offline
351 posts
since Oct 2004
Jan 22nd, 2005
0

Re: A php question

Thank guys! You don't know how helpful that is I spent a lot of time debugging for nuthing, it was just the server all well... Thanks to both of you!

and yes, I meant cache. It was late at night when I typed that.
Reputation Points: 10
Solved Threads: 0
Light Poster
joey101 is offline Offline
45 posts
since Nov 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Help needed with script
Next Thread in PHP Forum Timeline: PHP Templating system





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC