Get started with faviconx CDN

MIT licensed

Favicon.js is a lightweight library for automatically installing and managing website icons in the browser.

Tags:
  • progress bar
  • javascript
  • vanilla
  • browser tab

Stable version

Copied!

How to start using faviconx CDN


<!DOCTYPE html>
<html>
<head>
  <title>Get started with faviconx CDN - cdnhub.io</title>
  <link rel="icon" type="image/png" sizes="16x16" href="logo16.png">
  <link rel="icon" type="image/png" sizes="32x32" href="logo32.png">
  <link rel="icon" type="image/png" sizes="96x96" href="logo96.png">
  <link rel="icon" type="image/png" sizes="128x128" href="logo128.png">
  <link rel="icon" type="image/png" sizes="192x192" href="logo192.png">
  <link rel="icon" type="image/png" sizes="512x512" href="logo512.png">
  <script src="https://cdn.cdnhub.io/faviconx/1.0.1/faviconx-min.js"></script>
  <script>
    document.addEventListener('DOMContentLoaded', () => {
      const icons = [
        { size: '16x16', url: 'logo16.png' },
        { size: '32x32', url: 'logo32.png' },
        { size: '96x96', url: 'logo96.png' },
        { size: '128x128', url: 'logo128.png' },
        { size: '192x192', url: 'logo192.png' },
        { size: '512x512', url: 'logo512.png' },
      ];

      favicons.init('Faviconx Example', icons);
    });
  </script>
</head>
<body>
  <h1>Welcome to Faviconx Example</h1>
</body>
</html>
Copied!
Copied!

All versions