Getting Started with indexedDB

Поделиться
HTML-код
  • Опубликовано: 10 янв 2025

Комментарии • 70

  • @medienkonsument4
    @medienkonsument4 5 лет назад +13

    Thank you so much for this easy to understand introduction to indexedDB. Both Google blogs and Mozilla documentation failed deeply to explain this in an easily understandable way!

  • @jdcarter157
    @jdcarter157 2 года назад

    quick and concise, much appreciated in the middle of my work shift!! had a few hiccups but none that completely roadblocked me

  • @DavidJohnson-hb6gh
    @DavidJohnson-hb6gh 5 лет назад +1

    Excellent video! Well described. Simple. Straight forward. Nice balance of complexity and simplicity. Thanks!

  • @BrothasAbroad
    @BrothasAbroad 3 года назад +1

    @All Things JavaScript This was an excellent and simplistic tutorial. Thanks for getting straight to the point and simple explanations. I gave a like. 😊

  • @chamumutezva539
    @chamumutezva539 5 лет назад +1

    Thank you for this clear presentation, i have now understood what indexeddb is.

  • @ali_mammadov
    @ali_mammadov 6 лет назад +1

    Very clear and simple intro to IndexedDB! Thx

  • @georgetomeh8898
    @georgetomeh8898 3 года назад

    Thanks very much. Great tutorial

  • @МихайлоГурський-ж9з

    Clear and to the point. great job

  • @hugonavakopp
    @hugonavakopp 4 года назад

    Great intro. Thank you for posting

  • @mage9264
    @mage9264 6 лет назад +1

    Precise and concise , great resource!

  • @sandeepbrk
    @sandeepbrk 4 года назад

    Thank you. Nice video. thanks for the practical example.

  • @Hochmoa
    @Hochmoa 5 лет назад +2

    Thank you very much, that helped a lot. I had to set playback speed to 1.5 however :D

  • @philipjacobsen8337
    @philipjacobsen8337 4 года назад +1

    Nicely done --- thank you!

  • @hayounglee5929
    @hayounglee5929 4 года назад

    Thank you so much for your video! It helped me so much!

  • @anishadhikari3690
    @anishadhikari3690 4 года назад

    Thank you.
    Perfect Explanation! :)

  • @wadebanks8945
    @wadebanks8945 5 лет назад +1

    Great video brother thanks

  • @manishchandra8931
    @manishchandra8931 7 лет назад

    Hi, as per latest MDN docs - 'If the database doesn't already exist, it is created by the open operation, then an onupgradeneeded event is triggered and you create the database schema in the handler for this event. If the database does exist but you are specifying an upgraded version number, an onupgradeneeded event is triggered straight away, allowing you to provide an updated schema in its handler'(developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API/Using_IndexedDB) . This contradicts your statement @15:14

    • @AllThingsJavaScript
      @AllThingsJavaScript  7 лет назад

      Thanks for adding to this! It is important to keep the information accurate and I appreciate everyone's help doing this.

  • @laxitkumar4515
    @laxitkumar4515 6 лет назад +1

    Nice for beginners.. Thanks!

  • @cvaravind1
    @cvaravind1 6 лет назад +1

    Thanks alot Stephen !

  • @itsdannyftw
    @itsdannyftw 7 лет назад +1

    Thanks Stephen!

  • @krosenk729
    @krosenk729 7 лет назад

    So helpful! Thank you

  • @Aleksei-n6h
    @Aleksei-n6h 6 лет назад

    It was very helpful!

  • @MrMarkgyuro
    @MrMarkgyuro 5 лет назад

    All Things Javascript, LLC
    What is the event which you have specified as e in onerror, onsuccsess etc. anonymous functions parameter? : )
    Another question, if i get this ERROR what should i do?
    Uncaught DOMException: Failed to execute 'transaction' on 'IDBDatabase': One of the specified object stores was not found.
    at IDBOpenDBRequest.request.onsuccess

    • @AllThingsJavaScript
      @AllThingsJavaScript  5 лет назад

      It is an error object that is automatically sent when the event occurs. Does that help?

    • @shivamkhurana452
      @shivamkhurana452 3 года назад

      @@AllThingsJavaScript
      can you please tell this also ? how to resolve it
      Uncaught DOMEXception: Failed to execute 'transaction' on IndexedDb.js:
      'IDBDatabase': One of the specified object stores was not found. at IDBOpenDBRequest.request.onsuccess

    • @AllThingsJavaScript
      @AllThingsJavaScript  3 года назад

      @@shivamkhurana452 It looks like the stored data was removed or you are trying to access the wrong data.

  • @mohammedal-mudhafar4602
    @mohammedal-mudhafar4602 6 лет назад

    Thank you, Good material ! :)

  • @viniciusr.m.6680
    @viniciusr.m.6680 5 лет назад

    Great Video. I am new at JavaScript and this was really helpfull. I Have one Question tho. There is no problem setting the callbacks to the open request after the actual request was made?

    • @AllThingsJavaScript
      @AllThingsJavaScript  5 лет назад +1

      Hi Vinicius, not sure I understand. Which callback are you referring to? Do you have a timestamp from the tutorial?

    • @viniciusr.m.6680
      @viniciusr.m.6680 5 лет назад

      @@AllThingsJavaScript i am refering to the onerror, onsucess and onupgradeneeded that you set in request. You opened the database before setting the event callback, so could not a situation occur where the event occurs after the callback for this event has been set? the timestamp you set the callbacks are 7:53

    • @AllThingsJavaScript
      @AllThingsJavaScript  5 лет назад

      @@viniciusr.m.6680 You are correct. Following good coding practices I should declare the handlers before opening the database.

  • @Njay-music
    @Njay-music 5 лет назад

    if user deletes browsing history, is it gonna remove all the index db storage right?

    • @AllThingsJavaScript
      @AllThingsJavaScript  5 лет назад

      Yes, it could depending on certain factors.

    • @sandhunba
      @sandhunba 5 лет назад

      @@AllThingsJavaScript what is the best option for creating phone gap app. i am currently using websql but that can be banned anytime.I can't find any gud alternative method.

    • @AllThingsJavaScript
      @AllThingsJavaScript  5 лет назад

      @@sandhunba Not a lot of experience with phone gap

  • @mohdfaiz4072
    @mohdfaiz4072 4 года назад

    Hi, I want my values to access in another domain. How do achieve that?

    • @AllThingsJavaScript
      @AllThingsJavaScript  4 года назад

      As far as I know indexDB cannot be used across domains.

    • @mohdfaiz4072
      @mohdfaiz4072 4 года назад

      @@AllThingsJavaScript Can you suggest me some alternative with some example?

    • @AllThingsJavaScript
      @AllThingsJavaScript  4 года назад

      An alternative for cross domain? I think at that point you would want to use server side database.

    • @MyFavouriteDinosaur
      @MyFavouriteDinosaur 4 года назад

      @@mohdfaiz4072 try firebase db.

  • @mehdiniroumand1770
    @mehdiniroumand1770 5 лет назад

    I dont underestand why you define two times the varieables db,store , index : line 9 and line 16?

    • @mehdiniroumand1770
      @mehdiniroumand1770 5 лет назад

      and when you use them i dont khow wich one of them you are using

    • @AllThingsJavaScript
      @AllThingsJavaScript  5 лет назад

      On line 9 we need to open the database. That is the first step. The act of opening a database returns a response and if it is successful it will return a reference to the database. So we grab the data, or a reference to the database in line 16. And that is the database that we work with. As to which I am using, notice that the db variable is global with the exception of the one in onupgradeneeded handler. That is local to the function. So anything done in there is not referencing the global db. All others reference the global db, so the same database.

  • @visitkoushik
    @visitkoushik 3 года назад

    Thank you!!

  • @sabrinaartist7269
    @sabrinaartist7269 4 года назад

    I know its a little late but whenever i try to get the data from the database and return it, it‘s undefined or simply empty. Can someone help me?

  • @seenuvasanv
    @seenuvasanv 7 лет назад

    Helpful

  • @cristiana-dev
    @cristiana-dev 6 лет назад

    nice!

  • @JorgeMendez-ik6pv
    @JorgeMendez-ik6pv 6 лет назад +15

    OMG indexedDB is awful....

    • @Cognitoman
      @Cognitoman 6 лет назад

      why ?

    • @JorgeMendez-ik6pv
      @JorgeMendez-ik6pv 6 лет назад

      Not a technical criteria... I just hate them

    • @Cognitoman
      @Cognitoman 6 лет назад

      @@JorgeMendez-ik6pv Whats the alternative besides local storage? Would you say indexdb is faster?

    • @JorgeMendez-ik6pv
      @JorgeMendez-ik6pv 6 лет назад

      Well, I prefer SQLite.

    • @Cognitoman
      @Cognitoman 6 лет назад

      Jorge Mendez they have them in browser?!

  • @ggamezscr
    @ggamezscr 3 года назад

    Thanks a lot!