reveal

Docs: https://vlaaad.github.io/reveal/ Source: https://github.com/vlaaad/reveal
seancorfield 2020-12-06T00:32:14.304400Z

@vlaaad Any idea why a :web-view would seem to cache a rendered page? In my observable view, if it gets a <http://java.net|java.net>.URL, it produces a :web-view for that URL. When I give it the URL of my localhost server, it doesn't always seem to make the request -- sometimes it renders a blank page, sometimes I have to run the eval twice to get the updated page.

vlaaad 2020-12-06T12:59:52.306800Z

Hmm, cljfx skips URL reload if new value is the same as old one, maybe that's the behavior you are seeing?

vlaaad 2020-12-06T13:00:58.307Z

If you tap url to the same external page twice in a row it will only load it once

seancorfield 2020-12-06T18:18:18.307200Z

Even with a cache buster to make the url unique it still seems to only load the page every other time.

seancorfield 2020-12-06T18:20:30.307400Z

It makes using the internal browser in Reveal really hard. I'm trying to use it for viewing the web app that I'm developing, so it needs to fetch the url every time.

vlaaad 2020-12-06T19:23:48.307600Z

I think this cache buster has to be in the URL itself that is tapped for it to work. Cljfx assumes it works with pure functions

vlaaad 2020-12-06T19:29:42.307800Z

Although I would expect for observable fn to be called on every change... I'll have a look when I'll be at a computer

seancorfield 2020-12-06T19:33:50.308100Z

I'm evaluating (<http://java.net|java.net>.URL. (str "<http://localhost:8888/?i=>" (rand-int 10000))) via tap&gt; and the observable view's function returns a (new?) :web-view hash map each time.

seancorfield 2020-12-06T19:34:24.308300Z

The REPL shows the URL is different every time. Debugging in the web app shows it is only being invoked on every other URL.

vlaaad 2020-12-06T19:54:21.308500Z

Can't reproduce it with simple http server — the endpoint gets triggered every time for me, and web view is refreshed every time as well

vlaaad 2020-12-06T19:56:28.309Z

tried with python -m SimpleHTTPServer

seancorfield 2020-12-06T19:57:49.309200Z

Interesting. I wonder if it's somehow because the http server I'm running is inside the REPL/JVM that is also running Reveal and therefore invoking the web-view?

seancorfield 2020-12-06T20:02:43.309400Z

I see the eval of the <http://java.net|java.net>.URL and it shows the unique URL each time. I'll go through the code in more detail and see if I can figure out where the ball is being dropped in the chain.

👍 1
seancorfield 2020-12-06T00:39:59.305500Z

If I add a cache buster to the URL (`(str url "?" (rand-int 10000))`) then it seems to make every other request (consistently).

seancorfield 2020-12-06T00:42:53.306100Z

(I wonder if it only does this for http: links? It seems to request https: links every time...)

dharrigan 2020-12-06T07:35:26.306300Z

I use Reveal with Java 11(.0.8) without issues