How can i store data client side without uaing server in html/js | Sololearn: Learn to code for FREE!
+ 2

How can i store data client side without uaing server in html/js

i would like the page to remember the user name and print it in a paragraph

23rd Feb 2018, 5:33 PM
Samuel Leblanc
Samuel Leblanc - avatar
5 Respuestas
+ 1
By only using HTML and js you wont be able to store something on a client's machine due the lack of permissions. To get a clients username you can store the data like you said on the server in a session or you can store at the client by using cookies. But with cookies you have to be careful since someone can steal or craft them which is a security issue
23rd Feb 2018, 5:39 PM
Chrizzhigh
Chrizzhigh - avatar
+ 2
i will learn php i guess XD...
23rd Feb 2018, 5:41 PM
Samuel Leblanc
Samuel Leblanc - avatar
0
You don't have to learn php for a server language for eg. ruby or python will do as well but I guess to get a feeling php is the easiest and fastest to start with ^^ Good luck haha
23rd Feb 2018, 8:19 PM
Chrizzhigh
Chrizzhigh - avatar
0
i just whant to code a favoris bar that remever your favorit web site as a chrome extwnsion server still seme like overkill XD
24th Feb 2018, 2:00 AM
Samuel Leblanc
Samuel Leblanc - avatar
0
Oh Chrome extensions have their own way of saving client stuff... As far as I know this is even possible with js only... Check out the chrome extension API and play around a little bit
24th Feb 2018, 7:56 AM
Chrizzhigh
Chrizzhigh - avatar