The exact same code works as expected on dev server and clears the sessionstorage nicely but not on the prod server. Could there be any setting that I need to do in IIS or somewhere to clear the sessionstorage. Without the sessionstorage getting cleared
my app gives problems. It is really annoying as to why the exact same code works fine on dev server but not on the prod. Any pointers will be helpful.
Have you tried F12 to check for JavaScript errors? Do you mean that storing values does work but that clearing doesn't work or could it be that sessionStorage doesn't work at all?
sessionStoreage
is client side API and has really nothing to do with IIS. By chance is the sessionStorage logic in a separate file? Is the file referenced correctly?
Thanks for your time! The issue is I am trying to clear sessioStorage when user goes to homepage. It all works fine on the dev server as well as my local machine, but when I do a filesystem deploy to prod server, it looks like sessionStorage is not getting
cleared. I deploy to dev server by doing webdeploy where as prod server is using filesystem deploy. Based on this I feel there is nothing wrong with the code since it works fine in one environment but not the other. Please advise!
Please do use F12 (which triggers developer tools on most if not all browsers) as suggested earlier. You'll see if you have a JavaScript error and you could inspect sessionStorage to see if you found what you expect in this storage etc... Don't assume code
works because it worked on another machine (it's quite frequent to see errors caused by a different browser behavior, different data, some unseen configuration difference, a design flaw etc...). So once again for now :
- use F12 to check for JavaScript error. My thought here is that if using IE, a browser legacy mode could be triggered (maybe just for that home page if it doesn't have the proper settings). So storageSession would be just not available at all on this page.
- another option could be that this page doesn't use the exact same protocol, domain, port in which case it could have its own storage and so you would clear another storage
- it can be still some kind of configuration error causing the script to be not served or called at all etc... etc...
As soon as we'll know HOW it fails exactly, fixing the issue should be really easy.
Member
1 Points
9 Posts
html5 sessionstorage not getting cleared on prod server, but works fine on dev server
Jul 12, 2016 11:06 PM|tp2006|LINK
Hi There,
The exact same code works as expected on dev server and clears the sessionstorage nicely but not on the prod server. Could there be any setting that I need to do in IIS or somewhere to clear the sessionstorage. Without the sessionstorage getting cleared my app gives problems. It is really annoying as to why the exact same code works fine on dev server but not on the prod. Any pointers will be helpful.
Thanks,
Te
All-Star
48260 Points
17980 Posts
Re: html5 sessionstorage not getting cleared on prod server, but works fine on dev server
Jul 12, 2016 11:51 PM|PatriceSc|LINK
Hi,
Have you tried F12 to check for JavaScript errors? Do you mean that storing values does work but that clearing doesn't work or could it be that sessionStorage doesn't work at all?
If IE use F12 to check the emulation mode.
All-Star
52091 Points
23212 Posts
Re: html5 sessionstorage not getting cleared on prod server, but works fine on dev server
Jul 13, 2016 01:06 AM|mgebhard|LINK
sessionStoreage is client side API and has really nothing to do with IIS. By chance is the sessionStorage logic in a separate file? Is the file referenced correctly?
Member
1 Points
9 Posts
Re: html5 sessionstorage not getting cleared on prod server, but works fine on dev server
Jul 13, 2016 04:28 PM|tp2006|LINK
Thanks for your time! The issue is I am trying to clear sessioStorage when user goes to homepage. It all works fine on the dev server as well as my local machine, but when I do a filesystem deploy to prod server, it looks like sessionStorage is not getting cleared. I deploy to dev server by doing webdeploy where as prod server is using filesystem deploy. Based on this I feel there is nothing wrong with the code since it works fine in one environment but not the other. Please advise!
All-Star
48260 Points
17980 Posts
Re: html5 sessionstorage not getting cleared on prod server, but works fine on dev server
Jul 13, 2016 04:57 PM|PatriceSc|LINK
Please do use F12 (which triggers developer tools on most if not all browsers) as suggested earlier. You'll see if you have a JavaScript error and you could inspect sessionStorage to see if you found what you expect in this storage etc... Don't assume code works because it worked on another machine (it's quite frequent to see errors caused by a different browser behavior, different data, some unseen configuration difference, a design flaw etc...). So once again for now :
- use F12 to check for JavaScript error. My thought here is that if using IE, a browser legacy mode could be triggered (maybe just for that home page if it doesn't have the proper settings). So storageSession would be just not available at all on this page.
- another option could be that this page doesn't use the exact same protocol, domain, port in which case it could have its own storage and so you would clear another storage
- it can be still some kind of configuration error causing the script to be not served or called at all etc... etc...
As soon as we'll know HOW it fails exactly, fixing the issue should be really easy.