Live Table: https://diafygi.github.io/webcrypto-examples/
I couldn't find anywhere that had clear examples of WebCryptoAPI, so I wrote examples and made a live table with them. Pull requests welcome!
- generateKey | importKey |
// https://www.netlify.com/blog/2017/07/18/http/2-server-push-on-netlify/ | |
const debug = require('debug')('nuxt:netlify-http2-server-push'); | |
const path = require('path'); | |
const glob = require('glob'); | |
const fs = require('fs'); | |
module.exports = function module(moduleOptions) { | |
// This module is only enabled on production builds | |
if (this.options.dev) { |
Live Table: https://diafygi.github.io/webcrypto-examples/
I couldn't find anywhere that had clear examples of WebCryptoAPI, so I wrote examples and made a live table with them. Pull requests welcome!
<script> | |
import { usePersistedRef } from "./usePersistentRef"; | |
export default { | |
setup() { | |
const name = usePersistedRef('name', 'Jake Dohm') | |
} | |
} | |
</script> |
The package that linked you here is now pure ESM. It cannot be require()
'd from CommonJS.
This means you have the following choices:
import foo from 'foo'
instead of const foo = require('foo')
to import the package. You also need to put "type": "module"
in your package.json and more. Follow the below guide.await import(…)
from CommonJS instead of require(…)
.Priority Hints is rolling out to Chrome in the 101 release which is currently available in the Dev/Beta channel of Chrome and available in WebPageTest when using the Chrome Canary
browser selection.
To make it easier to experiment with priority hints (particularly for LCP images) without making production changes, I set up a couple of public Cloudflare Workers that can be used dynamically with WebPageTest to inject priority hints into existing pages and to preload arbitrary images when combined with WebPageTest's overrideHost
script command.
There is a cloudflare worker at hint.perf.workers.dev
that will take a CSS selector from the x-hint
HTTP header and add fetchpriority=high
to any elements in the HTML that match the selector. The easiest way to experiment with this is to use Chrome's dev tools locally, identify the element that hosts the imag