What is the purpose of a Service Worker in web development?
-
A
Handles server-side database connections
-
B
Runs in the background to enable offline caching, push notifications, and background sync
-
C
Manages CSS animations on a separate thread
-
D
Validates HTML forms before submission