Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
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