Hi, I'm David

I'm a Web Developer

I'm a developer with a fascination for the web that can help build your ideas into an online presence.

An image of an android like person from the waist up with sunglasses and a checkered shirt.

When using service workers you may want to cache some more complex resources and if you are not entirely sure what the resultant URL of the resource you want to cahce is, that can be okay, for example when caching Google fonts. You might have specified a list of routes to cache and cached those during the install step of the service worker activating, but you can also cache resources you might want to cache where you do not know the route initially.

Back in 2017 when I was originally putting this new blog together with Jekyll I made a point of integrating a service worker with the build process. Generating the required urls to cache using liquid tags and embedding these within the URL’s to be cached on service worker activation can be included.

Checking when a user has scrolled to the end of a page can be useful for a number of different features. You may want to load more information once a user has scrolled to the end to create infinite scrolling, or find out that a user has read your whole article.

In JavaScript it can be advantageous to override the default this context when dealing with function callbacks where you want to abstract these out into their own named functions. Using a plain .bind on the end of your function can be one way of dealing with this.

If you’ve been paying attention to new technologies on the web one thing you have not missed is Service Workers. They’re a new take on the idea of progressive enhancement and I think they’re going to stick around for a while yet.

You can find more posts here.