You need to sign in to do that
Don't have an account?
How can we change HTTP response headers? (to disable caching)
We are coding a web application integrated with Salesforce.com and we have run into several challenges.
One of the obstacles is that, by default, Salesforce.com sets HTTP response headers to allow caching.
In our applicaiton, it is a requirement that the HTTP responses must not be cached.
Every request must come to our Salesforce.com application to get a "fresh" result, and to update fields in our database.
It is a disaster if an old (cached) response is used by the remote site.
How can we alter the HTTP response headers to force Saleforce.com to disable caching?
A typical Salesforce.com HTTP response includes this header line (which is a problem for us):
Cache-Control: public, max-age=600
A working setup on a server outside Salesforce.com includes these header lines:
Content-Length: 308
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
How can we force Salesforce.com to output these header lines??
-- David Jones
After some searching, I think this will solve my caching woes:
<apex:page cache="false" ...>
-- David
All Answers
Can you provide some more info on exactly which tools / features in salesforce you are using to generate these response.
After some searching, I think this will solve my caching woes:
<apex:page cache="false" ...>
-- David