Jump to content

clear cache


dreamwest

Recommended Posts

So i have a page cached with php pragma headers. How can i clear the cache when someone sets a cookie:

 

<script>
function set_cookie(object, value) { 
var expireDate  = new Date()
var expstring   = expireDate.setDate(expireDate.getDate() + 500)
document.cookie = object+'='+value+'; expires='+expireDate.toGMTString()+'; path=/';

window.location.reload()  
}
</script>

<a  onclick="set_cookie('list', '1');"  href="javascript:void('0');">Set cookie and clear cache</a>

Link to comment
https://forums.phpfreaks.com/topic/229438-clear-cache/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.