Skip to content

Instantly share code, notes, and snippets.

@wanderview
Last active October 11, 2016 15:08
Show Gist options
  • Save wanderview/d268442914398a66613682957dd2f8ff to your computer and use it in GitHub Desktop.
Save wanderview/d268442914398a66613682957dd2f8ff to your computer and use it in GitHub Desktop.
let headers = new Headers();
headers.append('X-Food', 'Candy Corn');
headers.append('X-Drink', 'Cider');
let request = new Request('/order.html');
autoHeaders.put(request, headers);
let headers = new Headers();
headers.append('X-Preload-Value', 'Boo');
let request = new Request('/order.html', {
// spec service worker preload requests to include 'ServiceWorkerPreload' header
headers: { Vary: 'ServiceWorkerPreload' }
});
autoHeaders.put(request, headers);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment