Using service workers to implement offline support in a Web application

Loading...
Thumbnail Image

URL

Journal Title

Journal ISSN

Volume Title

Perustieteiden korkeakoulu | Master's thesis
Ask about the availability of the thesis by sending email to the Aalto University Learning Centre oppimiskeskus@aalto.fi

Department

Major/Subject

Mcode

SCI3042

Language

en

Pages

57 + 10

Series

Abstract

The growth of mobile use on the Web has increased significantly. Characteristic for mobile devices is that their connection quality may vary. This is why Web applications should provide meaningful functionality when users are offline or suffer from slow connectivity. Service workers are a technology that allows a Web application to function without an Internet connection. This thesis examines how service workers should be used to implement offline support in an existing Web application. Service workers prove to be a very capable technology and can handle a large number of use cases related to offline use. Service workers can also help improve application performance by reducing response times for resources. Service workers require HTTPS, and any requests that are cached should be GET requests. While service workers do not enforce any specific application structure, some architecture, like the application shell architecture, can be beneficial. Because of lacking browser support, service workers should not be relied on, and should instead be considered an enhancement. Service workers are a somewhat complex technology, and may take some time to learn. Working with varying browser storage sizes may also impose a challenge.

Mobilanvändning på Webben har ökat mycket. Betecknande för mobilenheter är att deras anslutningskvalitet kan variera. Därför borde webbapplikationer funktionera meningsfullt även när användare är utan Internetanslutning eller lider av en långsam anslutning. Service workers är en teknologi som möjliggör att en webbapplikation kan funktionera utan en Internetanslutning. Detta arbete undersöker hur service workers borde användas för att implementera offline-stöd till en existerande webbapplikation. Service workers bevisar sig att vara en mycket kapabel teknologi som kan användas i många olika användningsfall relaterade till offline-användning. Service workers kan också förbättra en webbapplikations prestation genom att minska responstiden för resurser. Service workers kräver HTTPS, och alla begäran som skall sparas i cache borde var GET-begäran. Service workers tvingar inte någon viss struktur på webbapplikationen, men någon arkitektur, som application shell arkitekturen, kan vara förmånlig. Eftersom stödet för webbläsare är otillräckligt, borde en webbapplikation inte vara beroende på teknologin. Service workers är en något komplex teknologi, och det kan kräva en stund at lära sig teknologin. Det kan också vara svårt att arbeta med det varierande storlekarna på webbläsarens cache.

Description

Supervisor

Vuorimaa, Petri

Thesis advisor

Korpela, Panu

Other note

Citation