cache_expire: remove localStorage items from start
This commit is contained in:
parent
126cd3c885
commit
3fb63f75a2
|
@ -1870,7 +1870,7 @@ function cache_expire() {
|
||||||
} else {
|
} else {
|
||||||
if (has_local_storage()) {
|
if (has_local_storage()) {
|
||||||
while (localStorage.length > 25) {
|
while (localStorage.length > 25) {
|
||||||
localStorage.removeItem(localStorage.key(localStorage.length-1));
|
localStorage.removeItem(localStorage.key(0));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
while (article_cache.length > 25) {
|
while (article_cache.length > 25) {
|
||||||
|
|
Loading…
Reference in New Issue