TIL
12/28
닉네임이 멋이 중헌디
2023. 12. 28. 23:58
server-favicon
https://www.npmjs.com/package/serve-favicon
serve-favicon
favicon serving middleware with caching. Latest version: 2.5.0, last published: 6 years ago. Start using serve-favicon in your project by running `npm i serve-favicon`. There are 2701 other projects in the npm registry using serve-favicon.
www.npmjs.com
var express = require('express')
var favicon = require('serve-favicon')
var path = require('path')
var app = express()
app.use(favicon(path.join(__dirname, 'public', 'favicon.ico')))
// Add your routes here, etc.
app.listen(3000)
색인 요청을 해야 함
robots.txt에 disallow, allow를 두어서 크롤러가 접근할 수 있는 페이지를 명시한다
apple-touch-icon
1. ios
기본 아이폰이 제공하는 UI 처리 사용시
<link rel="apple-touch-icon" href="/이미지경로/icon.png" />
기본 아이폰이 제공하는 UI 처리 미사용시
<link rel="apple-touch-icon-precomposed" href="/이미지경로/icon.png" />
2. Android
<link rel="shortcut icon" href="/이미지경로/icon.png" />
* 사진 사이즈
아이폰 - 57 * 57
아이패드 - 72 * 72
아이폰4 - 114 * 114
안드로이드 - 72 * 72