From 10df76454ae67ed4b9a208409ddddb6ab538e717 Mon Sep 17 00:00:00 2001 From: Usman Baig Date: Wed, 11 Feb 2026 15:31:51 +0100 Subject: [PATCH] refactor: improve comment clarity in session ID caching logic within script.js --- public/script.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/public/script.js b/public/script.js index 32949cc..7347a1f 100644 --- a/public/script.js +++ b/public/script.js @@ -172,8 +172,7 @@ } } catch (e3) {} } - // * Best-effort only: another tab could write before setItem; without locks perfect sync is not achievable - cachedSessionId = generateId(); + // * Best-effort only: another tab could write between here and setItem; without locks perfect sync is not achievable localStorage.setItem(key, JSON.stringify({ id: cachedSessionId, created: Date.now() })); } catch (e) { cachedSessionId = generateId();