はじめに Reproで開発を担当しているEdward Fox (edwardkenfox) です。2021年頃から Repro Booster というプロダクトの立ち上げに携わっており、開発を通して得た知見を共有できればと思い立ち筆を取るに至りました。4年ぶりのテックブログ執筆で
ServiceWorkerの落とし穴8選
seen from Italy

seen from United States
seen from Türkiye
seen from United Kingdom

seen from United Kingdom
seen from United States
seen from China
seen from Australia

seen from Malaysia

seen from United States
seen from Brazil

seen from Netherlands
seen from China
seen from United Kingdom
seen from Türkiye

seen from Indonesia

seen from Netherlands

seen from United States
seen from Italy

seen from France
はじめに Reproで開発を担当しているEdward Fox (edwardkenfox) です。2021年頃から Repro Booster というプロダクトの立ち上げに携わっており、開発を通して得た知見を共有できればと思い立ち筆を取るに至りました。4年ぶりのテックブログ執筆で
ServiceWorkerの落とし穴8選

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
Posted @withregram • @ccsquaredphotography Although we are living through some pretty heavy and trying times the are always the helpers. The one's who put life and health at risk so others can enjoy the day to day needs of life My husband and I are so very thankful to each and every one of you on the front line, from our environment waste collectors to the clerks, all the care staff, the nurses and doctors, the farmers and ALL the thousands others I could name for days. As ny family sits to prepare for a small intimate family Easter 🐣 tomorrow we want to give back. Every single session that is purchased as a gift certificate for when we are safe to go out again, will also double as a voucher to give to an essential service worker in your lives. No questions asked and all the respect in the world. Happy long weekend, to all the holidays being celebrated this weekend. #essentialservices #essentialworker #serviceworker #ccsquaredphotography #covid_19 #corona #discoverunder5k #discoverunder1k #ottawa #ottawaphoto #giveback #givebacktothecommunity #respect #volunteer #happyeaster #easter #2020 #awardwinning #publishedphotographer #photography #love #canadianphotography https://www.instagram.com/p/B-3WgRFjstv/?igshid=n9ubhemvqp5b
SADBOY 143 : body language SADBOY #143 - body language - new comic every friday #smile #serviceworker #burgerflipper #customerrelations #bodylanguage #sadboycomicstrip #comicstrip #comics #comix #indiecomics #darkhumor #webcomic #art #myart #artist #illustration #illustrator #drawing #cartoon #bd #frenchartist #frenchcomics #funnycomics #bandedessinee #bd https://www.instagram.com/p/B9HLmAwqXRr/?igshid=1o19idoix8hcf
Alexander Pope: ServiceWorkers Outbreak: index-sw-9a4c43b4b47781ca619eaa... Service Worker ?
Going Offline by Jeremy Keith, new great book with the soluce…
“Boldly take your website where it’s never gone before: offline. Jeremy Keith introduces you to service workers (and the code behind them) to show you the latest strategies in offline pages. Learn the ins and outs of fetching and caching, enhance your website’s performance, and create an ideal offline experience for every user, no matter their connection.“
https://abookapart.com/products/going-offline
r/Angular2: r/Angular2 is for news and discussion about Google's [Angular](https://angular.io/) open source project. This subreddit is focused on Angular starting with version 2 and including all future versions.

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
[browser][serviceworker][cache]Caching and using traditional resources without CORS via ServiceWorker
ServiceWorkerでimgタグ画像などの非CORSな第三者リソースのキャッシュを行う例。
fetch APIでは、CORS(Cross Origin Resource Sharing)対応していない第三者リソース(別ホストのURL)でもfetchはできるが、 その結果のResponseオブジェクトの プロパティは扱えない という関係になっている。
任意のホストにある画像データのキャッシュはできるが、プログラム上でそのデータを操作することはできない。
demo
この例では、GoogleにあるDoodle画像(CORSじゃないURL)をキャッシュするコード例である。 プログラム部分は、 https://gist.github.com/bellbind/3c2f6ed377d6b15f9122698f92d80c7d とほぼ同じ。 ただし、ブラウザの基本のキャッシュ機能によるものじゃないことを明確化するため、オフライン時のみキャッシュから取り出して返すようにしてある。
まず"cache"させてから、マシンのWiFiを切って、"get"ボタンでimgタグで キャッシュしたURLの画像を表示できるようにしている。 逆に、"remove"した場合ば、imgタグから画像は出なくなる。
[browser][serviceworker][cache]Fetch anc Cache ServiceWorker example
Service Worker上でfetchイベントとCache APIをを使う基本例。
demo
ボタン操作からServiceWorkerにコマンドを送って、URLへのキャッシュ獲得と削除させるようにし、その後、ブラウザからfetch APIを実行させたときに、キャッシュにある場合は キャッシュから得たResponseを返すようにするコード例。
注意点
FetchEventのメソッドrespondWithは中断後実行されるコールバックで実行してはいけない
CacheオブジェクトのメソッドのPromiseの結果をみてではなく、 先にrespondWithしてから、 キャッシュがない場合にはfetchして結果を返すようにしなくてはいけない
"fetch"イベントを確実に機能させるには、まず"activate"イベントでclients.claim()をする 必要がある
Picture the scene. You’re using your mobile device to browse a website and book some important concert tickets. You’ve have been eagerly awaiting this concert for months. You get right through to the checkout screen, enter your card details and hit submit. And then your flaky 3G connection drops. Screaming and pain ensues.