// ToffeeLab controlled browser experiment, 2026-10-21. Node.js 22+. // Save as cache-cookie-lab.mjs in an empty folder, then run: node cache-cookie-lab.mjs // Open http://127.0.0.1:4341/editorial-lab/ and click buttons 1 through 4 once. // The local-only server uses synthetic data; stop with Ctrl+C. No real accounts. // For a fresh run restart the server. Request counts start at zero on restart. // This reproduction copy adds creation of the log directory. Core test logic is unchanged. import {createServer} from 'node:http'; import {appendFileSync,mkdirSync} from 'node:fs'; mkdirSync('.recovery',{recursive:true}); let imageRequests=0; const prefix='/editorial-lab/'; const html=`ToffeeLab 편집 검증 — 캐시와 쿠키

TOFFEELAB / EDITORIAL CHECK

이미지를 다시 받는 일과
로그인 쿠키를 지우는 일

실제 계정을 사용하지 않는 검증용 페이지입니다. 아래 로그인 표시는 테스트 쿠키의 상태입니다.

확인할 항목

준비 전테스트 메모 없음이미지 서버 요청 0회
검증용 이미지의 생성 번호

실제 동작 기록

실행한 작업서버 이미지 요청테스트 로그인테스트 메모

이미지 요청은 로컬 검증 서버가 센 값입니다. 캐시 건너뛰기는 전체 캐시 삭제나 Chrome 설정 화면에서의 데이터 삭제와 다른 작업입니다.

페이지 배너와 알림 권한 구분

브라우저가 보고한 이 페이지의 알림 권한:

이 페이지는 알림 권한을 요청하거나 운영체제 알림을 보내지 않습니다. 배너를 닫기 전후의 권한 값을 읽어 비교합니다.

ToffeeLab 자체 검증 · 2026-10-21 · 검증용 페이지의 화면이며 Chrome 설정 화면을 재현한 것이 아닙니다.

`; const server=createServer((req,res)=>{const path=new URL(req.url,'http://127.0.0.1').pathname;res.setHeader('X-Robots-Tag','noindex, nofollow');res.setHeader('Cache-Control','no-store'); if(path===prefix||path===prefix+'index.html'){res.setHeader('Content-Type','text/html; charset=utf-8');res.end(html);return;} if(path===prefix+'sample.svg'){imageRequests++;appendFileSync('.recovery/editorial-browser-lab.log',JSON.stringify({at:new Date().toISOString(),event:'image',count:imageRequests})+'\n');res.setHeader('Cache-Control','private, max-age=3600');res.setHeader('Content-Type','image/svg+xml');res.end('ToffeeLab sample imageServer response #'+imageRequests+'');return;} if(path===prefix+'status'){res.setHeader('Content-Type','application/json');res.end(JSON.stringify({imageRequests,loggedIn:(req.headers.cookie??'').includes('tl_editorial_session_20261021=synthetic-session')}));return;} res.writeHead(404);res.end('Not found'); });server.listen(4341,'127.0.0.1',()=>console.log('Editorial lab ready: http://127.0.0.1:4341/editorial-lab/'));