JavaScript Loading Strategies: Placing the Script Tag

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

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

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

    Thanks for this. I am learning java script and I was struck at this. Your video cleared my doubt.

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

    Great tutorial. Also splitting before minifying if the bundle becomes too large (>500kb) to render only what's needed in the first initial page which gets loaded along with this first main bundle is definitely needed and also loading other scripts asynchronously when required for routes would be ideal in these scenarios!

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

      Great reply! and relates to the next tutorial I'm doing on loading strategies; a technique sometimes called lazy loading.

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

      Cool. loading only on demand through logic and lazy loading properly combined can lead to amazing results. Learning a lot these days and will hopefully be able to apply these in a real project. Thank you time and again for all the videos and the awesome explanation. I understand that making these do not come out of thin air and I appreciate the time and effort put into these. Definitely useful for all future JS wannabe whizkids ! :)

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

    Once more - Thank you for your time and efforts to make and share those great tutorials.
    One question, should you have time to help me - May I rely that DOMContentLoaded is equivalent to the jQuery's document.ready ? Lets say that at the end of 2019 all browsers are modern.
    Thank you.

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

      They are not exactly equivalent. jQuery's document.ready checks more than just the DOMContentLoaded, but I have found DOMContentLoaded to be adequate.

  • @Dylan-fe1hn
    @Dylan-fe1hn 6 лет назад

    Is there a use case for the defer attribute? I understand it executes the script after parsing but before the DOMContentLoaded event.

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

      Just published a tutorial on defer and async: ruclips.net/video/HOapqycM1aE/видео.html

    • @Dylan-fe1hn
      @Dylan-fe1hn 6 лет назад

      That's great, thanks!