LocalStorage for beginners (HTML and Javascript)

Поділитися
Вставка
  • Опубліковано 25 сер 2024
  • In this video I will teach you the basics of localStorage using HTML and Javascript. I will show you how to save data to your localStorage and how you can get that data.
    Follow me on twitter: / ieatwebsites
    Computer Graphic by: www.freepik.co...

КОМЕНТАРІ • 115

  • @emowtion1
    @emowtion1 4 роки тому +13

    wow!!! what an explanation better than my actual "teacher" thank youuuu so much keep it up :D

    • @ieatwebsites
      @ieatwebsites  4 роки тому

      I’m glad you liked it! Thank you so much. 😊

  • @gnzlplcs
    @gnzlplcs 3 роки тому +2

    Hey, dude. Thanks a lot. I was reading this topic in a textbook, but I didn't understand well, but your tuto made me getting it.

    • @ieatwebsites
      @ieatwebsites  3 роки тому

      I’m glad! You are very welcome. 😁

  • @asheradanehi
    @asheradanehi 3 роки тому +4

    I love this video. Your account needs more audience.

  • @pesahson
    @pesahson 4 роки тому +6

    on line 6, it should be if(storedInput) not if(storageInput), shouldn't it? It still works, but we should be checking whether we have something stored in localStorage, not whether we have anything with a class of storage?

  • @abhilashbm836
    @abhilashbm836 4 роки тому +7

    This video is a hidden gem , Thank you so much 👏

  • @Hangoutapp
    @Hangoutapp 3 роки тому +1

    Hi thanks for your video. With your video you will surely Sava lives

  • @offline7375
    @offline7375 3 роки тому +1

    Honestly you're literally hero

  • @bartekkupski395
    @bartekkupski395 2 роки тому +1

    Thank you for your video that's helped me to understand this 💝

  • @carshoesch
    @carshoesch 3 роки тому +2

    Really good video! Easy to understand and follow along.

    • @ieatwebsites
      @ieatwebsites  3 роки тому +1

      You welcome!!

    • @carshoesch
      @carshoesch 3 роки тому

      @@ieatwebsites I build a project based on my knowledge of local storage. I plan on hosting a schedular on git, but with local storage all my changes won't be visible for my friends to view.
      Is there a way to achieve my goal?
      Regards

  • @kriziacarissepangan1590
    @kriziacarissepangan1590 2 роки тому

    Sirrrrrrr! You are amazing! Moreee! God bless!

  • @stolyarovmaxim
    @stolyarovmaxim 4 роки тому +2

    Man, u create good videos, but few. Hope u will continue your creation and decrease distance between every next video. I can understand that this is just your hobby, but you have the most sensible and interesting videos

    • @ieatwebsites
      @ieatwebsites  4 роки тому +2

      Thank you so much for saying that. I will try to make a lot more videos this year. Promise!!

  • @helderemanuel344
    @helderemanuel344 2 роки тому +1

    nice one dude

  • @haileeko1952
    @haileeko1952 Рік тому +1

    great tutorial!!!! thanks

  • @Epikht
    @Epikht Рік тому

    Very good video with clear explanation, however localStorage and sessionStorage allow to store key/value pairs in the browser so Both key and value must be strings, so we should’ve stringify it with JSON it first then parse it

  • @smurffronda2951
    @smurffronda2951 3 роки тому +1

    thank you, have a great week

  • @book5035
    @book5035 2 роки тому +1

    Great video thank you man

  • @rtfish6178
    @rtfish6178 3 роки тому +3

    Your a life saver Thanks !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    • @ieatwebsites
      @ieatwebsites  3 роки тому

      I’m happy to hear that. You welcome!! 😁

  • @gabriel36ization
    @gabriel36ization 3 роки тому +1

    Nice video!

  • @sumitgupta3791
    @sumitgupta3791 3 роки тому +1

    very nice

  • @nageshthotakura8758
    @nageshthotakura8758 4 роки тому +2

    Excellent tutorial, great explanation. Thank you.

  • @muhammedalthafmr1340
    @muhammedalthafmr1340 3 роки тому +2

    Superb!, 🤩🥳

  • @kolyxix
    @kolyxix 3 роки тому +1

    great tutorial, great explanation. Job well done

  • @nickroberts2863
    @nickroberts2863 2 роки тому

    awesome man, nice one

  • @jamesbloom9545
    @jamesbloom9545 3 роки тому +1

    Wow just wow amazing

  • @VandaYorn1105
    @VandaYorn1105 2 роки тому +1

    Great explanation 👍

  • @hafiedzmada
    @hafiedzmada 2 роки тому +1

    Great tutorial! well explained, Thank you!

  • @vngaminghindi2472
    @vngaminghindi2472 4 роки тому +12

    I only understand two type of tech Tutorials 🔥
    1. Made by an Indian
    2. Made by iEatWebsites

    • @ieatwebsites
      @ieatwebsites  4 роки тому +2

      😂😂😂 love it! Thank you so much.

  • @Peterstavrou
    @Peterstavrou Рік тому +1

    Great tutorial!

  • @peshotod
    @peshotod 3 роки тому +1

    Great job.Thank you.Can you make video with remove and edit buttons.
    And multiple text entries.👍

  • @abdullahiayanle2293
    @abdullahiayanle2293 Рік тому

    Thanks for uploading this amazing video, please can you give us the css file you used thank you.

  • @tractor720
    @tractor720 3 роки тому

    how can I create a quote with local storage after input some datas as f.e. the country that there appear the postal address of the country on a quote (the quote is the output)...? can I store the data of the address in local storage...? I dont want to use a backend...

  • @abrarmansouri2746
    @abrarmansouri2746 3 роки тому +1

    Why letter.target.value instead of storageInput.value ?

  • @zakariabokhtiar4157
    @zakariabokhtiar4157 3 роки тому +1

    Your explanation is awesome. Accept greeting

  • @mbenelhassaneiii7615
    @mbenelhassaneiii7615 2 роки тому

    what if I wanna add more texts, basically instead of changing that one text I keep adding more texts

  • @cristoferk8314
    @cristoferk8314 3 роки тому +1

    Thanks! This tutorial helped me a lot!

  • @chrisdietrich1533
    @chrisdietrich1533 3 роки тому +1

    This is a great video. Thank you.

  • @cadillacman3790
    @cadillacman3790 3 роки тому +1

    Thanks a lot !!!!!! Great training ! Thanks Is it possible to made a Video for storing this into a database ?

    • @ieatwebsites
      @ieatwebsites  3 роки тому +1

      Database video Coming soon! And You welcome! 😊

  • @ejicyrilarinze7511
    @ejicyrilarinze7511 2 роки тому

    What is the name of the colour theme for your vscode

  • @DdddS-jx9ln
    @DdddS-jx9ln Рік тому

    I always used .innerHtml when changing the text/value of an html element. What's the difference between .innerHtml and .textContent?

  • @progthecode9894
    @progthecode9894 3 роки тому

    Can I do the same thing but with audio muted and reload the page and it still muted or in muted?

  • @Omar_Muhammad
    @Omar_Muhammad 2 роки тому +1

    Thanks

  • @kamilp1567
    @kamilp1567 2 роки тому +1

    great video, helped a lot!

  • @arielsison197
    @arielsison197 3 роки тому +1

    This video is worth watching! Thank you SIR!
    Sir, what's the difference between the local storage used by the browser and the local storage used by Google Chrome Extension? How can I store the data using Google Chrome Extension? Thank you in advance sir.

    • @ieatwebsites
      @ieatwebsites  3 роки тому

      Which google chrome extension?

    • @arielsison197
      @arielsison197 3 роки тому

      @@ieatwebsites I mean sir if you would like to create a google chrome extension application to save the data in the local storage.

    • @ieatwebsites
      @ieatwebsites  3 роки тому

      Oh ok. That’s a cool idea. Good luck with the project.

    • @arielsison197
      @arielsison197 3 роки тому

      @@ieatwebsites Thank you sir.

  • @omshantidiya1973
    @omshantidiya1973 3 роки тому +1

    Thank you very helpful

  • @jamezjaz
    @jamezjaz 3 роки тому +1

    Completely amazing :)

  • @mandrasaptakmandal636
    @mandrasaptakmandal636 3 роки тому

    Incredibly good tutorial
    I need ur help
    My Aim:
    1. I want to create a system in which after entering a value and then click save the value will appear in a card like list(like a list creator)
    2. Then after again if i enter the value it will create an another card with the newly entered value and the preveous saved one will be in the list.
    3. All on locall storage
    Can you please help me?

    • @asheradanehi
      @asheradanehi 3 роки тому +1

      are you talking like a grocery list type thing? cause I'm working on something like that.

    • @mandrasaptakmandal636
      @mandrasaptakmandal636 3 роки тому

      @@asheradanehi ya quite similar

  • @vukiss-su7hn
    @vukiss-su7hn 3 роки тому

    how to print multiple words??

  • @activelinestories1
    @activelinestories1 4 роки тому +1

    your the best thanks so much

  • @bvu1887
    @bvu1887 3 роки тому

    can someone tell me where the "storedInput" come from? 10:56

  • @neomohr1861
    @neomohr1861 3 роки тому +1

    thank you so much for the video! But I have a question: Is it possible to "not overwrite" the value I entered last time but to create a new key value pair? So I want to create a new local storage entry every time I hit save with a new key and a new value. sorry for my bad English, I hope this is understandable

    • @ieatwebsites
      @ieatwebsites  3 роки тому

      Everything is possible. There’s no easy way to quickly explain that. Do a quick google search.

    • @mahmoud-quran
      @mahmoud-quran 2 роки тому

      Use setItem

  • @rangabharath4253
    @rangabharath4253 4 роки тому

    awesome

  • @klieu925
    @klieu925 4 роки тому

    Questions!
    I have two buttons and I used the same id to style both of them, can I use the same id for the JS file? will it be conflicted with saving to the localstorage?
    Can one button do two things in the JS.file?

    • @ieatwebsites
      @ieatwebsites  4 роки тому

      Try using classes instead. ID are supposed to be unique. And after you add the same class to both buttons, you can do whatever you want in the JS file.

  • @nnanadavid9676
    @nnanadavid9676 3 роки тому

    Please can anyone explain the code that says if(storageInput){text.textContent = storedInput}. How does storageInput evaluate to true for the code to be executed, when the webpage is refreshed isn't the storageInput empty which is an empty string which evaluates to false?

    • @nnanadavid9676
      @nnanadavid9676 3 роки тому

      @Vedant Bhushan it would always be true in that case.

  • @TeachRVhistory
    @TeachRVhistory 2 роки тому +1

    This dude has the same accent as the voice actor for, "this is not a game"

    • @ieatwebsites
      @ieatwebsites  2 роки тому

      😄What’s he’s name? Last month someone told that I have the voice of an actor from the tv show “silicon valley”. Weird

  • @bigsmoke5930
    @bigsmoke5930 Рік тому

    Where is the css file?

  • @berkojs
    @berkojs 3 роки тому

    can u put code on github?

  • @balhallak
    @balhallak 4 роки тому

    What type of data can we store in local storage? thanks for the video.

  • @ragtop63
    @ragtop63 3 роки тому

    Would localStorage be the proper way to store table data?
    For example, imagine you wrote a script that parses certain pages you browse for specific data. It takes that data and puts it into CSV format with the intent that it can later be read and placed into an HTML table. The amount of rows for the table (CSV) can be over 1000 rows.
    Is localStorage an acceptable solution for this scenario or is there a better method?

    • @ieatwebsites
      @ieatwebsites  3 роки тому +1

      You can, but localStorage has a limit of 5mb per domain. If your data takes more than 5mb is not going to work. Maybe sending it to a database is a better option.

    • @ragtop63
      @ragtop63 3 роки тому

      @@ieatwebsites Thanks for the reply. Unfortunately, a database would not be a viable solution in this instance. However, I don't think the data will exceed 5MB per domain. Thanks!

  • @coderjag8828
    @coderjag8828 2 роки тому +1

    On line 6, it should be if(storedInput) not if(storageInput). Otherwise very helpful video. Thank you!

  • @edwardkasimir8016
    @edwardkasimir8016 2 роки тому

    he starts talking about localStorage at 6:00

  • @11vag
    @11vag 3 роки тому +1

    This is one of the worst explanations I've seen about this subject

  • @jacekbialek409
    @jacekbialek409 3 роки тому

    spam

  • @roman0811
    @roman0811 2 роки тому

    Damn bro I watched 6 minutes looking to learn about local storage. Please next time get to the point : )

  • @JNET_Reloaded
    @JNET_Reloaded 4 роки тому

    can u put code on github?