blob: 5c34a7a49e8709a656c2ea01f2bced377cb18da1 (
plain)
1
2
3
4
5
6
7
8
9
|
self.addEventListener('fetch', function(event) {
// Use an empty content-type value to force mime-sniffing. Note, this
// must be passed to the constructor since the mime-type of the Response
// is fixed and cannot be later changed.
var res = new Response('<!DOCTYPE html>\n<h1 id=\'testid\'>test</h1>', {
headers: { 'content-type': '' }
});
event.respondWith(res);
});
|