You need to sign in to do that
Don't have an account?
Force.com site vf page cache problem
I have a visualforce page that is exposed on Force.com site publicly.
I've used cache = false attribute in <apex:page> tag, if I update anything in the page and try to view the site again in the same browser, I don't see the updated page.
It shows me the old one before the update.
I'm using bootstrap in my vf page.
I've also tried these meta tags in the head section of the page, but still not able to get it working.
This is a major issue, as page will be pulling ever changing data.
I've used cache = false attribute in <apex:page> tag, if I update anything in the page and try to view the site again in the same browser, I don't see the updated page.
It shows me the old one before the update.
I'm using bootstrap in my vf page.
I've also tried these meta tags in the head section of the page, but still not able to get it working.
<meta http-equiv='cache-control' content='no-cache'></meta> <meta http-equiv='expires' content='0'></meta> <meta http-equiv='pragma' content='no-cache'></meta>
This is a major issue, as page will be pulling ever changing data.
Can, there be anything done in the code of the page, make a meta tag or some javascript, that wipes out the cache of the page on exit, or doesn't save it in the first place.
I even tried by cache="true" and putting a very short expiry time, but that too didn't help.
I tried to reproduce your issue but couldn't. My browser is not caching any page. Here in order to prevent such cacheing issue you can do one thing which salesforce does for static resources. It builds new url everytime static resource is updated.
Here is code which can help you.
Page : Its controller: Here basically we are trying to reproduce new url so that browser will not take it from cache.
Approve this as a solution if this helps. Also this is workaround not exact solution which you are looking for. As you have tried cache option which comes by as atribute then this is way to go .
Thanks,
KMForce