Download Progress Monitoring with SVG Animation

  Рет қаралды 1,511

Steve Griffith - Prof3ssorSt3v3

Steve Griffith - Prof3ssorSt3v3

Күн бұрын

This tutorial has two topics - first is how to make an animated circular progress meter using SVG, CSS, and JS. The second part examines how to monitor progress of a file download using the JavaScript fetch method.
Code from video: gist.github.co...

Пікірлер: 28
@shahinza
@shahinza 5 ай бұрын
Welcome back professor 😊
@fakedevdutt
@fakedevdutt 4 ай бұрын
In past three days I saw nearly 30 videos of yours which are related to service workes, files, cache, indexedDB, PWAs and they were incredeble i learned soo much!! This videos are best in class you go throught each line reason why how it works beautiful! I feel like I learned soo much in this three days!
@rmnkot
@rmnkot 5 ай бұрын
Great lesson! One thing to improve is to make DOM selections outside of the recursion and reference inside. 🙂
@ravenkavoori
@ravenkavoori 5 ай бұрын
Welcome back professor, It's nice to see you again.
@blokche_dev
@blokche_dev 5 ай бұрын
It's been a while! Glad to see you back. Thanks for sharing.
@brucewayne252
@brucewayne252 5 ай бұрын
Missed you Professor! Learning new things again with you :)
@florentd.5817
@florentd.5817 2 ай бұрын
Hi, thanks a lot for your sharing tutos. Just a notice, you should start 'sometime' by a preview of the result. It's help and motivate to follow the full tutorial.
@ygvanz
@ygvanz 5 ай бұрын
Glad to see you back, professor.
@YassinAlHassany
@YassinAlHassany 5 ай бұрын
Welcome back. Your channel is so professional.
@Raj9x7
@Raj9x7 4 ай бұрын
I'm so happy to see you back. I missed your videos a lot. ❤
@ΕγωΕγω-ρ6ω
@ΕγωΕγω-ρ6ω 5 ай бұрын
Thank you for sharing this amazing video and welcome back 💓🙏
@mtcindianutube
@mtcindianutube 5 ай бұрын
This awesome tutorial @Steve
@doriomer
@doriomer 3 ай бұрын
Thank you, clear explanation as always...
@kingwoodbudo
@kingwoodbudo 5 ай бұрын
Missed seeing your tutorials, glad you're back!
@svilenivanov3621
@svilenivanov3621 5 ай бұрын
Awaysome tutorial, thanks!
@NedumEze
@NedumEze 5 ай бұрын
Wow! A semester's course work, huh? Thank you sir.
@fedordostoevskiy4209
@fedordostoevskiy4209 5 ай бұрын
Super processor. 👍
@shahinza
@shahinza 5 ай бұрын
Professor, thank you so much for this fantastic video! I have a question: Once we enter the 'if(done)' condition, can we just return the response and add a new '.then', inside that use 'response.blob()' and then set the image source? If we do this, I believe we don't need an array to gather chunks anymore right?
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 5 ай бұрын
You could just work with the response object but when done == true it means you have the whole thing. There are no more chunks at that point.
@yashpandey9550
@yashpandey9550 5 ай бұрын
Hey there, amazing video for teaching important first principles of the Web. I just have one small question. After we have downloaded the resource image using fetch then it should have been cached by the browser. So after we are done reading all the image data from the stream, simply setting the href of the image tag to the actual url shouldn't cause another download and should instantly render the image. I guess we are only doing the blob thing here to understand how to handle and process our data after the stream is fully consumed and closed. Is there any other benefit of this blob approach? Let me know if I misjudged something.
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 5 ай бұрын
The fetched blob will not be cached and used by setting the image element src to the fetched url. They are two different initiators for the request and use different security context. An image element does not need to follow the same CORS rules as a fetch call. The image element src is initiated by the browser and the fetch is initiated by script. So, setting img.src after the blob is downloaded means starting a whole new download. The caching is also controlled by possible cache-control headers. If you want to track the download progress then you would use the fetch plus the reader. Once you have all the chunks you can reassemble the file from the body and call json( ), text( ), or blob( ) to extract the contents from the file. Then do what you like with the contents.
@ludder123456789
@ludder123456789 5 ай бұрын
Is there a way to figure out what type of file it is you are about to download? Or do you have to know it's an image for the blob creation? 😊
@shahinza
@shahinza 5 ай бұрын
In responses, a Content-Type header provides the client with the actual content type of the returned content.
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 5 ай бұрын
What @shahinza said. Just know that you are not 100% guaranteed to get this header.
@ludder123456789
@ludder123456789 5 ай бұрын
Aaa neat! Thank you two.
@Nikhil_NnN
@Nikhil_NnN 5 ай бұрын
I am your New subscriber and new to programming world so can you please tell me how to follow your lecture (i mean sequence). please help!!!
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 4 ай бұрын
I answered this comment on the other video.
@huzeyfetas
@huzeyfetas 5 ай бұрын
good to see you sir welcome back
Custom Events Dispatched from Web Components
20:32
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 2,1 М.
Awesome WordPress Alternative Built on Laravel // Statamic CMS
28:06
Dorian Develops
Рет қаралды 3,6 М.
Миллионер | 2 - серия
16:04
Million Show
Рет қаралды 1,2 МЛН
1 сквиш тебе или 2 другому? 😌 #шортс #виола
00:36
Web Components with Embedded Icons
12:30
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 1,2 М.
How to Use the New JS Object GroupBy Method
18:17
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 3,8 М.
Node.js with SQLite: The Ultimate Beginner's Guide!
23:25
JustProgramIT
Рет қаралды 7 М.
Enhanced UI control and Responsible Accessibility with the HTML INERT Property
12:02
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 1,8 М.
Important differences between textContent and innerText
11:44
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 2,4 М.
Incredible scroll-based animations with CSS-only
32:23
Kevin Powell
Рет қаралды 450 М.
Revealing the Differences between HTML Dialogs and the Popover API
24:14
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 9 М.
Create an animated, circular progress bar
34:37
Kevin Powell
Рет қаралды 45 М.
Checking for the Existence of JavaScript Variables
9:08
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 3,4 М.
Complex SVG Animations Made Simple with JavaScript
22:04
DesignCourse
Рет қаралды 70 М.