Wilton Ergon Posted February 11, 2022 Share Posted February 11, 2022 the use of url redirection generates problems with the use of cookies, if you use a lot to store information in cookies, you will have a problem if you use this feature. as cookies are stored depending on the server address, every time you connect, a new url is loaded from another server, so it is not possible to retrieve the last saved value. @farahad what do you suggest as an alternative to this situation? Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted February 13, 2022 Share Posted February 13, 2022 On 2/11/2022 at 12:49 PM, Wilton Ergon said: the use of url redirection generates problems with the use of cookies, if you use a lot to store information in cookies, you will have a problem if you use this feature. as cookies are stored depending on the server address, every time you connect, a new url is loaded from another server, so it is not possible to retrieve the last saved value. @farahad what do you suggest as an alternative to this situation? Hello You can use LocalStorage instead of cookie. "Web storage is per origin (per domain and protocol). All pages, from one origin, can store and access the same data." Quote Link to comment Share on other sites More sharing options...
Pep Posted February 13, 2022 Share Posted February 13, 2022 9 hours ago, Hayri ASLAN said: You can use LocalStorage instead of cookie. Hello Harry, It's possible to read in LocalStorage in TUniMainModule on event "UniGUIMainModuleBeforeLogin"? I use this event to read a session cookie to validate "remember me" option in login forrm. 9 hours ago, Hayri ASLAN said: In this sample, shows how to read data after form is ready, but that it's not the case in that situation. It would be nice to have demo of "LoginForm using LocalStorate" like the sample "LoginForm Cookies" that comes in demos folder of uniGUI. Thanks. Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted February 15, 2022 Administrators Share Posted February 15, 2022 Hello, What are the URL of your slave servers? Are they subdomains of the master? Quote Link to comment Share on other sites More sharing options...
Wilton Ergon Posted February 15, 2022 Author Share Posted February 15, 2022 @Farshad Mohajeriyou have been following my case.. server master url gepweb.mydomain.com url slave1 gepweb01.mydomain.com url slave2 gepweb02.mydomain.com I'm using the url redirect feature in hyperserver cookies are saved based on the site url, so when you save the cookie to slave1, it is not retrieved on slave2 in some places I could replace cookies with information recorded in the database, but on the login screen I need to retrieve information before connecting to the database. Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted February 15, 2022 Administrators Share Posted February 15, 2022 We need to include the DOMAIN information in the cookie when saving it. It will resolve the problem, so same cookie will be available to main domain and its subdomains. I will add a fix for this in next build. 1 1 Quote Link to comment Share on other sites More sharing options...
Wilton Ergon Posted February 16, 2022 Author Share Posted February 16, 2022 as already expected, our friend Farshad, always has solutions to our problems, thank you. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.