im using the tease storage for a tease for a while now, always worked fine but suddenly it keeps messing with me. it totally crushed me today to the point of total frustration. are there known problems or things i have to keep an eye out when working with the storage or is it me just coding bad. its such simple things like changing a variable from 1 to 0.
for example i have this variable ch1 at the beginning of the tease i load it up with
var ch1 = teaseStorage.getItem("ch1");
on another page say ch1 spouts out 1
teaseStorage.setItem("ch1", 0);
ch1 = teaseStorage.getItem("ch1");
say ch1 spouts out 0
so far so good, when i close the tease and open it again guess whats the value of ch1... its 1
tease storage wonky?
- edger477
- Explorer At Heart
- Posts: 691
- Joined: Mon Nov 29, 2021 8:24 pm
- Gender: Male
- Sexual Orientation: Straight
- I am a: None of the above
- Location: Europe
Re: tease storage wonky?
There are 2 "storages" that are used by teases.
One is when you are not logged in here to forum, then it is using local storage of the browser.
There is one trick to see the tease storage, and if it updated correctly.
In chrome-family browser (so Chrome, Chromium, Edge, Brave etc, it is similar in others but I am using this to say where to click), press F12 to open developer tools. Then to to Application tab.
Under Storage section -> Local Storage -> milovana.com you will see key for each of teases that have saved something, and they have name teaseStorage_idOftease (where id of tease is number that is shown in url https://milovana.com/webteases/showteas ... NumberHere)
You can also delete the values stored from developer tools.
Second storage, which is persisted on Milovana server, is accessed if you are logged in when you open the tease. To see its contents, you can go to Network tab of developer tools, and to find it quickly type in top left search field 'graphql'. You will see a request, click on it and then on right side click on "Preview" or "Response" and you can inspect the data that tease loaded from server.
Hope it helps.
One is when you are not logged in here to forum, then it is using local storage of the browser.
There is one trick to see the tease storage, and if it updated correctly.
In chrome-family browser (so Chrome, Chromium, Edge, Brave etc, it is similar in others but I am using this to say where to click), press F12 to open developer tools. Then to to Application tab.
Under Storage section -> Local Storage -> milovana.com you will see key for each of teases that have saved something, and they have name teaseStorage_idOftease (where id of tease is number that is shown in url https://milovana.com/webteases/showteas ... NumberHere)
You can also delete the values stored from developer tools.
Second storage, which is persisted on Milovana server, is accessed if you are logged in when you open the tease. To see its contents, you can go to Network tab of developer tools, and to find it quickly type in top left search field 'graphql'. You will see a request, click on it and then on right side click on "Preview" or "Response" and you can inspect the data that tease loaded from server.
Hope it helps.
my estim creations: https://mega.nz/folder/73pxmBBQ#X6ylDzRafzTt9wanZ0dacw
-
- Explorer
- Posts: 96
- Joined: Sat Aug 24, 2019 11:42 am
- Gender: Male
- Location: Germany
Re: tease storage wonky?
Interesting! Thanks for this.
@OP: Are you perhaps hitting the character limit? I have encountered the behaviour you describe (it seemingly working, but not persisting a reload) on that condition.
Perhaps you can get it working again with:
teaseStorage.clear()
I wrote this 3 years ago and I don't know if it is still accurate, but perhaps it can help you: viewtopic.php?p=274624#p274624
Re: tease storage wonky?
Very helpful, this way i can see what is going on exactly (worked fine on firefox) and know that i have to fix some junk not only for me but also for other people that already used the tease and have a strange storage in their account now.edger477 wrote: ↑Mon Apr 17, 2023 9:07 pm There are 2 "storages" that are used by teases.
One is when you are not logged in here to forum, then it is using local storage of the browser.
There is one trick to see the tease storage, and if it updated correctly.
In chrome-family browser (so Chrome, Chromium, Edge, Brave etc, it is similar in others but I am using this to say where to click), press F12 to open developer tools. Then to to Application tab.
Under Storage section -> Local Storage -> milovana.com you will see key for each of teases that have saved something, and they have name teaseStorage_idOftease (where id of tease is number that is shown in url https://milovana.com/webteases/showteas ... NumberHere)
You can also delete the values stored from developer tools.
Second storage, which is persisted on Milovana server, is accessed if you are logged in when you open the tease. To see its contents, you can go to Network tab of developer tools, and to find it quickly type in top left search field 'graphql'. You will see a request, click on it and then on right side click on "Preview" or "Response" and you can inspect the data that tease loaded from server.
Hope it helps.
Ahh yes i totally forgot about that, when looking at it im already at 1002 characters which exactly reveals the problem, with even a single array being able to bloat up to 600 characters. Time to compress a bit now Thanks everyone.undeniable_denial wrote: ↑Mon Apr 17, 2023 9:23 pm @OP: Are you perhaps hitting the character limit? I have encountered the behaviour you describe (it seemingly working, but not persisting a reload) on that condition.
Perhaps you can get it working again with:
teaseStorage.clear()
I wrote this 3 years ago and I don't know if it is still accurate, but perhaps it can help you: viewtopic.php?p=274624#p274624
-
- Explorer At Heart
- Posts: 148
- Joined: Wed Jan 30, 2019 4:56 am
- Gender: Male
- Sexual Orientation: Open to new ideas!
Re: tease storage wonky?
I'm clearly missing something (likely between my ears) but when I try this (both the Application tab as well as the Network tab) in either Edge or Firefox, logged in to MIlovana or not, I can't see any data (except cookies). All I get under local, session, cached, or indexed DB storage is 2 entries ( https://eosscript.com and https://milovana.com) and each say "No data present for selected host". No reference to the tease open and no other data. I tried with multiple teases that clearly are loading saved data from previous sessions as well as manipulating data during play.
- edger477
- Explorer At Heart
- Posts: 691
- Joined: Mon Nov 29, 2021 8:24 pm
- Gender: Male
- Sexual Orientation: Straight
- I am a: None of the above
- Location: Europe
Re: tease storage wonky?
I guess I was not clear...Carnal1 wrote: ↑Tue Apr 18, 2023 7:39 pmI'm clearly missing something (likely between my ears) but when I try this (both the Application tab as well as the Network tab) in either Edge or Firefox, logged in to MIlovana or not, I can't see any data (except cookies). All I get under local, session, cached, or indexed DB storage is 2 entries ( https://eosscript.com and https://milovana.com) and each say "No data present for selected host". No reference to the tease open and no other data. I tried with multiple teases that clearly are loading saved data from previous sessions as well as manipulating data during play.
and, if that IS the case, then local storage is not used.
So you need to make sure you opened the network tab before it loads (or refresh the tease after you opened it) because graphql is one of first requests after loading the tease.
my estim creations: https://mega.nz/folder/73pxmBBQ#X6ylDzRafzTt9wanZ0dacw
-
- Explorer At Heart
- Posts: 148
- Joined: Wed Jan 30, 2019 4:56 am
- Gender: Male
- Sexual Orientation: Open to new ideas!
Re: tease storage wonky?
Ahhh ... works fine now. Thanks.
Who is online
Users browsing this forum: No registered users and 80 guests