npm.io
0.2.0 • Published 9 years ago

webp.js

Licence
MIT
Version
0.2.0
Deps
0
Vulns
0
Weekly
0
Stars
30

webp.js

npm Build Status Coverage Status

webp.js is a library for webp detection.

Here's an example:

var webpjs = require('webp.js');
if (webpjs()) {
  //do something
}

By using cookie, you can process your images at the backend.

var webpjs = require('webp.js');
if (webpjs({ type:'cookie' })) {
  //do something
}

Get the cookies at the backend, if the value of webp is 1, that means current browser support webp.

Keywords