Which one is Best for Redirecting User to Other Location, Local Storage or Cookies [closed]2019 Community Moderator ElectionWhen do items in HTML5 local storage expire?Local Storage vs CookiesWhat is the best way to securely authenticate a user ? (session, cookies, php, mysql)HTML5 Local storage vs. Session storageRedirect user to website based on stored cookie informationRemember selection - then redirect to correct home page on visitsChanging A Contact Form Based On A Cookie Or (Other Solution)?How to set cookies and redirect in php?Browser local storage missing after Patreon redirectConditional Drop-down Redirect with Cookies
Is it insecure to send a password in a `curl` command?
Writing in a Christian voice
Is honey really a supersaturated solution? Does heating to un-crystalize redissolve it or melt it?
What is the English word for a graduation award?
What is the term when voters “dishonestly” choose something that they do not want to choose?
Light propagating through a sound wave
I got the following comment from a reputed math journal. What does it mean?
Do native speakers use "ultima" and "proxima" frequently in spoken English?
Synchronized implementation of a bank account in Java
Recruiter wants very extensive technical details about all of my previous work
Is it true that good novels will automatically sell themselves on Amazon (and so on) and there is no need for one to waste time promoting?
Asserting that Atheism and Theism are both faith based positions
Generic TVP tradeoffs?
In Aliens, how many people were on LV-426 before the Marines arrived?
Variable completely messes up echoed string
Suggestions on how to spend Shaabath (constructively) alone
Fewest number of steps to reach 200 using special calculator
Help prove this basic trig identity please!
What favor did Moody owe Dumbledore?
Is there a creature that is resistant or immune to non-magical damage other than bludgeoning, slashing, and piercing?
What exactly term 'companion plants' means?
Am I eligible for the Eurail Youth pass? I am 27.5 years old
What does Deadpool mean by "left the house in that shirt"?
How is the partial sum of a geometric sequence calculated?
Which one is Best for Redirecting User to Other Location, Local Storage or Cookies [closed]
2019 Community Moderator ElectionWhen do items in HTML5 local storage expire?Local Storage vs CookiesWhat is the best way to securely authenticate a user ? (session, cookies, php, mysql)HTML5 Local storage vs. Session storageRedirect user to website based on stored cookie informationRemember selection - then redirect to correct home page on visitsChanging A Contact Form Based On A Cookie Or (Other Solution)?How to set cookies and redirect in php?Browser local storage missing after Patreon redirectConditional Drop-down Redirect with Cookies
I am planning to create a landing page for a website asking visitor for their province of living in Radio-input elements and then redirect the user to sub-folder/sub-domain with specific design for that area (province). I would like to store the user selection then in the nest visit redirect the request to the associated sub-folder/sub-domain without going to landing page. Now I am not sure which one is the best option for doing this
A- JavaScript Old well-know Cookies
B- Browser Local Storage
Can you please advise which one is the best for this purpose considering the fact that I will store the selected value by user selection on radios?
javascript html5 cookies local-storage
closed as primarily opinion-based by Luca Kiebel, AdrianHHH, Heretic Monkey, Paul Roub, Machavity Mar 6 at 22:26
Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.
|
show 3 more comments
I am planning to create a landing page for a website asking visitor for their province of living in Radio-input elements and then redirect the user to sub-folder/sub-domain with specific design for that area (province). I would like to store the user selection then in the nest visit redirect the request to the associated sub-folder/sub-domain without going to landing page. Now I am not sure which one is the best option for doing this
A- JavaScript Old well-know Cookies
B- Browser Local Storage
Can you please advise which one is the best for this purpose considering the fact that I will store the selected value by user selection on radios?
javascript html5 cookies local-storage
closed as primarily opinion-based by Luca Kiebel, AdrianHHH, Heretic Monkey, Paul Roub, Machavity Mar 6 at 22:26
Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.
localStorage would be better because cookies bloat your server responses.
– dandavis
Mar 6 at 21:43
Thanks dandavis
– Mona Coder
Mar 6 at 21:44
1
We can't tell you want is best; there are too many factors to consider and it will end up being a popularity contest. For instance, in some regions there are laws regarding the use of cookies; others include local storage in those regulations.
– Heretic Monkey
Mar 6 at 21:44
Cookies are far easier, but things are a changing and making it so only basic access tokens should be stored in cookies in the future. but we're not quite there yet.
– Steven Stark
Mar 6 at 21:46
@HereticMonkey, thanks for reply but out of these kind of limits and talking technically only which one is the better way?
– Mona Coder
Mar 6 at 21:46
|
show 3 more comments
I am planning to create a landing page for a website asking visitor for their province of living in Radio-input elements and then redirect the user to sub-folder/sub-domain with specific design for that area (province). I would like to store the user selection then in the nest visit redirect the request to the associated sub-folder/sub-domain without going to landing page. Now I am not sure which one is the best option for doing this
A- JavaScript Old well-know Cookies
B- Browser Local Storage
Can you please advise which one is the best for this purpose considering the fact that I will store the selected value by user selection on radios?
javascript html5 cookies local-storage
I am planning to create a landing page for a website asking visitor for their province of living in Radio-input elements and then redirect the user to sub-folder/sub-domain with specific design for that area (province). I would like to store the user selection then in the nest visit redirect the request to the associated sub-folder/sub-domain without going to landing page. Now I am not sure which one is the best option for doing this
A- JavaScript Old well-know Cookies
B- Browser Local Storage
Can you please advise which one is the best for this purpose considering the fact that I will store the selected value by user selection on radios?
javascript html5 cookies local-storage
javascript html5 cookies local-storage
asked Mar 6 at 21:39
Mona CoderMona Coder
2,496144288
2,496144288
closed as primarily opinion-based by Luca Kiebel, AdrianHHH, Heretic Monkey, Paul Roub, Machavity Mar 6 at 22:26
Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.
closed as primarily opinion-based by Luca Kiebel, AdrianHHH, Heretic Monkey, Paul Roub, Machavity Mar 6 at 22:26
Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.
localStorage would be better because cookies bloat your server responses.
– dandavis
Mar 6 at 21:43
Thanks dandavis
– Mona Coder
Mar 6 at 21:44
1
We can't tell you want is best; there are too many factors to consider and it will end up being a popularity contest. For instance, in some regions there are laws regarding the use of cookies; others include local storage in those regulations.
– Heretic Monkey
Mar 6 at 21:44
Cookies are far easier, but things are a changing and making it so only basic access tokens should be stored in cookies in the future. but we're not quite there yet.
– Steven Stark
Mar 6 at 21:46
@HereticMonkey, thanks for reply but out of these kind of limits and talking technically only which one is the better way?
– Mona Coder
Mar 6 at 21:46
|
show 3 more comments
localStorage would be better because cookies bloat your server responses.
– dandavis
Mar 6 at 21:43
Thanks dandavis
– Mona Coder
Mar 6 at 21:44
1
We can't tell you want is best; there are too many factors to consider and it will end up being a popularity contest. For instance, in some regions there are laws regarding the use of cookies; others include local storage in those regulations.
– Heretic Monkey
Mar 6 at 21:44
Cookies are far easier, but things are a changing and making it so only basic access tokens should be stored in cookies in the future. but we're not quite there yet.
– Steven Stark
Mar 6 at 21:46
@HereticMonkey, thanks for reply but out of these kind of limits and talking technically only which one is the better way?
– Mona Coder
Mar 6 at 21:46
localStorage would be better because cookies bloat your server responses.
– dandavis
Mar 6 at 21:43
localStorage would be better because cookies bloat your server responses.
– dandavis
Mar 6 at 21:43
Thanks dandavis
– Mona Coder
Mar 6 at 21:44
Thanks dandavis
– Mona Coder
Mar 6 at 21:44
1
1
We can't tell you want is best; there are too many factors to consider and it will end up being a popularity contest. For instance, in some regions there are laws regarding the use of cookies; others include local storage in those regulations.
– Heretic Monkey
Mar 6 at 21:44
We can't tell you want is best; there are too many factors to consider and it will end up being a popularity contest. For instance, in some regions there are laws regarding the use of cookies; others include local storage in those regulations.
– Heretic Monkey
Mar 6 at 21:44
Cookies are far easier, but things are a changing and making it so only basic access tokens should be stored in cookies in the future. but we're not quite there yet.
– Steven Stark
Mar 6 at 21:46
Cookies are far easier, but things are a changing and making it so only basic access tokens should be stored in cookies in the future. but we're not quite there yet.
– Steven Stark
Mar 6 at 21:46
@HereticMonkey, thanks for reply but out of these kind of limits and talking technically only which one is the better way?
– Mona Coder
Mar 6 at 21:46
@HereticMonkey, thanks for reply but out of these kind of limits and talking technically only which one is the better way?
– Mona Coder
Mar 6 at 21:46
|
show 3 more comments
1 Answer
1
active
oldest
votes
Use a cookie only if you need the information to be sent to the server, when that information won't get sent to the server otherwise - otherwise, there's no need for the extra baggage in network requests.
If you want users to be redirected from the server, then save the information in a cookie, and look up the cookie value when the landing page is requested, then serve the appropriate subdomain page. (If you use cookies, you may have to provide a disclaimer.)
If you want users to be redirected with client-side Javascript (such as by assigning to window.location.href
when the visitor visits the landing page), and the server has no need to see their locale information on every connection, then use Local Storage.
Server-side redirection is probably more elegant, but both methods are OK options. It depends on the sort of behavior you want visitors to see, and your back-end setup.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Use a cookie only if you need the information to be sent to the server, when that information won't get sent to the server otherwise - otherwise, there's no need for the extra baggage in network requests.
If you want users to be redirected from the server, then save the information in a cookie, and look up the cookie value when the landing page is requested, then serve the appropriate subdomain page. (If you use cookies, you may have to provide a disclaimer.)
If you want users to be redirected with client-side Javascript (such as by assigning to window.location.href
when the visitor visits the landing page), and the server has no need to see their locale information on every connection, then use Local Storage.
Server-side redirection is probably more elegant, but both methods are OK options. It depends on the sort of behavior you want visitors to see, and your back-end setup.
add a comment |
Use a cookie only if you need the information to be sent to the server, when that information won't get sent to the server otherwise - otherwise, there's no need for the extra baggage in network requests.
If you want users to be redirected from the server, then save the information in a cookie, and look up the cookie value when the landing page is requested, then serve the appropriate subdomain page. (If you use cookies, you may have to provide a disclaimer.)
If you want users to be redirected with client-side Javascript (such as by assigning to window.location.href
when the visitor visits the landing page), and the server has no need to see their locale information on every connection, then use Local Storage.
Server-side redirection is probably more elegant, but both methods are OK options. It depends on the sort of behavior you want visitors to see, and your back-end setup.
add a comment |
Use a cookie only if you need the information to be sent to the server, when that information won't get sent to the server otherwise - otherwise, there's no need for the extra baggage in network requests.
If you want users to be redirected from the server, then save the information in a cookie, and look up the cookie value when the landing page is requested, then serve the appropriate subdomain page. (If you use cookies, you may have to provide a disclaimer.)
If you want users to be redirected with client-side Javascript (such as by assigning to window.location.href
when the visitor visits the landing page), and the server has no need to see their locale information on every connection, then use Local Storage.
Server-side redirection is probably more elegant, but both methods are OK options. It depends on the sort of behavior you want visitors to see, and your back-end setup.
Use a cookie only if you need the information to be sent to the server, when that information won't get sent to the server otherwise - otherwise, there's no need for the extra baggage in network requests.
If you want users to be redirected from the server, then save the information in a cookie, and look up the cookie value when the landing page is requested, then serve the appropriate subdomain page. (If you use cookies, you may have to provide a disclaimer.)
If you want users to be redirected with client-side Javascript (such as by assigning to window.location.href
when the visitor visits the landing page), and the server has no need to see their locale information on every connection, then use Local Storage.
Server-side redirection is probably more elegant, but both methods are OK options. It depends on the sort of behavior you want visitors to see, and your back-end setup.
answered Mar 6 at 22:13
SnowSnow
90319
90319
add a comment |
add a comment |
localStorage would be better because cookies bloat your server responses.
– dandavis
Mar 6 at 21:43
Thanks dandavis
– Mona Coder
Mar 6 at 21:44
1
We can't tell you want is best; there are too many factors to consider and it will end up being a popularity contest. For instance, in some regions there are laws regarding the use of cookies; others include local storage in those regulations.
– Heretic Monkey
Mar 6 at 21:44
Cookies are far easier, but things are a changing and making it so only basic access tokens should be stored in cookies in the future. but we're not quite there yet.
– Steven Stark
Mar 6 at 21:46
@HereticMonkey, thanks for reply but out of these kind of limits and talking technically only which one is the better way?
– Mona Coder
Mar 6 at 21:46