Skip to content

Instantly share code, notes, and snippets.

View MarcoHengstenberg's full-sized avatar

Marco Hengstenberg MarcoHengstenberg

View GitHub Profile
@MarcoHengstenberg
MarcoHengstenberg / serviceworker-undefined-finding.md
Last active September 15, 2016 15:05
How url/undefined landed in my cache storage

So I didn't want a certain script to be cached by the serviceworker I'm working on. That's how it wasn't in the array of assets and urls to cache.

When I tested the worker I got all assets and pages I had in the array, as expected. But I also found https://url/undefined | OK on the list in the cache storage (in Chrome and Firefox).

When I navigated to the URL (https://url/undefined) I got the contents of the script not being on the list in the first place.

Does it make sense?

Keybase proof

I hereby claim:

  • I am MarcoHengstenberg on github.
  • I am nice2meatu (https://keybase.io/nice2meatu) on keybase.
  • I have a public key whose fingerprint is A7B2 B0C1 C14D 23A8 E1A1 3C62 4BD8 E62D 7ED1 40A3

To claim this, I am signing this object:

@MarcoHengstenberg
MarcoHengstenberg / webfontloading-again-and-again
Created March 23, 2016 16:02
Something about loading webfonts in different browsers and issues I encountered
So here's the story:
I have fontfiles locally (which should be considered the ideal thing - no depencies to external font-
or CSS-files). I want them to load as fast as possible and have a "Flash of Fallback Text" on
firstView with no Flash-whatsoever on repeat views.
Currently, in the Magazine, we're using this localStorage-base64encoded-fontfiles pick-pocket trick
in order to have exactly that functionality. We'd still be fine if you had a flash when returning
after your session expired, so sessionStorage is an option:
- flash on first view