@commonshost/manifest
Manifest for HTTP Server Push
Last updated a year ago by seb .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @commonshost/manifest 
SYNC missed versions from official npm registry.

@commonshost/manifest

HTTP Server Push Manifest is a configuration format for web servers, CDNs, and web development tools.

Use the API or CLI tool to generate the manifest from static HTML, JS, and CSS files.

Manifest are supported natively by Commons Host. Manifests can be transpiled to many other servers and CDNs.

[
  {
    get: '/app.html',
    push: '/styles/design.css'
  },
  {
    get: '/styles/design.css',
    push: [
      '/images/logo.svg',
      '/images/banner.jpg',
      {
        url: '/fonts/Oswald-ExtraLight.otf',
        priority: 256
      },
      {
        url: '/ads/banner.png',
        priority: 1
      }
    ]
  }
]

Format

A manifest is a JSON array containing rules. Each rule is a JSON object containing a get and push property. These are the trigger and action respectively.

Trigger get

The pathname (URL) of a request. If this matches, the trigger fires its push action.

Action push

One or more resources to push from server to client. A push action has url and priority properties. The url value is a pathname of a local resource. The priority value is an integer from 1 through 256 and defaults to 16.

Supported Platforms

A manifest is an intermediary format which can be transpiled to the configuration syntax of CDN services or web servers.

CDN services: Commons Host (native), Cloudflare, Fastly, Netlify

Web servers: Apache, H2O, NGINX

Platforms: Node.js

Browsers: All modern web browsers support HTTP Server Push. The manifest is used from the server side.

Current Tags

  • 3.0.1                                ...           latest (a year ago)

21 Versions

  • 3.0.1                                ...           a year ago
  • 3.0.0                                ...           a year ago
  • 2.5.2                                ...           a year ago
  • 2.5.1                                ...           a year ago
  • 2.4.3                                ...           2 years ago
  • 2.4.2                                ...           2 years ago
  • 2.4.1                                ...           2 years ago
  • 2.4.0                                ...           2 years ago
  • 2.3.1                                ...           2 years ago
  • 2.3.0                                ...           2 years ago
  • 2.1.2                                ...           2 years ago
  • 2.1.1                                ...           2 years ago
  • 2.2.1                                ...           2 years ago
  • 2.2.0                                ...           2 years ago
  • 2.1.0                                ...           2 years ago
  • 2.0.0                                ...           2 years ago
  • 1.3.2                                ...           2 years ago
  • 1.3.1                                ...           2 years ago
  • 1.3.0                                ...           2 years ago
  • 1.2.0                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 23
Dev Dependencies (4)

Copyright 2014 - 2016 © taobao.org |