Live data from Hacker News

I wrote a static web page and accidentally started a community (2023)

localfirstweb.dev

21–30 of 136 posts

Re: I wrote a static web page and accidentally started a community (2023)

#21
post #16
post #6

Hey browser makers, please allow file:// URLS to actually be able to load other files in the same directory without giving a CORS error. You can't even run a JS file from the same directory! That's what's really killing "local first".

> "local first" Listening on 127.0.0.1:80 is local first and not being routable is in fact local-only. Its common alias ‘localhost’ even has ‘local’ in the name.

That requires having an actual server though.

Re: I wrote a static web page and accidentally started a community (2023)

#22
post #6

Hey browser makers, please allow file:// URLS to actually be able to load other files in the same directory without giving a CORS error. You can't even run a JS file from the same directory! That's what's really killing "local first".

As usual, this sounds great for the nice players.

Unfortunately that means if you download an html file and double click on it then it can send anything in your downloads folder to anywhere else.

Re: I wrote a static web page and accidentally started a community (2023)

#23
post #6

Hey browser makers, please allow file:// URLS to actually be able to load other files in the same directory without giving a CORS error. You can't even run a JS file from the same directory! That's what's really killing "local first".

I have made a notebook environment inside a single html file. You have to map dependencies in an importmap to blob URLs and it works. I have a single file website online. And you can click download to play with it locally https://tomlarkworthy.moldable.app/index.html You can turn off network and the download works.

Very nice, written up anywhere?

Re: I wrote a static web page and accidentally started a community (2023)

#24
post #6

Hey browser makers, please allow file:// URLS to actually be able to load other files in the same directory without giving a CORS error. You can't even run a JS file from the same directory! That's what's really killing "local first".

I have made a notebook environment inside a single html file. You have to map dependencies in an importmap to blob URLs and it works. I have a single file website online. And you can click download to play with it locally https://tomlarkworthy.moldable.app/index.html You can turn off network and the download works.

Without looking into the source – GoldenLayout, right? :)

Re: I wrote a static web page and accidentally started a community (2023)

#25
post #21
post #16

Earlier quoted context omitted.

> "local first" Listening on 127.0.0.1:80 is local first and not being routable is in fact local-only. Its common alias ‘localhost’ even has ‘local’ in the name.

That requires having an actual server though.

which is extremely easy to do. Most programming languages have a one-liner to do it.

Re: I wrote a static web page and accidentally started a community (2023)

#26
> But I was equally surprised by how little this was being discussed, or (as far as I could tell) practiced in the real world. While there seemed to be endless threads on Twitter about server-side React (to get the UI generation closer to the data), no-one was talking about the opposite: moving the data to be closer to the UI, and onto the client!

This, I've wondered for a while. There is plenty of talk about server side rendering, which I don't think is useful for many apps out there. SSR is quite wasteful of the resources on the client side that can be made useful. And, I've seen many apps being developed with "use cliënt" littered all over, and that begs to wonder why do you even want SSR in your app.

Re: I wrote a static web page and accidentally started a community (2023)

#27

> But I was equally surprised by how little this was being discussed, or (as far as I could tell) practiced in the real world. While there seemed to be endless threads on Twitter about server-side React (to get the UI generation closer to the data), no-one was talking about the opposite: moving the data to be closer to the UI, and onto the client! This, I've wondered for a while. There is plenty of talk about server…

Wasn't the reason for SSR to have more control over security and offload work from the client to the server? Let's not forget that the majority of the worlds population is using slow ass tech. We cant simply put huge workloads to the client.

Re: I wrote a static web page and accidentally started a community (2023)

#28

> But I was equally surprised by how little this was being discussed, or (as far as I could tell) practiced in the real world. While there seemed to be endless threads on Twitter about server-side React (to get the UI generation closer to the data), no-one was talking about the opposite: moving the data to be closer to the UI, and onto the client! This, I've wondered for a while. There is plenty of talk about server…

SSR just means you render on the server, it isn't whatever you are describing.

Re: I wrote a static web page and accidentally started a community (2023)

#29
post #6

Hey browser makers, please allow file:// URLS to actually be able to load other files in the same directory without giving a CORS error. You can't even run a JS file from the same directory! That's what's really killing "local first".

From a security perspective, that's a bad thing to do.

Re: I wrote a static web page and accidentally started a community (2023)

#30

Earlier quoted context omitted.

I have made a notebook environment inside a single html file. You have to map dependencies in an importmap to blob URLs and it works. I have a single file website online. And you can click download to play with it locally https://tomlarkworthy.moldable.app/index.html You can turn off network and the download works.

Very nice, written up anywhere?

still a WIP but I will write it up properly soon.
Post reply on HN