Skip to content

Commit

Permalink
Merge pull request #38 from Quafadas/lolgab-patch-1
Browse files Browse the repository at this point in the history
Fix typos in blog post
  • Loading branch information
Quafadas authored Nov 3, 2024
2 parents a7b9d59 + 5950386 commit 68a53c0
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions site/docs/_blog/_posts/2024-07-17-On Cdns.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,26 @@ title: On CDNs

One of the objects which seems to crop up rather often when discussing this idea, is that

> My users are now dependant on a CDN!
> My users are now dependent on a CDN!
This is true, although my invesigtaion makes this appear way less scary then it first looks. In fact on balance I've developed a strong preference for them...
This is true, although my investigation makes this appear way less scary then it first looks. In fact on balance I've developed a strong preference for them...

The reliability concern is dealt with in two ways. Firstly according to jsdelivr [status](https://status.jsdelivr.com), it's uptime was 100% in 2023. So, that's not too bad.
The reliability concern is dealt with in two ways. Firstly according to jsdelivr [status](https://status.jsdelivr.com), its uptime was 100% in 2023. So, that's not too bad.

And if you specifiy the explicit dependance of the module you are using... actually, it gets waaaay better ... because when the CDN responds to an explicitly versioned request, it includes a bunch of headers which say "This artifact is immutable. Don't bother me about this again. Ever".
And if you specify the explicit dependence of the module you are using... actually, it gets waaaay better ... because when the CDN responds to an explicitly versioned request, it includes a bunch of headers which say "This artifact is immutable. Don't bother me about this again. Ever".

And the browser wqill respect that - next time you go ask for your dependancy, it simply loads it out of it's cache. There _is no network request_. Dependancy load time : 0ms, according to the browser network tools.
And the browser will respect that - next time you go ask for your dependency, it simply loads it out of its cache. There _is no network request_. Dependency load time: 0ms, according to the browser network tools.

It's tought to get faster than 0. Also, no request means no netork risk.
It's tought to get faster than 0. Also, no request means no network risk.

So, under "ideal" conditions:

- You are using a modern browser
- You are making the request for a second+ time
- You have explicitly specified the version of the dependancies you're using
- You have explicitly specified the version of the dependencies you're using

Dependancy resolution is both very reliable and very fast. What's cool - that cache survives redeployment. So your app is slow for the user the first time... but the cache survives a redeployment. It's fast afterwards. We can reword the statment as follows;
Dependency resolution is both very reliable and very fast. What's cool - that cache survives redeployment. So your app is slow for the user the first time... but the cache survives a redeployment. It's fast afterwards. We can reword the statement as follows;

> My users are now dependant on a CDN being available the first time they visit my site.
> My users are now dependent on a CDN being available the first time they visit my site.
Which is less scary given the historical uptime!
Which is less scary given the historical uptime!

0 comments on commit 68a53c0

Please sign in to comment.