Skip to content

bipio-server/node-favitest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NOTICE: This repository has been DEPRECATED. Do not use.

node-favitest

Returns a fully resolved Favicon URL from any URL and URI Schema.

Falls through from parsed HTML headers, then HTTP response headers, then default /favicon.ico. When a URL has been derived, it is confirmed with a HTTP HEAD request after following any redirects. When all else fails, does same for explicit domain name.

Callback produces an error, resolved URL, file suffix, mime type and domain name

Enjoy.

Installation

npm install favitest

Usage

var favitest = require('favitest');

favitest(
  'https://github.com/bipio-server/node-favitest',
  function(err, url, suffix, mime, domain) {
    console.log(arguments);
  }
);

Will produce :

{
  '0': false,
  '1': 'https://assets-cdn.github.com/favicon.ico',
  '2': '.ico',
  '3': 'image/x-icon',
  '4': 'github.com'
}

License

GPLv3

Copyright (c) 2014-2015 WoT.IO inc

About

Diligently Resolves a Favicon URL

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published