So you should change your title. This has nothing to do with JavaScript.
Because you can obviously run JavaScript with node, deno, bun without any server.
You are talking about Browsers. And i have news for you... Browsers where meant to access the web.
You can use other technologies than Browsers to render HTML, use storage...there is electron, tauri, etc to not use a server with a domain name.
This has nothing to do with JavaScript.
Because you can obviously run JavaScript with node, deno, bun without any server.
It does. It literally makes reference to document.cookie and other JS mechanics.
You can use other technologies than Browsers to render HTML,
Yes, but this is most convenient.
I don't wanna just randomly go into some language, work with some janky markup parser, then have to compile the program for different systems when I could delegate that to the browser.
I would also like HTML and JS functionality so it's more convenient (and makes more sense to me) to do this in the browser.
use storage
I already stated why I can't use localStorage, unless there's something else you're referring to I don't know about.
Now regarding document.cookie. It's specifially tied to web. It's not a browser technology, It's a web technology tied to HTTP protocol .
Cookies are fondamentally tied to remote servers. It's not your browser fault if is preventing you from using it on a file. it makes no sense to have cookies on files (imagine, this would mean having tied cookies for each file you browse on the web). No cookies are tied to a remote domain. It's their definition.
Now regarding localstorage. It's the same reason, localStorage by design are tied to a domain, not a file. Again, tying it to a file would make it useless for the web.
Now regarding doing cool things on browser without a server to share something between pages... i have your back.
Go here, this is called WebRTC. One cool thing with this. You don't need a web server. You can make two HTML files communicate with javascript.
Can WebRTC hold data even when the browser is closed?
That's part of the functionality I was after when trying to see if I could use cookies or localStorage.
Unfortunately, no. There is no storage you can use on a browser without attaching it to a domain and then to a server.
The only thing you can do, is having a local html file that interact with a third party service that will store it for you, like aws dynamoDB. But if you really want your page to not need internet access, i'm affraid you can't.
I just þought:
Could I do some Stop'N'Swap shit to store data? Basically open a new tab, sync local-storages, close first tab to simulate data transfer?
Or is ðat no good?
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
So you should change your title. This has nothing to do with JavaScript.
Because you can obviously run JavaScript with node, deno, bun without any server.
You are talking about Browsers. And i have news for you... Browsers where meant to access the web.
You can use other technologies than Browsers to render HTML, use storage...there is electron, tauri, etc to not use a server with a domain name.
It does. It literally makes reference to
document.cookie
and other JS mechanics.Yes, but this is most convenient.
I don't wanna just randomly go into some language, work with some janky markup parser, then have to compile the program for different systems when I could delegate that to the browser.
I would also like HTML and JS functionality so it's more convenient (and makes more sense to me) to do this in the browser.
I already stated why I can't use
localStorage
, unless there's something else you're referring to I don't know about.Let me rephrase this. I don't mean to be rude. No harm ahead.
First, Javascript is not tied to web browser technology. Like i said, Javascript can be used outside of browsers :
Now regarding
document.cookie
. It's specifially tied to web. It's not a browser technology, It's a web technology tied to HTTP protocol .Cookies are fondamentally tied to remote servers. It's not your browser fault if is preventing you from using it on a file. it makes no sense to have cookies on files (imagine, this would mean having tied cookies for each file you browse on the web). No cookies are tied to a remote domain. It's their definition.
Now regarding localstorage. It's the same reason, localStorage by design are tied to a domain, not a file. Again, tying it to a file would make it useless for the web.
Now regarding doing cool things on browser without a server to share something between pages... i have your back.
Go here, this is called WebRTC. One cool thing with this. You don't need a web server. You can make two HTML files communicate with javascript.
Now have fun.
I didn't think you intended to originally.
Can WebRTC hold data even when the browser is closed?
That's part of the functionality I was after when trying to see if I could use cookies or
localStorage
.Unfortunately, no. There is no storage you can use on a browser without attaching it to a domain and then to a server.
The only thing you can do, is having a local html file that interact with a third party service that will store it for you, like aws dynamoDB. But if you really want your page to not need internet access, i'm affraid you can't.
Thanks for your help.
But as a subrant, that's stupid.
There should be like
directoryStorage
, which is likelocalStorage
for the CWD of the HTML file.I just þought:
Could I do some Stop'N'Swap shit to store data? Basically open a new tab, sync local-storages, close first tab to simulate data transfer?
Or is ðat no good?