Jump to content

cookies with url redirection


Wilton Ergon

Recommended Posts

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?

Link to comment
Share on other sites

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."

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

@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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...