This repo demonstrates the server load functions being triggered when a fetch call is done
npm install
npm run dev
Navigate to http://localhost:
Navigate to http://localhost:
The following should be displayed in the console:
LAYOUT SERVER LOAD --> +layout.server.ts -- This is for debugging
MAIN SERVER PAGE LOAD --> +page.server.ts: -- COOKIE VALUE: This is for debugging
MAIN SERVER PAGE LOAD --> +page.server.ts: -- COOKIE VALUE: This is for debugging
Click the "Test Now" Button
The following should be added to the console output demonstrating the double load issue and the no cookies being present:
LAYOUT SERVER LOAD --> +layout.server.ts -- undefined
MAIN SERVER PAGE LOAD --> +page.server.ts: -- COOKIE VALUE: undefined
LAYOUT SERVER LOAD --> +layout.server.ts -- undefined
MAIN SERVER PAGE LOAD --> +page.server.ts: -- COOKIE VALUE: undefined