-- select 에는 placeholder 가 없다 → 값이 "" 인 첫 option 이 그 노릇을 한다
placeholderOption :: String -> Option
placeholderOption label = Option { value = "", disabled = True, hidden = True, text = label }
valid :: Select -> Bool
valid s = not (required s) || value s /= "" -- required 면 placeholder label option 으로는 제출이 막힌다
-- React: <option selected> 대신 <select defaultValue="">
html
<head />
구조화된 데이터
- Using Structured Data to Enhance Search Engine Optimization | CSS-Tricks
- Understand How Structured Data Works | Google Search Central
lang
favicon
- How to Favicon in 2021: Six files that fit most needs — Martian Chronicles, Evil Martians’ team blog
- How to Create a Favicon That Changes Automatically | CSS-Tricks
- Emojis as Favicons | CSS-Tricks
- We Analyzed 425,909 Favicons • iconmap.io1
Microdata
attributes
Footnotes
-
다양한 관점에서 파비콘을 분석한 글 ↩
자동완성 기능은 편리할수도 있지만 비활성화가 필요한 경우도 있다. 하지만 chrome에서 무시되는 경우가 있는데…이게 거의 된다 지금은 안된다…되는 것 같다…이렇게 변질이 되는 것 같다.
- html - Disabling Chrome Autofill - Stack Overflow1
- Disabling autofill in Chrome | Codementor2
- How to turn off form autocompletion - Web security | MDN
- The Autofill Dark Pattern — Smashing Magazine
Footnotes
-- 새로고침 때 스타일이 붙기 전 default 가 한 프레임 보인다: 파서를 멈추는 것 ≠ paint 를 멈추는 것
-- render-blocking 등록 창은 <body> 가 열리기 전까지다 — "head 안에" 가 아니라 body == null
-- 그래서 컴포넌트 마크업 안이면 이미 늦다
allowsRenderBlocking :: Document -> Bool
allowsRenderBlocking doc = isNothing (body doc)
addBlocking :: Element -> Document -> Document
addBlocking el doc
| allowsRenderBlocking doc = register el doc
| otherwise = doc -- 실패 없이 무시: 로그도 el.blocking 도 앞뒤가 같다
-- 갈리는 건 첫 페인트 시각 하나
works :: Fcp -> ResponseEnd -> Bool -- first-contentful-paint, slow.js 의 responseEnd
works fcp done = fcp >= done
-- 실측 (Chrome 154, slow.js 800ms): <head> 836 ≥ 816 ✓ · <body> 16 < 807 ✗
-- 다크 테마 흰 화면은 다른 축이다: 서버가 사용자 상태를 몰라 기본값으로 렌더했다
-- 서버가 낸 HTML 자체가 이미 다른 값이라 렌더를 막아도 안 고쳐진다 → 첫 페인트 전 인라인 스크립트, 594