When do the imports in this JavaScript file served from a CDN occur?

I was just reading an article on Medium (https://medium.com/@mariusbongarts/showcase-your-medium-articles-with-web-components-part-1-basics-d2c6618e9482). As a demonstration of web components, the author provides a CDN link to a JavaScript file along with a custom component. If I look at the contents of the JavaScript file, I can see that it imports from files which, I assume, exist in the same… Read More When do the imports in this JavaScript file served from a CDN occur?

Is there any way to know more about "Not specified" CloudFront referrers? Are they a bad sign?

When looking at CloudFront logs, the most common referrer for my photo service CDN is Not Specified. I’m trying to understand more about why this is and possibly where the requests are coming from. We are storing cloudFront logs for a photo service CDN. A client has requested to know where their data charges are… Read More Is there any way to know more about "Not specified" CloudFront referrers? Are they a bad sign?

Bootstrap 5 data-bs-toggle vs data-toggle. Adding the bs breaks my whole Popper

I’m one month into learning Web Development. From what I’ve read, the data-bs-toggle is the newer name for Bootstrap 5. What is the difference between Bootstrap data-toggle vs data-bs-toggle attributes? My code is simple. In the head, I’ve included CSS, jQuery, and JavaScript Bundle with Popper. In the body, I have two links with a… Read More Bootstrap 5 data-bs-toggle vs data-toggle. Adding the bs breaks my whole Popper

Are these icons missing from the Bootstrap icons web font, or am I doing something wrong?

I’m using the web font for Bootstrap Icons, and most of my icons are working, but there are a few which are listed on the website that don’t seem to be included in the web font. These include: bi-envelope-plus,bi-quote and bi-mortarboard. I’m using the CDN from https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css and including them as follows: <i class="bi bi-envelope-plus"></i>… Read More Are these icons missing from the Bootstrap icons web font, or am I doing something wrong?

how to execute cleanup function in useEffect() only when component unmounts

I want to clear filters only when the component unmounts. So I wrote cleanup function only in useEffect(). But as I checked it with console.log(), 1 was printed after the component mounted too. What’s wrong in this way? useEffect(() => { return () => { clearFilters(); console.log(1); }; }, []); Stack Snippet: const { useState,… Read More how to execute cleanup function in useEffect() only when component unmounts