Session management in SuiteCommerce Advanced (SCA) relies on cookies to track and manage user interactions. There are three primary cookies used for this purpose: JSessionID NLvisitor NLshopperID These cookies are marked as HttpOnly, meaning they cannot be accessed or modified through frontend JavaScript. This enhances security, as HttpOnly cookies can only be managed by the… Continue reading Session Management in SuiteCommerce Advanced (SCA)
Tag: session
Write User and Session Information to the Response
A Suitelet to write user and session information for the currently executing script to the response: Solution: /** * @NApiVersion 2.x * @NScriptType Suitelet */ // This script writes user and session information for the currently executing script to the response. define([‘N/runtime’], function(runtime) { function onRequest(context) { var remainingUsage = runtime.getCurrentScript().getRemainingUsage(); var userRole = runtime.getCurrentUser().role;… Continue reading Write User and Session Information to the Response