Odd lack of server response

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
rhecker
Forum Contributor
Posts: 178
Joined: Fri Jul 11, 2008 5:49 pm

Odd lack of server response

Post by rhecker »

I am building a LAMP CMS application on a Dreamhost shared server account and encountered behavior I have never seen before. If we change content in the MYSQL database, then go to the webpage where those changes should manifest, they are not reflected unless we refresh the page.

<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">

If I add the metatag above, the problem is resolved, but I have never had to do this before and am wondering what it indicates.

I know that MySQL has an option for a query cache, but the manual states the following:
"The query cache does not return stale data. When tables are modified, any relevant entries in the query cache are flushed."

Thanks for any thoughts.
User avatar
Darhazer
DevNet Resident
Posts: 1011
Joined: Thu May 14, 2009 3:00 pm
Location: HellCity, Bulgaria

Re: Odd lack of server response

Post by Darhazer »

Most likely the server is configured to send cache-control headers.
Open the page with Firefox with installed and active Firebug and check on the Net tab the response headers... or just fetch the page using curl and see the response headers... or use HttpWatch or whatever software you prefer, just check response headers ;)

And it's best if your application sends the cache-control headers ;)
rhecker
Forum Contributor
Posts: 178
Joined: Fri Jul 11, 2008 5:49 pm

Re: Odd lack of server response

Post by rhecker »

Thank you. Your suggestions helped me get to the bottom of this.
Post Reply