Great lesson! One thing to improve is to make DOM selections outside of the recursion and reference inside. 🙂
@fakedevdutt7 ай бұрын
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!
@ygvanz7 ай бұрын
Glad to see you back, professor.
@ravenkavoori7 ай бұрын
Welcome back professor, It's nice to see you again.
@blokche_dev7 ай бұрын
It's been a while! Glad to see you back. Thanks for sharing.
@florentd.58174 ай бұрын
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.
@kingwoodbudo7 ай бұрын
Missed seeing your tutorials, glad you're back!
@brucewayne2527 ай бұрын
Missed you Professor! Learning new things again with you :)
@YassinAlHassany7 ай бұрын
Welcome back. Your channel is so professional.
@Raj9x77 ай бұрын
I'm so happy to see you back. I missed your videos a lot. ❤
@ΕγωΕγω-ρ6ω7 ай бұрын
Thank you for sharing this amazing video and welcome back 💓🙏
@NedumEze7 ай бұрын
Wow! A semester's course work, huh? Thank you sir.
@mtcindianutube7 ай бұрын
This awesome tutorial @Steve
@svilenivanov36217 ай бұрын
Awaysome tutorial, thanks!
@shahinza7 ай бұрын
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-Prof3ssorSt3v37 ай бұрын
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.
@drorkatzir6 ай бұрын
Thank you, clear explanation as always...
@yashpandey95507 ай бұрын
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-Prof3ssorSt3v37 ай бұрын
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.
@ludder1234567897 ай бұрын
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? 😊
@shahinza7 ай бұрын
In responses, a Content-Type header provides the client with the actual content type of the returned content.
@SteveGriffith-Prof3ssorSt3v37 ай бұрын
What @shahinza said. Just know that you are not 100% guaranteed to get this header.
@ludder1234567897 ай бұрын
Aaa neat! Thank you two.
@fedordostoevskiy42097 ай бұрын
Super processor. 👍
@Nikhil_NnN7 ай бұрын
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!!!