From 46cbf9bf0050e9e8ee458a730cf66e3f85af19a9 Mon Sep 17 00:00:00 2001 From: joaquinelio Date: Mon, 24 Mar 2025 17:55:54 -0300 Subject: [PATCH 1/2] fetch() for local resources --- 5-network/01-fetch/article.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/5-network/01-fetch/article.md b/5-network/01-fetch/article.md index 4669fc4519..83db92842e 100644 --- a/5-network/01-fetch/article.md +++ b/5-network/01-fetch/article.md @@ -12,6 +12,8 @@ For example, we can use a network request to: ...And all of that without reloading the page! +Fetch is not limited to network request though. It can load local assets dynamically, like SVGs, HTML fragments, or configurations. For example, `fetch("face.svg")` becames useful when you need to modify the SVG element dynamically. + There's an umbrella term "AJAX" (abbreviated Asynchronous JavaScript And XML) for network requests from JavaScript. We don't have to use XML though: the term comes from old times, that's why that word is there. You may have heard that term already. There are multiple ways to send a network request and get information from the server. From a91385105297a5dc5400a9e2f017d4636b840800 Mon Sep 17 00:00:00 2001 From: joaquinelio Date: Mon, 24 Mar 2025 18:02:16 -0300 Subject: [PATCH 2/2] oops --- 5-network/01-fetch/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/5-network/01-fetch/article.md b/5-network/01-fetch/article.md index 83db92842e..0829ca9855 100644 --- a/5-network/01-fetch/article.md +++ b/5-network/01-fetch/article.md @@ -12,7 +12,7 @@ For example, we can use a network request to: ...And all of that without reloading the page! -Fetch is not limited to network request though. It can load local assets dynamically, like SVGs, HTML fragments, or configurations. For example, `fetch("face.svg")` becames useful when you need to modify the SVG element dynamically. +Fetch is not limited to network request though. It can load local assets dynamically, like SVGs, HTML fragments, or configurations. For example, `fetch("face.svg")` becomes useful when you need to modify the SVG element dynamically. There's an umbrella term "AJAX" (abbreviated Asynchronous JavaScript And XML) for network requests from JavaScript. We don't have to use XML though: the term comes from old times, that's why that word is there. You may have heard that term already.