Telegram Web K with changes to work inside I2P https://web.telegram.i2p/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
562 B

3 years ago
console.time('open');
caches.open('sessions').then(cache => {
console.timeEnd('open');
cache.put('/state', new Response(JSON.stringify(appStateManager.state), {headers: {'Content-Type': 'application/json'}}));
});
console.time('match');
caches.open('sessions').then(async(cache) => {
const response = await cache.match('/state');
const promise = response.json();
promise.then((json) => {
console.timeEnd('match');
});
});
console.time('getItem');
var value = JSON.parse(localStorage.getItem('state'));
console.timeEnd('getItem');