Comments (4)
Hi @jthegedus.
I made the switch after an unpkg bug broke redirect URLs (see mjackson/unpkg#156). Bugs happen, but this particular one took a long time to fix and was very hard to verify that the fix worked for everyone. As I mentioned in the linked issue:
Moving forward, I have decided to change the CDN links listed in my packages from unpkg.com to jsdelivr.com as a result of these redirect issues. As much as I appreciate unpkg.com and the unique "automated CDN from NPM" offering it pioneered, jsDelivr offers similar automated CDN services for npm packages along with additional features like support for GitHub repos, package statistics, automatic bundling and minification, and subresource integrity checks.
The only hiccup I've experienced is that jsDelivr content is cached longer on both the server and the client, so getting the latest version immediately after release requires extra fiddling or patience. I mentioned this in a jsDelivr issue (jsdelivr/jsdelivr#18124) to which I received this helpful response from @MartinKolarik:
The approach taken by unpkg almost completely eliminates client side caching because your browser makes a request for each file every minute. If there wasn't a new version, the file content isn't transferred again, but there's still the cost of making all those requests, and it can have a significant impact on the performance of your website.
Makes sense, so I now do the following:
- I use unpkg when I am using a version redirect URL (e.g.
@latest
,@1
,@1.2
) in development to ensure I'm getting the very latest version. - I use jsdelivr when I am using a version redirect URL in production or specifying a version (e.g.
@1.2.3
)
Seems to be working well so far. 😄
from docsify-themeable.
Very useful information. Thanks again for taking the time to formulate such a useful answer 😄 It'd probably be useful to have a comparison in Docsify.
from docsify-themeable.
You bet. Happy to help.
FWIW, I've filed an issue (docsifyjs/docsify#756) suggesting the maintainers consider making the same switch. It's easy enough for folks to choose jsDelivr over unpkg on their own if they are aware of it, but I suspect many docsify users blindly copy-paste the links provided in the docs.
from docsify-themeable.
Your are 100% correct. I'm aware of unpkg, but was not aware of the differences between CDNs so blindly used unpkg. I think recommending unpkg during development and jsdelivr for prod stability is the way to go.
from docsify-themeable.
Related Issues (20)
- The drop-down arrow does not appear when using "routerMode: 'history'" HOT 2
- Changing the padding (top/bottom) on "blockquote" HOT 2
- expand/collapse icons in the sidebar not working when external link present HOT 3
- Browser console reports an uncaught error HOT 2
- Sidebar not aligning to left of page HOT 1
- sidebar not aligned between file and folder classes HOT 2
- Inactive chevron in multilevel menu show up as active HOT 6
- Inactive chevron in multilevel menu show up as active HOT 3
- Page content is not using all available space on large screens HOT 1
- Unexpected style of title when I come to the third level of the sidebar HOT 1
- Can we make the sidebar arrow in theme-simple point right if it has multiple sidebar .md files HOT 1
- On a phone brower, when touching any sidebar contents, the sidebar will hide automatically. HOT 5
- Top level sidebar items should always be collapsible HOT 2
- Table in small screens will render with CSS attribute `content`
- Switch button for dark/light mode HOT 2
- In the cover page Custom background is invalid HOT 5
- Quotation Marks Inconsistent HOT 5
- Unexplained 'TypeError: Attempted to assign to readonly property.' console error message HOT 8
- Keyboard focus is not visible at Hamburger menu present at the UI.
- "onlyCover: true" spinner is not removed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docsify-themeable.