Code Monkey home page Code Monkey logo

faviconlocator's Introduction

FavIcon Locator Service

About

Finding out the favicon of a site is a bit of a pain. You have to hit the site and look for the link tag in the HTML, if that exists, you have to go try to get the destination object, if that 404's or there wasn't a link tag you can look at /favicon.ico and see if it's there. All in all, to render a highly performant page, you don't want to do all of that.

This service provides two highly cached services. Firstly you can use it instead of a favicon and it will return the image, meaning that you can render an img tag in HTML with it, and the users browser will do all that work. This alone is not unique, there are at least 3 other services that do this. But the extra service provided here is that you can also merely ask the service where the destination sites favicon is actually located, and it will tell you, in json, xml, html, or plain-text as you wish.

Examples

IMG

(TODO) <img src="http://faviconlocator.appspot.com/img/www.guardian.co.uk">

JSON

http://faviconlocator.appspot.com/json/www.guardian.co.uk => {"location": "www.guardian.co.uk/favicon.ico"}

JSONP

(TODO) http://faviconlocator.appspot.com/json/www.guardian.co.uk?callback=f1 => f1({"location": "www.guardian.co.uk/favicon.ico"});

XML

http://faviconlocator.appspot.com/xml/www.guardian.co.uk => <favicon><location>www.guardian.co.uk/favicon.ico</location></favicon>

faviconlocator's People

Contributors

bruntonspall avatar

Watchers

Mahdi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.