ë³´ì 컨í ì¤í¸: ì´ ê¸°ë¥ì ì¼ë¶ ëë 모ë ì§ì ë¸ë¼ì°ì ì ë³´ì 컨í ì¤í¸ (HTTPS)ììë§ ì¬ì©í ì ììµëë¤.
ìë¹ì¤ ì커ë ì¹ ìì© íë¡ê·¸ë¨, ë¸ë¼ì°ì , ê·¸ë¦¬ê³ (ì¬ì© ê°ë¥í ê²½ì°) ë¤í¸ìí¬ ì¬ì´ì íë¡ì ìë² ìí ì í©ëë¤. ìë¹ì¤ ì커ì ê°ë° ìëë ì¬ë¬ê°ì§ê° ìì§ë§, ê·¸ ì¤ììë í¨ê³¼ì ì¸ ì¤íë¼ì¸ ê²½íì ìì±íê³ , ë¤í¸ìí¬ ìì²ì ê°ë¡ì±ì ë¤í¸ìí¬ ì¬ì© ê°ë¥ ì¬ë¶ì ë°ë¼ ì ì í íëì ì·¨íê³ , ìë²ì ìì°ì ì ë°ì´í¸í ì ììµëë¤. ëí í¸ì ì림과 백그ë¼ì´ë ë기í APIë¡ì ì ê·¼ë ì ê³µí©ëë¤.
ìë¹ì¤ ì커ì ê°ë ê³¼ ì¬ì©ë²ìë¹ì¤ ì커ë ì¶ì²ì ê²½ë¡ì ëí´ ë±ë¡íë ì´ë²¤í¸ ê¸°ë° ì커ë¡ì JavaScript íì¼ì íí를 ê°ê³ ììµëë¤. ìë¹ì¤ ì커ë ì°ê´ë ì¹ íì´ì§/ì¬ì´í¸ë¥¼ íµì íì¬ íìê³¼ 리ìì¤ ìì²ì ê°ë¡ì± ìì íê³ , 리ìì¤ë¥¼ êµì¥í ì¸ë¶ì ì¼ë¡ ìºì±í ì ììµëë¤. ì´ë¥¼ íµí´ ì¹ ì±ì´ ì´ë¤ ìí©ìì ì´ë»ê² ëìí´ì¼ íëì§ ìë²½íê² ë°ê¿ ì ììµëë¤. (ì ì¼ ëíì ì¸ ìí©ì ë¤í¸ìí¬ë¥¼ ì¬ì©íì§ ëª»í ëì ëë¤.)
ìë¹ì¤ ì커ë ì커 ë§¥ë½ìì ì¤íë기 ë문ì DOMì ì ê·¼í ì ììµëë¤. ëí ì±ì 구ëíë 주 JavaScriptìë ë¤ë¥¸ ì¤ë ëìì ëìíë¯ë¡ ì°ì°ì ê°ë¡ë§ì§ ììµëë¤(ë ¼ ë¸ë¡í¹). ìë¹ì¤ ì커ë ì¨ì í ë¹ë기ì ì¼ë¡ ì¤ê³ëì¼ë©°, ê·¸ë¡ ì¸í´ ë기ì XHRì´ë ì¹ ì ì¥ì ë±ì API를 ìë¹ì¤ ì커 ë´ìì ì¬ì©í ì ììµëë¤.
ìë¹ì¤ ì커ë ë³´ì ìì ì´ì ë¡ HTTPSììë§ ëìí©ëë¤. ë¤í¸ìí¬ ìì²ì ìì í ì ìë¤ë ì ìì ì¤ê°ì 공격ì êµì¥í ì·¨ì½í기 ë문ì ëë¤. ëí Firefoxììë ì¬ìí ë³´í¸ ëª¨ëìì Service Worker APIì ì ê·¼í ì ììµëë¤.
ì°¸ê³ : ìë¹ì¤ ì커ë 모ë ê²ì ì¸ë¶ì ì¼ë¡ íµì í ì ìë¤ë ì ìì AppCache ë± ì¤íë¼ì¸ì´ë ìºìì ì´ì ìëë³´ë¤ ì°ì를 ì í©ëë¤. ìë¹ì¤ ì커ë ê°ë°ìì ìë를 ì§ìíì§ ìì¼ë©°, ì측과 ë¹ëê°ì ë ë§ê°ì§ì§ë ì기 ë문ì ëë¤.
ì°¸ê³ : ìë¹ì¤ ì커ë ìëµì 기ë¤ë¦° í ì±ê³µ ëë ì¤í¨ ì¡ì ì ì¤ííë ê²½ì°ê° ë§ì¼ë¯ë¡ íë¡ë¯¸ì¤ë¥¼ ì ê·¹ì ì¼ë¡ ì¬ì©í©ëë¤.
ë±ë¡ìë¹ì¤ ì커ë ServiceWorkerContainer.register()
ë©ìë를 ì¬ì©í´ ì²ì ë±ë¡í©ëë¤. ì±ê³µì ì¼ë¡ ë±ë¡í ê²½ì° í´ë¼ì´ì¸í¸ê° ìë¹ì¤ ì커를 ë¤ì´ë¡ëíê³ , ì¶ì² ì ì²´ì ëí´ í¹ì ê°ë°ìê° ì§ì í í¹ì 주ìë¤ì ëí´ì ìë¹ì¤ ì커ì ì¤ì¹ì íì±í(ìë 구í ì°¸ê³ )를 ìëí©ëë¤.
ìë¹ì¤ ì커를 ì´í´ë³´ë©´ ë¤ìê³¼ ê°ì ìëª ì£¼ê¸°ë¥¼ ë³¼ ì ììµëë¤.
ìë¹ì¤ ìì»¤ê° ì ì´íë ì¬ì´í¸/íì´ì§ì ì¬ì©ìê° ì²ì ì ê·¼íë ìê° ìë¹ì¤ ìì»¤ê° ì¦ì ë¤ì´ë¡ëë©ëë¤.
ìë¹ì¤ ì커ì ì ë°ì´í¸ë ë¤ì ê²½ì°ì ë°ìí©ëë¤.
ë¤ì´ë¡ëí íì¼ì´ ë ìë¡ì´ ë²ì ì¸ ê²½ì° ìë¹ì¤ ì커ì ì¤ì¹ë¥¼ ìëí©ëë¤. ë²ì ë¹êµë 기존 ìë¹ì¤ ì커 íì¼ê³¼ì ë°ì´í¸ ë¨ì ë¹êµ 결과를 ì¬ì©í©ëë¤. ì´ íì´ì§/ì¬ì´í¸ìì ìë¹ì¤ ì커를 ì²ì ë°ê²¬í ê²½ì°ìë "ìë¡ì´ ë²ì "ì¼ë¡ ì·¨ê¸í©ëë¤.
기존 ìë¹ì¤ ìì»¤ê° ìì¼ë©´ ì¤ì¹ë¥¼ ìëíê³ , ì¤ì¹ë¥¼ ì±ê³µíë©´ íì±íí©ëë¤.
기존ì ìë¹ì¤ ìì»¤ê° ì¡´ì¬íë ê²½ì°, ìë¡ì´ ë²ì ì 백그ë¼ì´ëìì ì¤ì¹íì§ë§ íì±íë ìì§ íì§ ììµëë¤. ì´ ìì ì ì커를 ë기 ì¤ì¸ ì커ë¼ê³ ë¶ë¦
ëë¤. ë기 ì¤ì¸ ì커ë ì´ì ë²ì ì ìë¹ì¤ ì커를 ì¬ì©íë íì´ì§ê° 모ë ë«í ê²½ì° íì±íëì´ íì± ìì»¤ê° ë©ëë¤. ServiceWorkerGlobalScope.skipWaiting()
ì ì¬ì©í´ íì±í ì 차를 ë 빨리 ììí ì ìì¼ë©°, ìë¡ì´ íì± ì커ë Clients.claim()
ì ì¬ì©í´ ì´ì íì´ì§ë¥¼ íìí ì ììµëë¤.
ìëª
주기 ì¤ ë°ìíë ì´ë²¤í¸ ì¤ íëë install
ì´ë²¤í¸ì
ëë¤. ì´ ì´ë²¤í¸ì ëíì ì¸ ì¬ì© ë°©ë²ì, ì를 ë¤ë©´ ë´ì¥ ì ì¥ì API를 ì¬ì©í´ ìºì를 ë§ë¤ê³ , ì¤íë¼ì¸ ìí©ìì ì¬ì©í ìì°ì ì¤ë¹íë ë±, ìë¹ì¤ ì커ì ì¬ì©ì ì¤ë¹íë ê²ì
ëë¤.
activate
ì´ë²¤í¸ë ììµëë¤. activate
ì ìì ììë 과거ì ìºì를 ì§ì°ê³ , 구ë²ì ìë¹ì¤ ì커ì ê´ë ¨ë í목ì ì²ìíë ë± ì¬ë¬ê°ì§ë¥¼ ì 리í기ì ì¢ìµëë¤.
ìë¹ì¤ ì커ë FetchEvent
ì´ë²¤í¸ë¥¼ ì¬ì©í´ ìì²ì ìëµí ì ììµëë¤. FetchEvent.respondWith()
ë©ìë를 ì¬ì©í´ ìì²ì ëí ìëµì ìíë ë°©ìì¼ë¡ ìì ë¡ê² ë°ê¾¸ì¸ì.
ì°¸ê³ :
install
ê³¼activate
ì´ë²¤í¸ ì²ë¦¬ë ìê°ì´ 꽤 걸릴 ìë ì기ì, ìë¹ì¤ ì커 ëª ì¸ëwaitUntil()
ë©ìë를 ì ê³µí©ëë¤.install
ì´ëactivate
ììwaitUntil()
ì í¸ì¶íë©´ì 매ê°ë³ìë¡ íë¡ë¯¸ì¤ë¥¼ ì ê³µíë©´, ì±ê³µì ì¼ë¡ ì´íí기 ì ê¹ì§ë ê¸°ë¥ ì´ë²¤í¸ê° ë°ìíì§ ììµëë¤.
기본ì ì¸ ì²« ìë¹ì¤ ì커를 차근차근 ë§ëë ë°©ë²ì ìë¹ì¤ ì커 ì¬ì©í기ìì ì½ì´ë³¼ ì ììµëë¤.
ë¤ë¥¸ ì¬ì©ë² ìì´ëì´ìë¹ì¤ ì커ì ì¤ê³ë ë¤ìê³¼ ê°ì ì©ëë¡ ì¬ì©íë ê²ë ê°ìíìµëë¤.
미ëì ìë¹ì¤ ì커ë ì¹ íë«í¼ì´ ë¤ì´í°ë¸ ì±ì ë¥ë ¥ì ë³´ë¤ ê·¼ì íëë¡ ì¬ë¬ ê°ì§ ì ì©í 기ë¥ì ìíí ì ìì ê²ì ëë¤. í¥ë¯¸ë¡ê²ë ë¤ë¥¸ ëª ì¸ììë ìë¹ì¤ ì커 ë§¥ë½ì ì¬ì©í ì ìì¼ë©°, ì´ë¯¸ ë¤ìê³¼ ê°ì ê³³ìì ì¬ì©íê³ ììµëë¤.
Cache
Experimental
ServiceWorker
ìëª
주기ì ì¼ë¶ë¡ì ìºìëë Request
/ Response
ê°ì²´ ìì ì ì¥ì를 ëíë
ëë¤.
CacheStorage
Experimental
Cache
ê°ì²´ì ì ì¥ì를 ëíë
ëë¤. ServiceWorker
ê° ì ê·¼í ì ìë 모ë ì ëª
ìºìì 주 ëë í 리를 ì ê³µíë©°, Cache
ê°ì²´ë¥¼ ê°ë¦¬í¤ë 문ìì´ ì´ë¦ì ë§µíë ê´ë¦¬í©ëë¤.
Client
Experimental
ìë¹ì¤ ì커 í´ë¼ì´ì¸í¸ì ë²ì를 ëíë
ëë¤. ìë¹ì¤ ì커 í´ë¼ì´ì¸í¸ë ë¸ë¼ì°ì ë§¥ë½ììì 문ìì´ê±°ë, íì±íë ìì»¤ê° ì ì´íë SharedWorker
ì
ëë¤.
Clients
Experimental
Client
ê°ì²´ì 목ë¡ì ëíë
ëë¤. Clientsë íì¬ ì¶ì²ì íì± ìë¹ì¤ ì커 í´ë¼ì´ì¸í¸ì ì ê·¼íë 주ì ë°©ë²ì
ëë¤.
ExtendableEvent
Experimental
ìë¹ì¤ ì커 ìëª
주기ì ì¼ë¶ë¡ì ServiceWorkerGlobalScope
ìì ë°ìíë install
ê³¼ activate
ì´ë²¤í¸ì ì§ììê°ì ë립ëë¤. ì´ë¡ì¨ ë°ì´í°ë² ì´ì¤ ì¤í¤ë§ë¥¼ ì
ê·¸ë ì´ëíê±°ë, ë§ë£ë ìºì í목ì ì§ì°ë ìì
ë±ì´ ëë기 ì ê¹ì§ FetchEvent
ì ê°ì ê¸°ë¥ ì´ë²¤í¸ê° ServiceWorker
ë¡ ì ë¬ëì§ ìëë¡ í©ëë¤.
ExtendableMessageEvent
Experimental
The event object of a message
event fired on a service worker (when a channel message is received on the ServiceWorkerGlobalScope
from another context) â extends the lifetime of such events.
FetchEvent
Experimental
The parameter passed into the ServiceWorkerGlobalScope.onfetch
handler, FetchEvent
represents a fetch action that is dispatched on the ServiceWorkerGlobalScope
of a ServiceWorker
. It contains information about the request and resulting response, and provides the FetchEvent.respondWith()
method, which allows us to provide an arbitrary response back to the controlled page.
InstallEvent
Experimental
The parameter passed into the oninstall
handler, the InstallEvent
interface represents an install action that is dispatched on the ServiceWorkerGlobalScope
of a ServiceWorker
. As a child of ExtendableEvent
, it ensures that functional events such as FetchEvent
are not dispatched during installation.
NavigationPreloadManager
Experimental
Provides methods for managing the preloading of resources with a service worker.
Navigator.serviceWorker
Returns a ServiceWorkerContainer
object, which provides access to registration, removal, upgrade, and communication with the ServiceWorker
objects for the associated document.
NotificationEvent
Experimental
The parameter passed into the onnotificationclick
handler, the NotificationEvent
interface represents a notification click event that is dispatched on the ServiceWorkerGlobalScope
of a ServiceWorker
.
ServiceWorker
Experimental
Represents a service worker. Multiple browsing contexts (e.g. pages, workers, etc.) can be associated with the same ServiceWorker
object.
ServiceWorkerContainer
Experimental
Provides an object representing the service worker as an overall unit in the network ecosystem, including facilities to register, unregister, and update service workers, and access the state of service workers and their registrations.
ServiceWorkerGlobalScope
Represents the global execution context of a service worker.
ServiceWorkerMessageEvent
ì§ìì´ ì¤ë¨ëììµëë¤
Represents a message sent to a ServiceWorkerGlobalScope
. Note that this interface is deprecated in modern browsers. Service worker messages will now use the MessageEvent
interface, for consistency with other web messaging features.
ServiceWorkerRegistration
Experimental
Represents a service worker registration.
ServiceWorkerState
Experimental
Associated with its ServiceWorker
's state.
SyncEvent
ë¹íì¤
The SyncEvent interface represents a sync action that is dispatched on the ServiceWorkerGlobalScope
of a ServiceWorker.
SyncManager
ë¹íì¤
Provides an interface for registering and listing sync registrations.
WindowClient
Experimental
Represents the scope of a service worker client that is a document in a browser context, controlled by an active worker. This is a special type of Client
object, with some additional methods and properties available.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4