# Articles — lijiabao.dev

> Tutorials, round-ups and explainers edited by lijiabao.dev. Not Li Jiabao's personal views.

URL: https://lijiabao.dev/en/articles/ · lang: en · Edited by lijiabao.dev — not Li Jiabao's personal views
Other language: https://lijiabao.dev/articles/index.md

Edited by lijiabao.dev

## Articles

Tutorials, round-ups and explainers, edited by lijiabao.dev. They are not Li Jiabao's personal views; his own views appear only under Views.

### [Why does Show password try to submit the form?](https://lijiabao.dev/en/articles/html-button-type-implicit-form-submit/)

Edited by lijiabao.dev · 2026-11-23

Trace an unexpected submission to the native button type, then test the password toggle and the real submit action separately.

### [Why does fetch skip catch when an API returns 404?](https://lijiabao.dev/en/articles/fetch-http-error-response-json-handling/)

Edited by lijiabao.dev · 2026-11-21

A 404 can resolve the fetch promise. Check the response status, body parsing and application result separately before choosing what an error message should say.

### [Can a native FAQ disclosure work with a keyboard?](https://lijiabao.dev/en/articles/native-details-summary-keyboard-access/)

Edited by lijiabao.dev · 2026-11-20

Check the native FAQ path from summary focus and the Space key to answer links, visible focus, and assistive technology support.

### [Why does the same PDF open in one tab and download in another?](https://lijiabao.dev/en/articles/pdf-preview-download-content-disposition/)

Edited by lijiabao.dev · 2026-11-19

Trace the final document response, compare a direct visit with a download link, and separate file naming from PDF rendering.

### [An old screen after Back: how page restoration differs from HTTP caching](https://lijiabao.dev/en/articles/bfcache-history-navigation-http-cache/)

Edited by lijiabao.dev · 2026-11-18

A restored page is different from a new HTTP response. Separate history navigation, live data checks, and authorization before treating an old screen as a deployment failure.

### [Why does text disappear while a web font loads?](https://lijiabao.dev/en/articles/web-font-display-text-visibility-loading/)

Edited by lijiabao.dev · 2026-11-16

Choose a web-font display policy by testing readable fallback text, late swaps and layout changes under cold-cache and failed-request conditions.

### [Image dimensions and aspect ratio: reserving space before pictures load](https://lijiabao.dev/en/articles/image-dimensions-aspect-ratio-layout-shift/)

Edited by lijiabao.dev · 2026-11-15

Reserve image space before decoding completes. A practical explanation of intrinsic dimensions, CSS aspect ratio, responsive crops and the limits of a single CLS test.

### [Image alt text and visible captions are different CMS outputs](https://lijiabao.dev/en/articles/image-alt-text-visible-caption-field-mapping/)

Edited by lijiabao.dev · 2026-11-13

Alternative text and visible captions serve different purposes. Trace CMS fields through templates and published HTML before removing unexpected image descriptions.

### [An ampersand in a sitemap needs XML escaping, not blanket URL encoding](https://lijiabao.dev/en/articles/sitemap-xml-escaping-url-percent-encoding/)

Edited by lijiabao.dev · 2026-11-07

XML escaping and URL percent encoding solve different problems in a sitemap. Preserve query semantics, serialize once per layer, then parse the deployed output back for verification.

### [Why npm ci fails on a clean checkout: check the lockfile and install conditions](https://lijiabao.dev/en/articles/npm-ci-lockfile-reproducible-install-boundaries/)

Edited by lijiabao.dev · 2026-11-06

Diagnose npm ci failures by checking the committed lockfile, tool versions, tree-shaping options, platform requirements and install stage before changing the project.

### [Why a blocked crawler may never see your noindex directive](https://lijiabao.dev/en/articles/robots-disallow-noindex-crawl-access/)

Edited by lijiabao.dev · 2026-11-05

Robots rules govern crawling, while noindex governs search inclusion. Check whether the intended crawler can fetch the directive before treating a configuration change as a search outcome.

### [HEAD returned 200. Why a live release still needs GET](https://lijiabao.dev/en/articles/http-head-vs-get-live-content-verification/)

Edited by lijiabao.dev · 2026-11-04

Use HEAD for response metadata and GET for delivery evidence. A practical release checklist for redirects, article bodies, assets, and cache observations.

### [Noopener, noreferrer and nofollow solve different link problems](https://lijiabao.dev/en/articles/external-link-noopener-noreferrer-nofollow/)

Edited by lijiabao.dev · 2026-11-03

Separate opener access, referral information and search relationship signals before choosing rel values. Verify rendered links and each intended behavior independently instead of applying one unexplained string everywhere.

### [Should a hero image use lazy loading? Start with LCP image discovery](https://lijiabao.dev/en/articles/lcp-hero-image-lazy-loading-discovery/)

Edited by lijiabao.dev · 2026-11-02

A small hero image can still arrive late. Identify the actual LCP element, inspect resource discovery, and distinguish eager loading, fetch priority, and preload before measuring a change.

### [The First Commit You Can See May Not Be the Project’s Beginning](https://lijiabao.dev/en/articles/git-shallow-history-earliest-commit-verification/)

Edited by lijiabao.dev · 2026-11-01

Check shallow history, available refs, commit dates and file lineage before using Git to establish a project or article timeline. Publication needs separate evidence.

### [Hidden, aria-hidden and inert solve different interface problems](https://lijiabao.dev/en/articles/hidden-aria-hidden-inert-visibility-accessibility/)

Edited by lijiabao.dev · 2026-10-31

Separate visual presentation, accessibility exposure and interaction when choosing hidden, aria-hidden or inert. Verify each behavior without treating hidden content as access control.

### [Renaming an image to .webp does not optimize it: verify the encoding and delivery](https://lijiabao.dev/en/articles/webp-extension-encoding-transfer-size-validation/)

Edited by lijiabao.dev · 2026-10-30

Verify an image conversion from the encoded file through the production page. Separate dimensions, compression choices, selected resources, file size, and measured network transfer.

### [A secret is in Git history. Why deleting the file does not finish the response](https://lijiabao.dev/en/articles/secret-in-git-history-revocation-and-removal/)

Edited by lijiabao.dev · 2026-10-29

Deleting a secret from the latest Git revision does not revoke it. Separate credential invalidation, service recovery, history cleanup, and evidence of what remains unverified.

### [Should every npm audit fix use --force? Review the change before trusting the result](https://lijiabao.dev/en/articles/npm-audit-fix-force-dependency-validation/)

Edited by lijiabao.dev · 2026-10-28

Separate dependency advisories, potentially breaking updates, reproducible installation and feature checks before treating an npm audit remediation as complete.

### [Choosing 301, 302, 307, or 308: methods and caching](https://lijiabao.dev/en/articles/http-redirect-status-method-and-cache/)

Edited by lijiabao.dev · 2026-10-27

Understand how redirect status codes affect request methods, caching and search signals before changing a URL.

### [no-cache does not mean no storage: tracing stale browser and CDN responses](https://lijiabao.dev/en/articles/cache-control-no-cache-browser-cdn-revalidation/)

Edited by lijiabao.dev · 2026-10-26

Separate storage, revalidation and cache layers when a deployed page still looks old. Understand ETag, 304 responses and the limits of browser reloads and targeted CDN purges.

### [An API opens in the browser. Why does fetch still fail with CORS?](https://lijiabao.dev/en/articles/cors-browser-navigation-versus-script-access/)

Edited by lijiabao.dev · 2026-10-25

Opening a URL and allowing a website to read its response are different operations. Trace origins, preflights, credentials and opaque responses without confusing browser access with backend authorization.

### [A missing frontend environment variable is not a reason to expose a secret](https://lijiabao.dev/en/articles/frontend-public-env-secrets-build-time-boundary/)

Edited by lijiabao.dev · 2026-10-24

Separate browser, build, and server settings before fixing missing values. Public prefixes make values available to client code; they do not protect credentials.

### [An API request timed out. Check the result before retrying.](https://lijiabao.dev/en/articles/api-timeout-retry-idempotency-result-lookup/)

Edited by lijiabao.dev · 2026-10-23

A timeout does not prove that a write failed. Understand idempotency contracts, preserve the original operation identity and reconcile uncertain outcomes before creating duplicates.

### [Ours or theirs? Read the operation before resolving a Git conflict](https://lijiabao.dev/en/articles/git-merge-conflict-ours-theirs-review/)

Edited by lijiabao.dev · 2026-10-22

Understand how merge and rebase label conflicting sides, preserve the intent of both changes, and review the staged result before treating a conflict as resolved.

### [After git push, verify which commit Cloudflare serves in production](https://lijiabao.dev/en/articles/git-commit-cloudflare-production-verification/)

Edited by lijiabao.dev · 2026-10-21

Match the remote commit, Cloudflare build and deployment, and exact production page before reporting a publication as complete.

### [Passing tests is a start: what proves a feature is complete?](https://lijiabao.dev/en/articles/passing-tests-versus-feature-acceptance-evidence/)

Edited by lijiabao.dev · 2026-10-20

Connect acceptance criteria to observable behavior, real dependencies, persisted data and the deployed revision. Report what passing tests actually establish.

### [Moving an article URL: redirects and canonical tags have different jobs](https://lijiabao.dev/en/articles/article-url-move-redirect-versus-canonical/)

Edited by lijiabao.dev · 2026-10-19

A permanent redirect moves requests; a canonical tag identifies a preferred version. Verify the destination, internal links and sitemap before calling an article URL move complete.

### [Robots.txt does not lock an admin page: verify access control separately](https://lijiabao.dev/en/articles/robots-txt-not-admin-access-control/)

Edited by lijiabao.dev · 2026-10-18

Separate crawler rules, search indexing, and authorization. Check actual responses for signed-out and different-role users, including APIs and files.

### [A 200 response does not prove an article was published](https://lijiabao.dev/en/articles/http-success-article-verification/)

Edited by lijiabao.dev · 2026-10-17

Verify the exact URL, main content, rendered page and production version before treating an HTTP 200 response as evidence of a successful article release.

### [Sitemap lastmod should not become today on every build](https://lijiabao.dev/en/articles/sitemap-lastmod-content-updates/)

Edited by lijiabao.dev · 2026-10-16

Separate meaningful page changes from deployment time, choose a trustworthy date source, and verify both changed and unchanged URLs in the built and live sitemap.

### [Hreflang and canonical for bilingual articles](https://lijiabao.dev/en/articles/bilingual-articles-hreflang-canonical/)

Edited by lijiabao.dev · 2026-10-15

Give each language page a clear preferred URL, connect genuine translations, and verify the built and live outputs before calling a release complete.

### [What is llms.txt? Format, examples and what Google says](https://lijiabao.dev/en/articles/what-is-llms-txt/)

Edited by lijiabao.dev · 2026-10-13

llms.txt is a proposed Markdown index of a site's key pages for AI agents. This guide covers the format, robots.txt, Google's stance and a live example.

[RSS feed](https://lijiabao.dev/en/articles/rss.xml)
