URL パーサー・エンコーダー
URL をプロトコル、ホスト、パス、クエリパラメーターに分解し、テキストをパーセントエンコードまたはデコードします。
ブラウザ内だけで動作します。入力した内容はどこにもアップロードされません。
パラメーター値ひとつにはコンポーネント、アドレス全体をエスケープしつつ / ? # & = を読みやすく残したい場合は URI 全体を使います。
https%3A%2F%2Fwww.ryuslog.com%2Fblog%3Fcategory%3DTypeScript%26tag%3Dtypes%2Bgenerics%26page%3D2%23results
- プロトコル
- https:
- ホスト
- www.ryuslog.com
- パス
- /blog
- ハッシュ
- #results
| キー | 生の値 | デコード値 |
|---|---|---|
| category | TypeScript | TypeScript |
| tag | types+generics | types generics |
| page | 2 | 2 |
URL の予約文字
クイックリファレンス- %20
- 空白のエンコードです。クエリ文字列では多くのフォームパーサーが + も空白として読みます。
- %2F %3F %23
- スラッシュ、疑問符、ハッシュのエンコードです。この3文字はそのままだと URL の構造を変えてしまいます。
- %26 %3D
- アンパサンドと等号のエンコードです。パラメーター値の中ではクエリが分割されないようこの形で書きます。
- encodeURIComponent
- パラメーター値ひとつをエスケープし、/ ? # & = も処理するのでクエリ値に適しています。
- encodeURI
- URL の構造文字をそのまま残します。値ひとつではなく URL 全体に使う関数です。
- new URL(input)
- protocol、host、pathname、searchParams、hash を取り出せる標準パーサーです。
Next.js の関連文法ガイド
Next.js のガイドをすべて見るNext.js Server Actions: Swallowed Redirects and Body Limits
redirect() throws, so a try/catch swallows the navigation; the action body parser has a 1 MB limit; and useActionState cannot hold an Error. Fixes for all three.
Next.jsSupabase SSR on Next.js: Stale Sessions and Lock Timeouts
The session flips between signed-in and signed-out because the refreshed token is written to a cookie store that no longer exists. Adapter, proxy and lock fixes.
Next.jsNext.js Standalone in Docker: Missing CSS and sharp Module Errors
output standalone copies server.js only, so /_next/static and public are missing and every page renders unstyled. The image and copy fixes, plus the sharp native binding error.
Next.jsNext.js 16 Upgrade: Async Params, proxy.ts, and Turbopack Build Breaks
The codemod gets you most of the way; the rest is async request APIs, a webpack config Turbopack refuses, and a renamed middleware file that silently stops running.