100% 브라우저 메모리 연산 • 서버 로그 수집 제로 • 즉각적인 실행
Curious Techie개발자 툴박스
Encodings & FormatsIETF RFC 3986 / WHATWG URL Living Standard✓ 빠른 조회 매트릭스 표 (6 개 항목) • KO

URL 및 URI 구성 요소 표준 레퍼런스 (RFC 3986)

Scheme, Authority, Path, Query String, Fragment 및 퍼센트 인코딩

CT
Curious-Techie Engineering Team검증된 작성자

Web Protocols & Security Architecture Research

발행일:
•
수정일:
•6 min read
공식 기술 규격:RFC 9110(IETF)
검토자: Curious-Techie Architecture Peer Review Group

개요 및 범위

RFC 3986 표준은 인터넷상의 모든 자원을 모호함 없이 고유하게 식별하고 탐색하기 위한 표준 문법을 정의합니다.

표준 규격표 및 매트릭스

키워드, 상태 코드 또는 지시문 이름으로 실시간 검색

키 / 코드정의 및 세부사항GEO 시맨틱 계층표준 규격 및 참고
scheme
Scheme

Identifies the protocol used to access the resource (e.g. https, http, mailto, ftp, file).

https://
●Scheme
↳URL component
↳transport protocol
↳top-level URI scheme
RFC 3986 §3.1

Case-insensitive; followed by a colon (:). Must begin with a letter.

host
Host

Identifies the network host providing the resource, either as a domain name (FQDN) or an IP address.

api.example.com or [2001:db8::1]
●Host
↳URL component
↳authority
↳network destination hostname or IP
RFC 3986 §3.2.2

IPv6 addresses in URLs must be enclosed within square brackets [].

port
Port

Designates the transport layer port number; defaults to 80 for HTTP and 443 for HTTPS if omitted.

:8080
●Port
↳URL component
↳authority
↳network listening socket port
RFC 3986 §3.2.3

Preceded by a colon (:). Ranges from 0 to 65535.

path
Path

Contains data, usually organized in hierarchical slash-separated segments, identifying the specific resource.

/v1/users/42
●Path
↳URL component
↳hierarchical route
↳resource filesystem path
RFC 3986 §3.3

Preceded by a slash (/). Web servers on Linux treat paths with strict case sensitivity.

query
Query String

Contains non-hierarchical data that, along with path data, serves to identify a resource.

?sort=asc&page=2
●Query
↳URL component
↳parameters
↳key-value search parameters
RFC 3986 §3.4

Preceded by a question mark (?). Delimited by ampersands (&). Transmitted to server.

fragment
Fragment (#)

Provides direction to a secondary resource or anchor offset within the primary resource.

#section-3
●Fragment
↳URL component
↳client anchor
↳browser document scroll target
RFC 3986 §3.5

Preceded by a hash (#). NEVER sent to the web server over the wire; parsed exclusively by the client browser.

기술 예제 및 실행 코드

Parsing URL Components with JavaScript URL API

javascript코드 복사
const url = new URL('https://alex:secret@api.example.com:8443/v1/users?role=admin#profile');

console.log(url.protocol); // 'https:'
console.log(url.username); // 'alex'
console.log(url.hostname); // 'api.example.com'
console.log(url.port);     // '8443'
console.log(url.pathname); // '/v1/users'
console.log(url.search);   // '?role=admin'
console.log(url.searchParams.get('role')); // 'admin'
console.log(url.hash);     // '#profile' (Never sent to backend servers!)

Modern browsers and Node.js provide the standardized WHATWG URL class for safe, deterministic URL parsing.

자주 묻는 질문 (FAQ)

표준 규격 Q&A

Is the URL fragment (#) sent to the web server?↓
No! According to RFC 3986, the fragment is processed exclusively on the client side (e.g. scrolling the viewport to an ID element). Browsers strip the fragment before sending the HTTP request packet.