user765368
user765368

Reputation: 20346

how to cache jquery ajax load requests

I have a simple question here, I have a jQuery UI Dialog with 2 radio buttons, every time I click a radio button, a jQuery.load Ajax request is made and the content below my radio buttons is replaced by my Ajax response. The content does not change, it is always the same, how do I cache the content so that it gets displayed faster on subsequent clicks of my radio buttons?

I tried using jQuery.ajax and set the cache option to true, but for some reason that did not work (everytime I click my radio buttons, the Ajax calls still occur). Any idea how I can do this?

Thank you

Upvotes: 1

Views: 308

Answers (1)

rafaelkin
rafaelkin

Reputation: 425

Try to set the cache option to true

Upvotes: 2

Related Questions