cache control?
cache control?
degenaro
Posts: 24Questions: 1Answers: 0
My javascript looks like this:
[code]
oTable.fnReloadAjax("/ducc-servlet/json-format-aaData-jobs",ducc_load_scroll_jobs_callback);
[/code]
Using FF, about:cache show lots of entries line this:
[code]
http://myhost.my.domain.com:42133/ducc-servlet/json-format-aaData-jobs?_=1362577190455
http://myhost.my.domain.com:42133/ducc-servlet/json-format-aaData-jobs?_=1362577552438
...
[/code]
where each entry has a different trailing number.
How can I prevent the browser cache from filling up with these non-reusable entries? I've tried several Cache-Control directive, but they seem to be ineffective (and not seen in the cache!).
Thanks.
Lou.
[code]
oTable.fnReloadAjax("/ducc-servlet/json-format-aaData-jobs",ducc_load_scroll_jobs_callback);
[/code]
Using FF, about:cache show lots of entries line this:
[code]
http://myhost.my.domain.com:42133/ducc-servlet/json-format-aaData-jobs?_=1362577190455
http://myhost.my.domain.com:42133/ducc-servlet/json-format-aaData-jobs?_=1362577552438
...
[/code]
where each entry has a different trailing number.
How can I prevent the browser cache from filling up with these non-reusable entries? I've tried several Cache-Control directive, but they seem to be ineffective (and not seen in the cache!).
Thanks.
Lou.
This discussion has been closed.
Replies
[code]
$('#example').dataTable( {
"ajax": {
"url": "...",
"cache": true
}
} );
[/code]
Allan
Your help is greatly appreciated.
Lou.
Allan
Lou.
> How can I prevent the browser cache from filling up with these non-reusable entries? I've tried several Cache-Control directive, but they seem to be ineffective (and not seen in the cache!).
But you now say you want it specifically not to be cached?
Before we stated this discussion, I was seeing the data seemingly fetched every time, but leaving a "unique" cached copy in memory each time, chewing up valued virtual storage in the browser.
I'm afraid I really don't understand. The two are mutually exclusive. Either it can be cached, or not.
> Before we stated this discussion, I was seeing the data seemingly fetched every time, but leaving a "unique" cached copy in memory each time, chewing up valued virtual storage in the browser.
It should only be cached in the develop tools you are using. DataTables does not retain a copy of the data if you are using fnReloadAjax.
Allan
http://myhost.my.domain.com:42133/ducc-servlet/json-format-aaData-jobs?_=1362577552438
where each has a different number at the end. Who's doing that? These are refresh requests to my webserver for the dataTable contents.
Lou.
Allan
Thanks for your help. Would have taken me forever otherwise.
Lou.