Can we extend inactivity session timeout with JS, as a user? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can we extend inactivity session timeout with JS, as a user?

Most or some websites have inactivity session timeouts — where you’ll be logged out of the website if you haven’t been active for certain amount of time. let IST = inactivity session timeout Can we extend the IST through JS: inject a JS code to the website, or do something in the console, or ....? Is it possible to do that as a user?

15th May 2020, 6:01 AM
Ready To Learn
Ready To Learn - avatar
3 Answers
+ 5
malicious thought anyway, try this : https://flaviocopes.com/cookies/
15th May 2020, 6:11 AM
Gordon
Gordon - avatar
+ 1
const date = new Date() date.setHours(date.getHours() + 5) document.cookie = 'name=Flavio; expires=' + date.toUTCString() Looks like it might be this one from what I read, on that article Gordon shared with me.
15th May 2020, 6:16 AM
Ready To Learn
Ready To Learn - avatar
+ 1
You can't alter the object of session, since the session cookie is encrypted and can only be processed by original server
15th May 2020, 6:37 AM
Calviղ
Calviղ - avatar