wfwalker / opensun

light angle calculator for wildlife and landscape photographer
https://wfwalker.github.io/opensun/
3 stars 2 forks source link

cache relative paths #25

Closed mykmelez closed 9 years ago

mykmelez commented 9 years ago

@wfwalker Your sw-precache config was identifying the files to cache as being at root-relative paths (like /css/app.css), which meant that the service worker couldn't find them when they were deployed to a subdirectory, like on GitHub Pages. This branch identifies them as being at relative paths (like css/app.css), so the service worker can find them in the subdirectory without needing the hacks in https://github.com/wfwalker/opensun/commit/e96d34d673432108d06689e953d532ad67175870 and https://github.com/wfwalker/opensun/commit/851e3dd84eccee44ede5e7fa2aa9a0776e6c11b4.

Although GitHub Pages doesn't publish a branch that isn't named gh-pages, I've merged this branch into my gh-pages branch, so you can see this branch in action at: https://mykmelez.github.io/opensun/.

(I also removed some tabs from the gulpfile in the process.)