bresleveloper
bresleveloper

Reputation: 6070

is there any way to store ajax request between pages

say i have page A, that uses ajax to call students names list

can i cache it in a way that say tomorrow the user opens page B that also using the same ajax to the same list? like the way the browser uses cache for files (JS CSS)?

Upvotes: 0

Views: 36

Answers (2)

Anthony Garcia-Labiad
Anthony Garcia-Labiad

Reputation: 3711

You could consider Local Storage

Upvotes: 1

Aurélien Thieriot
Aurélien Thieriot

Reputation: 5923

If the resource you call with Ajax set the relevant caching headers. The browser will automatically cache them like it does with images.

http://www.mobify.com/blog/beginners-guide-to-http-cache-headers/

Upvotes: 1

Related Questions