WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am facing problem from wp cache. I have an contact listing page. When user delete on of his contact from the listed contacts then on the page it show that the record has been deleted and even record also disappear from the page but when the user again come to that page or refresh the page then the deleted record again come in the list. Although in the database that record has been deleted. When I press Ctrl+F5 then all thing is working fine.

After reading many forum I knew that this problem is due to Cache plugins. So I disable wp_supercache plugins and I also disabled the wordpress's own cache but yet I have to press ctrl+F5 to remove the deleted records from the html page.

Please help so that wp cannot set any kind of cache.

Thanks in advance.

share|improve this question

migrated from stackoverflow.com Dec 21 '11 at 14:26

This question came from our site for professional and enthusiast programmers.

In the header of the template file in question (probably header.php in the theme directory), try adding:

<?php nocache_headers(); ?>

This doesn't sound like it is a problem with the cache plugins, which basically control caching on the server, it is more likely that this is caching on the client. This will tell the browser not to store a copy of the page.

Reference: http://codex.wordpress.org/Function_Reference/nocache_headers

A quick and nasty solution is to add this as a child of the HTML head element too:

<meta http-equiv="cache-control" content="no-cache" />

Hope that's what you're looking for!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.