Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

ClientSidePersistence.js MODE_LOCAL to MODE_SESSION

Avatar

Level 2

CQ.shared.ClientSidePersistence - /libs/clientlibs/granite/legacy/shared/source/ClientSidePersistence.js
How do I override the value from my js code base?
I need to change it from default value of MODE_LOCAL to MODE_SESSION.
Thanks in advance.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @oleksandrr13925 

 

You can create one overlay under apps and then make the changes as needed.

/apps/clientlibs/granite/legacy/shared/source/ClientSidePersistence.js

 

Thanks!

View solution in original post

5 Replies

Avatar

Community Advisor

Hi @oleksandrr13925 

 

Can you give more information about this file, 

ClientSidePersistence.js

 

From where this file is getting loaded?

Avatar

Level 2

Hi @Asutosh_Jena_ 
here is the path to it /libs/clientlibs/granite/legacy/shared/source/ClientSidePersistence.js

Avatar

Correct answer by
Community Advisor

Hi @oleksandrr13925 

 

You can create one overlay under apps and then make the changes as needed.

/apps/clientlibs/granite/legacy/shared/source/ClientSidePersistence.js

 

Thanks!

Avatar

Community Advisor

Hi @oleksandrr13925 

 

1. Override ClientSidePersistence.js - Copy file from 

/libs/clientlibs/granite/legacy/shared/source/ClientSidePersistence.js

 

2. Create same structure in /apps folder & paste it

/apps/clientlibs/granite/legacy/shared/source/ClientSidePersistence.js


3. Change value from MODE_LOCAL to MODE_SESSION

Regards,

Santosh