所以我實際上並不意味着瀏覽器使用GET方法緩存Ajax請求,而是在瀏覽器的內存中存儲大量查詢(任何數量,可能是兩位數的40 - 300kb查詢)。阿賈克斯「緩存」,好,壞,冷漠?
什麼是看不到的好處,與此相關的風險?
var response = JSON.parse(xhr.responseText);
Cache.push(response); // Store parsed JSON object in global variable `Cache`
// Time passes, stuff is done ...
if(Cache[query])
load(Cache[query])
else
Ajax(query, cache_results);