How to Build Your First Progressive Web App (PWA) - HTML, CSS & JavaScript Tutorial

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

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

  • @dcode-software
    @dcode-software  2 года назад +1

    BUILD A SINGLE PAGE APPLICATION WITH JAVASCRIPT 🔽
    ruclips.net/video/6BozpmSjk-Y/видео.html
    🏷 *THE ULTIMATE JAVASCRIPT DOM CRASH COURSE* 👇
    www.udemy.com/course/the-ultimate-javascript-dom-crash-course/?referralCode=DC343E5C8ED163F337E1

    • @jainamchheda
      @jainamchheda Год назад

      THANK YOU SO MUCH BRO! 🥹🥹🥹 I was struggling alot in PWA, but after watching your tutorial I could finally build it. Also, you explained everything very nicely, Thanks again!! 💙💙

  • @dcode-software
    @dcode-software  4 года назад +19

    If you enjoyed remember to Like and Subscribe for more projects and tutorials like this one 🙂

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

      I’m new coding. For every programming language I use to I have to instal some type of plugin or something into vscode. Like for JavaScript or .Json. And python

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

      @@jamarmartin884 no

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

      Very clear explanation. Went to clone the code to learn more, but the GitHub repo is bare. Just the shell of the project, but no code. Any possibility of uploading still? Tnx.

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

      As a rule of thumb, I don't like and subscribe to spam like this. Try teaching us how to build a native app and stop promoting this malicious PWA nonsense.

  • @zanarkandmusic
    @zanarkandmusic 3 года назад +14

    This is the only guide that actually got me going - you did a great job of explaining things. Nice one!

  • @angeldimitrov1353
    @angeldimitrov1353 2 года назад +8

    Great tutorial and I love that you are not piling a bunch of frameworks on to do a simple example.
    However, I think it would be great if you had done a better intro on how you are hosting the page. Nothing wrong with doing some research, but I think some might abandon the tutorial when they find out they have to figure out how to install Apache, set it up, and begin using it, in order to even start the tutorial at the point where you were.
    Regardless, if someone does already have this background knowledge, useful tutorial!

  • @glaestgon
    @glaestgon Год назад +1

    Good tutorial. About half an hour, no frameworks, and just the minimum components to make things done. Thank you.

    • @dcode-software
      @dcode-software  Год назад +1

      You're welcome. Happy to hear you enjoyed it!

  • @taofeeqomotolani2311
    @taofeeqomotolani2311 2 года назад +6

    If you are following this project in 2022, add this to the icons array ("purpose": "maskable") it is needed for android phones of today

  • @ChumX100
    @ChumX100 3 года назад +4

    It's nice that even your VS Code theme matches your logo and page.

  • @nickpapadatos7587
    @nickpapadatos7587 4 года назад +16

    Great explanation, thank you. Would love to see you do more on PWA's :-)

  • @gwija5783
    @gwija5783 Год назад +1

    That was incredibly helpful. I was able to follow very easily and I appreciated how you explained every line of code you typed. Thanks!

  • @_o.magnata
    @_o.magnata 4 года назад +7

    Thanks dcode, this is the only tutorial that really explain how it's done

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

    For the long time, my CI project its now working with PWA, thanks mate!

  • @MarkCay
    @MarkCay 4 года назад +3

    Thank you for this! Clear explanation and you've got a very nice voice, sir! Instant subscriber here.

  • @AdityaSingh-nx6xp
    @AdityaSingh-nx6xp Год назад +1

    Thanks you it works!! 🙏

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

    This guy is awesome. Know I am able to understand what pwa is. It's really fun thanks.

  • @xxThemoritzxx
    @xxThemoritzxx 3 года назад +2

    Such a nice and clean explanation. Would love to see more stuff with PWA's ;)
    Greetings

  • @hpkeong
    @hpkeong 4 года назад +2

    Dcoe...what a good start and this is really opening me to another chapter. Thanks

    • @dcode-software
      @dcode-software  4 года назад

      Glad to hear it!

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

      @@dcode-software Frankly, my Indonesia hardcore programmer / partner develop a standard kit for me to learn and generate PWA within a minute. He has published to GitHub to share, It automatically convert to PWA.
      U all are awesome. We are fighting for our start up under my personal investment and looking for more start-up partner

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

      @@hpkeong Hi, please can you share the GitHub link?

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

    Thanks a ton ..With your guide video I was able to configure PWA for my site 😊

  • @khaledbudajaja6137
    @khaledbudajaja6137 Год назад

    Well done, the only explaination that made the job clear and easy.

  • @mrugamajmudar5433
    @mrugamajmudar5433 3 года назад +2

    Thank you so much!!! The best video I have come across on PWA, simple and clear. :)

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

    This video is definitely in the holy grail of PWAs

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

    Thanks for the awesome video. Short but well explained. Subscribed.

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

    Nice tutorial video sir. I hope more Advanced PWA video coming from you

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

    thank you very much, really helped me make PWA

  • @ChrisAthanas
    @ChrisAthanas 3 года назад +2

    Can you link to github with final code, just for reference?

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

    Excellent video!!!👏👏👏👏

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

    Nice! Gotta try this tomorrow

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

    Thanks, great video!

  • @s1rbl4ck
    @s1rbl4ck 4 года назад +2

    Wow It was amazing thanks for complete Explanation 👌

  • @SRG-Learn-Code
    @SRG-Learn-Code 3 года назад +1

    Hey, very cool and well explained. I've just came from spa video and I really like your style. Btw How do you change localhost name? youtube.local is something you customized, where? how? Anyway, many thanks for sharing.

    • @dcode-software
      @dcode-software  3 года назад +1

      Hey, this is how I've done it:
      ruclips.net/video/gBfZdJFxjew/видео.html

    • @SRG-Learn-Code
      @SRG-Learn-Code 3 года назад +1

      @@dcode-software Cool, thanks!

  • @JSaqilrao
    @JSaqilrao 11 месяцев назад

    Both methods-using the theme_color attribute in the manifest file and the theme-color meta tag in the HTML head-serve the same purpose of specifying the theme color. It's not necessary to have both in your project; having the color specified in either location should suffice.

  • @ricTGL
    @ricTGL 3 года назад +4

    Hi!! First of all, great video, it was a very nice introduction to PWAs. I have a doubt: Initially I was having problems with the manifest in the web browser cause I was deploying the index.html directly dragging it from file explorer, but then I discovered the Live Server extension for VSCode and I used it but the domain is the localhost address (127.0.0.1) and in your case you have a different name for the local address, how did you achieve that? Thank you very much!

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

    Thank you, very helpful.

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

    Thanks for this great video!

  • @emstudios14
    @emstudios14 4 года назад +12

    Please note that for the new update to chrome,
    Audits has been replaced by Lighthouse

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

    Awesome video!

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

    Wow, you're the Best!!!

  • @eternallyMarsh
    @eternallyMarsh 8 месяцев назад

    This is awesome, but my site won't install after hosting. Like during development the install option does come, but when I host the site, there's no install option

  • @TinyMaths
    @TinyMaths Год назад

    Today, my growing interesting in beginning to code for android went through the roof when an app I had recently built and tried to test couldn't do its job because I lost internet connection, or rather, was put to offline mode when Google decided it was time for an upgrade. By the time the upgrade was finished and I tried to get the app to work again, I had no idea what had gone wrong. (it is a shopping list app that I use to store a list of finished groceries at home, and then retrieve the data for display and manipulation when I'm out shopping)
    After I got home, I started to figure things out, but, it really made me think that, even if the app worked as intended, what good would it be to me if I didn't have the internet connection that the app relies on to function?? Been skirting around this for about a while, so I might as well begin the process.

  • @EnglishRain
    @EnglishRain Год назад

    25:32 - You say "cache first, if not there, then go to network". Any idea on how to make it "network first, if not there, then go to cache"? Because problem with former is that it takes quite a lot of effort (clearing data, multiple refreshes, etc) to push updated PWA to user's device.
    Edit - found the solution using ChatGPT. Basically test if (navigator.onLine) firstly inside the fetch event listener, if it is true then do e.respondWith(fetch(e.request)); else use the cache responding code you showed in video.

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

    Very clear. Thank you. 👍🙏🙏

  • @surfinbird71
    @surfinbird71 4 года назад +3

    Uncaught (in promise) TypeError: Failed to execute 'fetch' on 'ServiceWorkerGlobalScope': 'only-if-cached' can be set only with 'same-origin' mode at e.respondWith.caches.match.then.response (sw.js:12)

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

    Subscribed , you are very helpful.
    Thanks sir

    • @dcode-software
      @dcode-software  3 года назад +1

      You're welcome and thanks for subbing 🙂

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

    You're the best Dom !

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

    A big thank you, good explanation and it works !

  • @joshuakalu4777
    @joshuakalu4777 4 года назад +6

    This is what I've been waiting for. Thanks Dcode!

  • @DesertCookie
    @DesertCookie 2 года назад +1

    I don't get 'index.html' to show up when offline. The cache says it is cached but when enabling 'offline' I get a 'Page not reachable'. I also get an error 'Uncaught (in promise) TypeError: Failed to fetch at sw.js:18:31' which is the line 'return response || fetch(e.request);'.
    Do you have any idea as to why that might be and how to solve it?

    • @NathiCode
      @NathiCode Год назад

      Just put the manifest link on the top of another link in your html file

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

    Thanks a lot man! Great tutorial.

  • @henryhamilton4087
    @henryhamilton4087 3 года назад +2

    how do you get rid of the CORS error when your JSON file is on the same folder as the other ones?

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

      have u found any solutions??

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

      1] In vscode download live server extension
      2]Then right click your html file and select preview server

  • @Zwelch007
    @Zwelch007 3 года назад +4

    Great video, thanks!
    I'd just like to point out that you're mispronouncing "cache". It's pronounced exactly like "cash", rhymes with "flash". The a is not pronounced like the a in "age" or "cage".
    Keep up the good work!

    • @dcode-software
      @dcode-software  3 года назад +1

      Thanks mate. It depends where you're from, I'm from Australia so I think we pronounce it like I've done in the video

    • @zanarkandmusic
      @zanarkandmusic 3 года назад +3

      @@dcode-software no offence, but most other places (i.e. 90% of your views) will pronounce it cash - maybe just bite the bullet? Its really off-putting. Awesome video though... but I very nearly turned off every time you said cache.

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

    Good timing :) Thanks man

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

    Good video. I have question. No matter how I change the content in all of the file, the "install" still display "dcode PWA example". Please advise how to change it. Thx.

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

    Thanks a ton, amazing tutorial! So cool to have my web app working offline! :D

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

    awesome as always

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

    Thanks a lot Sir.. Much needed 💐

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

    Followed all instructions. and I keep getting this error when I perform a Lighthouse audit "
    Does not register a service worker that controls page and start_url". HELP?

  • @mohdasif.tk77
    @mohdasif.tk77 3 года назад

    Thanks for this, very clear explanation. sir, the Ios splash screen not working how to fix it..?

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

    Excellent video, it was well explained! Thank you so much! 😄😄

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

    YOU ARE MY HERO.I LOVE YOU SO MUCH

  • @TazBo-wd2ig
    @TazBo-wd2ig Год назад

    Can you update an responsive website to a web app or do you have to start from scratch? I have a booking system for my salon business where people pay online. They always ask for an app but it costs too much. If I could have convert it to a web app I could use it to do the same thing and cut costs on sms reminders, confirmations etc.

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

    Greate information..!!
    How to know the website is PWA in a simple way
    can you name few websites which have offline accessibility ??

  • @chiranthmjain7940
    @chiranthmjain7940 11 месяцев назад

    is there any possibility to remove ellipsis from PWA MicrosoftEdge?

  • @ThaRealIansanity
    @ThaRealIansanity 2 года назад +1

    Something important I learned today. As long as this PWA is installed and running on localhost it will continue to tie up port 3000 or whatever port you ran it on, even when not open. I was trying to run a laravel project 2 weeks later and browserSync was showing me "Hello my name is Dom" . Took me a few minutes to figure out WTH was going on. I had to uninstall the PWA through start->settings->apps and features to free up port 3000.

    • @mihaelacipaian8554
      @mihaelacipaian8554 Год назад

      Thank you so much for the solution. I used this tutorial for another app and today I kept getting an error from that file. I uninstalled the app and now everything is back to normal.

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

    In my app it is showing :
    The script has an unsupported MIME type (text/html).
    What could be the reason?

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

    Dcode is there a second tutorial where we build the app up a bit? Also, how do we make the splash and icons show when the app is opened as I see they aren't in my app or yours

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

    amazing explain its works great for me :)

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

    which theme are you using for vs code?

  • @edphi
    @edphi Год назад

    What app are you using to create the manifest etc ?

  • @peri6075
    @peri6075 Год назад

    Im getting a “manifest not detected” message when i try opening it. Why is that?

  • @ofek15
    @ofek15 4 года назад +2

    Hi Dom can you make a small tutorial about Web Notifications API?

    • @dcode-software
      @dcode-software  4 года назад

      Hey, I've made this video: ruclips.net/video/Jncoj-Gvh9o/видео.html
      Does it help?

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

      @@dcode-software it does! thanks

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

    Great tutorial, very good explanation thank you !
    Just one question more:
    Once the PWA is cached, if I add features or fix some bugs, how is possible to update it automatically or promt the user to update it ?
    Again thank you for your great job !

    • @TazBo-wd2ig
      @TazBo-wd2ig Год назад

      That’s actually a very good q

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

    Thank you very much for this tutorial as i am about to create something like that (not for sale just for my needs). Do you plan to make more advanced tutorial for that?

    • @dcode-software
      @dcode-software  4 года назад +1

      I have other videos planned at the moment but it's definitely something I'll consider!

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

      @@dcode-software thanks a lot, I really appreciate that!

  • @ahmedghallab5342
    @ahmedghallab5342 Год назад

    thank you شكرا جزيلا

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

    Nice tutorial. So how can it be viewed on mobile

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

    Hello! Great tutorial, however, I'm getting issues regarding a favicon. What is it? Seems something new with respect with what you shown us. Regards!

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

      favicon.ico is the litle (browser)tab logo. usually is 16px by 16px just save as png and change the extension to ico...

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

    Ótimo vídeo.

  • @bocilProgramer
    @bocilProgramer Год назад

    Thank You

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

    If I use indexphp instead of indexhtml will it work?

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

    Audit tab is not available in chrome anymore. instead click in lighthouse tab. The content is pretty much the same.

  • @domaincontroller
    @domaincontroller 3 года назад +6

    “Manifest does not contain a suitable icon”...

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

    I have a question what if i upload my application on production and then i decided to make changes on those file i did caches. Then how do i make my application service worker reload those static files?

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

      That's my issue right now!

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

      My question too...

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

    by any chance do you know how to fix manifest not being found by chrome?

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

    that is amazing tutorial, thank you

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

    Will this work for Unity Web GL?

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

    Which vscode thene you are using

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

    How did you run the application? I used live server extension for visual studio code...but when I run the project it shows in the application tab, manifest.json not detected.
    What am I doing wrong?

    • @dcode-software
      @dcode-software  4 года назад +1

      I recommend using a dedicated web server like Apache, try XAMPP or WAMP

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

      @@dcode-software i am using Xampp but same problem facing

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

      @@dcode-software I pay for a server but don't know how to do this lol

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

    Wonder full

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

    u are good

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

    can i set my google fonts and fontawesome links as catch as well?

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

    How to add a splash screen with the icon?

  • @vankeshwarampraveen3312
    @vankeshwarampraveen3312 Год назад

    How to run in crome this code?

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

    how to get button install in brawser like you

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

    Audit usage of navigator.userAgent, navigator.appVersion, and navigator.platform

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

    also if its offline the user can navigate between html pages?

    • @dcode-software
      @dcode-software  4 года назад

      Yes, if you cache those requests!

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

      dcode i have a blog with php dynamicall from database can cache pages when user enter on website, i mean to cache all post pages and work on offline mode to be able to read it offline.

    • @dcode-software
      @dcode-software  4 года назад

      Ideally your data should probably be returned via the Fetch API (or at least AJAX) and then you may cache that result. A technique could be to store that result and display it to the user, and then once the network comes back online you retrieve a fresh copy of that data. I suggest you have a look at the Cache API for more info

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

      dcode thank you!

  • @alexander3293
    @alexander3293 3 года назад +3

    what vscode theme are you using?

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

    can you make a web app development course

  • @whatsthepoinism
    @whatsthepoinism Год назад

    thx

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

    Why Chrome icon coming in my PWA icon?

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

    I did not get the install prompt but everything works well

    • @dcode-software
      @dcode-software  4 года назад +1

      That's no good - have you tried refreshing the service worker?

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

      @@dcode-software i got the solution thanks

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

    Thank you man, you record this best of the best explanations ever. Respect from me. Thank you very much. Subscribe, like and click the bell.

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

    is pwa still a thing?