How to add icons to the JS and CSS files in the urls?

0

I have seen that some pages have the favicon of the page in the urls, of the JS and CSS files.

I would like to know how to achieve it.

I know it's a strange or crazy question, or how you want to see it, but I would like to know how to do it with htaccess.

Thanks in advance.

    
asked by Eddy Otsutsuki 10.03.2017 в 05:14
source

1 answer

1

Place the file with your icon in the root directory of your site, with the peculiarity that it should be called favicon.ico and must have the format ico . This file is automatically requested by browsers and applies to all files of the domain.

If you want to use an image with another format to your pages you can use the following meta tag:

<link rel="icon" type="image/png" href="http://example.com/mi_image.png">

And it is recommended that the image be small and square. The most common dimensions are 16x16, 32x32, 64x64 px.

You can use online converters to create a favicon from an image. Some places where you can do it are the following:

answered by 10.03.2017 / 15:54
source