45

Pika CDN: Introducing a CDN for Modern JavaScript

 4 years ago
source link: https://www.tuicool.com/articles/3UzINnf
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Ij22IzJ.png!web

C

D

N

Introducing a CDN for modern JavaScript.

import {Component, render} from 'https://cdn.pika.dev/preact/v8';

Copied!

u6rYZju.png!web

100% Modern JavaScript

The Pika CDN was built to serve the 60,000+ npm packages written in ES Module (ESM) syntax. This module syntax runs natively in the browser, so you can build for the web without a bundler.

With our CDN, package authors can distribute more modern, unminified packages without worrying about how to serve them directly. Instead, our nifty package-builder automatically resolves each package -- and any legacy sub-dependencies -- into a single, minified, ready-to-import JavaScript file.

NEW!

Differential Serving

68.93% of global users can run modern JavaScript (ES2019) without a single polyfill or Babel plugin. Unfortunately, sites need to compile their deployed code to support legacy browsers. This adds slow polyfills and transpiler bloat for everyone.

Stop penalizing your users. The Pika CDN optimizes packages to each individual user. Older browsers get the polyfills they need while modern browsers get modern, bloat-free code and faster overall load times.

BROWSER USER-AGENT

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36

Ij22IzJ.png!web

Sending...

Always-Warm Caches

The Pika CDN leverages your browser's shared module cache for incredible performance. A package loaded on one site will be cached and reused for future visits to any CDN-powered site. This means fewer cold starts and faster load times as visitors arrive to your site with dependencies already loaded.

For example: Does your site usepreact, vue, orlodash? All three packages have already been prefetched by this page, meaning each would now take 0ms to load on any Pika CDN-powered site.

Commitment to Stability

The Pika CDN was designed for simplicity and stability. Packages are built ahead of time and served directly out of Amazon S3 and Google Storage. The CDN itself is just a fast, stateless proxy to these underlying resources. Simple, stable, boring... on purpose.

Love Pika? Go Pro!

Pika CDN will always be free, but you can support the project with a Pro Membership donation on Patreon. Get early access to upcoming production-only features like:

  • Granular Semver Matching & Version Pinning
  • Private Registry Support
  • Access to our Private, Global CDN
  • Audit Logs & Customer Support

Support us on Patreon →

Psst, Companies... We're looking for Sponsors! →

© 2019 ∙ TwitterGithub

OUTDATED BROWSERto use this site, you'll need to update your browser. check here for the latest version


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK