I am working a properties website where user creates the listing and later to save it, we ask him to connect via Facebook. Currently it is working nice but, when I create another property (say a User did not login) and later I just go back to that page of creating property and later connect via facebook then.. it does log the user in but, does not create the property..
I tried various things and later I figured out that once I clear browser cache, it is creating the properties.
So, my question is, how to clear cache in browser using CakePHP 2.x?
Also, I have tried:
Pure HTML :
<meta http-equiv='cache-control' content='no-cache'>
<meta http-equiv='expires' content='0'>
<meta http-equiv='pragma' content='no-cache'>
however, it did not help. Is there a way to do it via CakePHP itself? or is it Facebook thing which needs to be addressed?
Please advise.
PS: clearCache() does not work I don’t know why.
You cannot clear a browser’s cache unless you are actually the one using the browser. (eg.
File->Options->Clear Cache)What you’re talking about is just telling the browser to not cache YOUR page in the first place – which it appears you already know how to do.
But once it’s cached, it’s cached by THEIR browser, not YOUR code. It would be a security issue and easily abusable among other things to allow you to delete the users cache.