Page 1 of 1

Odd lack of server response

Posted: Wed Mar 09, 2011 2:26 pm
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.

Re: Odd lack of server response

Posted: Thu Mar 10, 2011 7:57 am
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 ;)

Re: Odd lack of server response

Posted: Thu Mar 10, 2011 3:19 pm
by rhecker
Thank you. Your suggestions helped me get to the bottom of this.