Re: [w3c/ServiceWorker] Proposal: FetchEvent.navigationLoadType (#1167)

Thanks to @mattto, @wanderview, @toyoshim and everyone in https://github.com/whatwg/fetch/issues/524 for investigating this, I know I was a sticking point here, but I now agree that cache mode isn't enough. Sorry!

How about `fetchEvent.navigationType`:

* `"navigate"`
* `"reload"`
* `"back"`
* `"forward"`
* Empty string for non-navigations

`navigationType` is shorter than `navigationLoadType` and seems to convey the same thing.

Splitting out `back_forward` seems useful, also I hate enums with underscores 😄 .

I'm not sure what "undefined" means (it isn't [in the spec](https://w3c.github.io/navigation-timing/#idl-def-navigationtype)), but an empty string seems more useful for non-navigations, eg `if (event.navigationType)`.

@rsamuelklatchko does this work for you?

@hober @aliams @jatindersmann Any objections? I can organise a call if this is contentious.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/issues/1167#issuecomment-315080941

Received on Thursday, 13 July 2017 13:41:49 UTC