Caching ajax json file

Caching ajax json file

yericusyericus Posts: 20Questions: 4Answers: 1
edited November 2020 in Free community support

Hi,

So I am not sure this question is relevant or not as using json data is very new to me.

I switched my 2 datatables to ajax:url json files.

These json are regenerated from mysql with php every time an insert or update is done on the 2 bases (there is not a lot of information storing, mostly reading, on a small scale site)

Main problem of my previous version of this app/website was that it was very slow and I am trying to think ahead for this one.

Though my latest version is wayyy faster, I am wondering if the users browsers can cache the 2 json files I use.

My plan was to write the json files through php with a timestamp in their name everytime they are generated, store this name as a php variable and use this variable when loading my pages with the datatables fpr the ajax url.

Is this something that would work ? Can we activate cache in datatables ?
I only found old information about cache settings with datatables and maybe I am just overthinking this.

Replies

  • colincolin Posts: 15,144Questions: 1Answers: 2,586

    It sounds like you're jumping a lot of hoops there - it would be worth looking at Editor as that's designed to make editing tables simple.

    Colin

This discussion has been closed.