0

Hello,

Please can you hint me about an easy and clear way to cache ajax response into client browser WITHOUT using the JQuery? I am unable to find that on google.

I have a page that is loaded using AJAX and it takes long time to load every time (approximately 28 seconds), so I need to cache it to reduce the time. I tried the stored procedure for database, but it did not give me good result, so I want to try the caching.

Please advise and many thanks.

3
Contributors
6
Replies
7
Views
6 Years
Discussion Span
Last Post by Moderns
1

Pritaeas's solution is probably the simplest.

Another option is to use the browser's offline local storage. To see what I mean, check out http://www.jstorage.info/

However, to make it "easy to use" as you say, you would have to use a framework (use the website's jStorage library), otherwise you'd have to write it from scratch and worry about browser compatibility.

0

Save your output to file and return that as response. You can refresh it at a set interval.

Thanks for your response. Please give me an example I really did not get the way to follow.

0

Pritaeas's solution is probably the simplest.

Another option is to use the browser's offline local storage. To see what I mean, check out http://www.jstorage.info/

However, to make it "easy to use" as you say, you would have to use a framework (use the website's jStorage library), otherwise you'd have to write it from scratch and worry about browser compatibility.

Thanks for your reply, I will read about it.

0

I assume you run some queries and build a json array to output. You can save that array to a file, and read/output it next time your script is called, instead of running your queries.

0

I assume you run some queries and build a json array to output. You can save that array to a file, and read/output it next time your script is called, instead of running your queries.

Thanks for your reply. I will search about json array solution.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.