Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

ClientSidePersistence.js MODE_LOCAL to MODE_SESSION

oleksandrr13925
Level 2
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
Asutosh_Jena_
Correct answer by
Community Advisor
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
Asutosh_Jena_
Community Advisor
Community Advisor

Hi @oleksandrr13925 

 

Can you give more information about this file, 

ClientSidePersistence.js

 

From where this file is getting loaded?

oleksandrr13925
Level 2
Level 2

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

Asutosh_Jena_
Correct answer by
Community Advisor
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

SantoshSai
Level 5
Level 5

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