Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/honzahommer/request-favicon
An express.js middleware for handling noisy favicon.ico
https://github.com/honzahommer/request-favicon
express express-middleware favicon middleware nodejs npm request
Last synced: 2 days ago
JSON representation
An express.js middleware for handling noisy favicon.ico
- Host: GitHub
- URL: https://github.com/honzahommer/request-favicon
- Owner: honzahommer
- License: mit
- Created: 2017-07-15T11:06:59.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-30T17:13:47.000Z (almost 2 years ago)
- Last Synced: 2024-10-28T07:31:10.673Z (11 days ago)
- Topics: express, express-middleware, favicon, middleware, nodejs, npm, request
- Language: JavaScript
- Size: 1.44 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# request-favicon
[![npm version][npm-image]][npm-url]
[![npm download][downloads-image]][npm-url]
[![Build Status][travis-image]][travis-url]
[![Greenkeeper badge](https://badges.greenkeeper.io/honzahommer/request-favicon.svg)](https://greenkeeper.io/)> An express.js middleware for handling noisy favicon.ico
Modern browsers usually asks for favicon of the website. Having a favicon in a Web page is a good thing (normally).
However it is not always desired and sometime developers need a way to avoid the extra payload.
Nice way to handle that is to send 204 status code for `/favicon.ico` requests.
## Install
```sh
npm install request-favicon
```## Example
```javascript
const express = require('express');
const favicon = require('request-favicon');const app = express();
app.use(favicon());// Add your routes here, etc.
app.listen(3000);
```## License
[MIT](LICENSE)
[npm-image]: https://img.shields.io/npm/v/request-favicon.svg
[npm-url]: https://npmjs.org/package/request-favicon
[travis-image]: https://img.shields.io/travis/honzahommer/request-favicon/master.svg
[travis-url]: https://travis-ci.org/honzahommer/request-favicon
[downloads-image]: https://img.shields.io/npm/dm/request-favicon.svg