Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5997839
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:19:16+00:00 2026-05-23T00:19:16+00:00

I tried to figure it out looking at the source code but I couldn’t

  • 0

I tried to figure it out looking at the source code but I couldn’t figure it out.

I would like to know how to make a dynamic favicon with a count like Gmail does.

enter image description here

Any idea on how to do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T00:19:17+00:00Added an answer on May 23, 2026 at 12:19 am

    You can make an image with the canvas element, and then just replace the current favicon. Check out the following link for a good explanation on it.
    Reference

    Code is from the above reference.

    Markup

    <link id="favicon" rel="icon" type="image/png" href="image.png" /> 
    

    JS

      (function () {
        var canvas = document.createElement('canvas'),
            ctx,
            img = document.createElement('img'),
            link = document.getElementById('favicon').cloneNode(true),
            day = (new Date).getDate() + '';
        
        if (canvas.getContext) {
          canvas.height = canvas.width = 16; // set the size
          ctx = canvas.getContext('2d');
          img.onload = function () { // once the image has loaded
            ctx.drawImage(this, 0, 0);
            ctx.font = 'bold 10px "helvetica", sans-serif';
            ctx.fillStyle = '#F0EEDD';
            if (day.length == 1) day = '0' + day;
            ctx.fillText(day, 2, 12);
            link.href = canvas.toDataURL('image/png');
            document.body.appendChild(link);
          };
          img.src = 'image.png';
        }
        
        })();
    

    Edit

    Must have an image set as well.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Silly question, but I'm unable to figure out.. I tried the following in Ruby:
I've tried many functions already, but I simply can't figure this out. The right
I've tried searching but I can't figure out how to access data via a
I've tried looking at other answers for this but I can't seem to figure
I've been looking over this post, but still can't figure out how to solve
I tried looking but couldn't find any help. - (NSArray *)sushiTypes { return _sushiTypes;
Well I tried to figure out is this possible in any way. Here is
I have tried to figure out how to disable the header for a jqGrid,
I've tried my best and cannot figure out what happened here. It worked fine
Sorry, I'm sure this is simple but I'm tired and can't figure it out.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.