This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-09-13
Channels
- # announcements (1)
- # babashka (12)
- # beginners (10)
- # biff (9)
- # calva (2)
- # cherry (21)
- # cider (14)
- # clj-commons (76)
- # clj-kondo (8)
- # clj-on-windows (34)
- # cljs-dev (5)
- # clojure (48)
- # clojure-austin (7)
- # clojure-europe (97)
- # clojure-nl (1)
- # clojure-norway (14)
- # clojure-uk (22)
- # clojurescript (137)
- # conjure (33)
- # cursive (4)
- # datalevin (1)
- # deps-new (4)
- # devcards (2)
- # duct (3)
- # events (1)
- # fulcro (12)
- # graphql (9)
- # hyperfiddle (16)
- # jobs (8)
- # kaocha (1)
- # leiningen (6)
- # lsp (39)
- # malli (38)
- # membrane (20)
- # nbb (68)
- # observability (7)
- # off-topic (49)
- # pathom (11)
- # polylith (8)
- # portal (22)
- # re-frame (6)
- # releases (1)
- # remote-jobs (2)
- # shadow-cljs (24)
- # spacemacs (2)
- # squint (6)
- # xtdb (7)
hello, is there a way to have the browser refresh when a page has been recompiled?
Would this work? https://livejs.com/ It worked for me with no config, just add to html header, on a simple local server (bb http-server task)
I'm toying with biff default project, and it looks like it doesn't support HEAD requests for livejs
I added ring middleware https://ring-clojure.github.io/ring/ring.middleware.head.html so head requests are passing now but it doesn't refresh
Interesting, I hadn't seen livejs before. I have an open issue to add this to biff: https://github.com/jacobobryant/biff/issues/117. I just haven't prioritized it because I'm used to manually refreshing 😅 . However if all it needs to work is to support head requests that shouldn't be too hard to get working. Doing it that way hadn't occurred to me. I would've expected adding ring.middleware.head to make it work. I'll try adding livejs + head middleware to the example project right now and see if I notice anything.
@U7YNGKDHA I've tried that as well it doesn't update, I think one needs to ad the lastmodified header for it to work
yes--looks like live.js looks at that header or etag/content-length/content-type to see if any changed
I'm in the middle of adding some middleware to set the etag header which should make it work
Here's a working example: https://github.com/jacobobryant/biff/commit/36cfe9b291185c9300239770059fd0e72a2bea05