intelligent-worker-probe
intelligent-worker-probe
SSolidJS
Created by Bersaelor on 8/15/2024 in #support
Cache-Busting with solid.js
@Bersaelor Found a good solution?
19 replies
SSolidJS
Created by Bersaelor on 8/15/2024 in #support
Cache-Busting with solid.js
Default behavior of all CDNs. They all use the client cache headers unless special CDN headers are specified .
19 replies
SSolidJS
Created by Bersaelor on 8/15/2024 in #support
Cache-Busting with solid.js
"file import problems" only happen on client machines, because CDN cache issues are easily debugged and reproducible. Client browser caching is not.
19 replies
SSolidJS
Created by Bersaelor on 8/15/2024 in #support
Cache-Busting with solid.js
The question is that cache headers you set on the client browser, since you can't clear them (on a users machine) and they are the cause of the "file imported but not found" issue.
19 replies
SSolidJS
Created by Bersaelor on 8/15/2024 in #support
Cache-Busting with solid.js
If you use a cdn, you can set separate cdn cache headers. You then can let them keep indefinitely (on the cdn), since you will clear and update them manually via script on each deployment.
19 replies
SSolidJS
Created by Bersaelor on 8/15/2024 in #support
Cache-Busting with solid.js
For index.html files -> caching has to be completely disabled. My settings: r.headers.set("Cache-Control", "public, no-cache")
19 replies
SSolidJS
Created by Bersaelor on 8/15/2024 in #support
Cache-Busting with solid.js
Another thing: you can cache indefinitely all files in assets dir. But you have to revalidate the index.html because they point to and import all the other stuff.
19 replies
SSolidJS
Created by Bersaelor on 8/15/2024 in #support
Cache-Busting with solid.js
I have the same problem. Everything you describe is a vite and not specific to solidjs. Its easier to search more info about that in vite in combination with react/vue. My current try is saving the build/commit-number as a version and fetching it in the client from the server, comparing the stringss and reload/refresh the browser if they mismatch -> Implemented just today. I guess I'l have to test and see if it works / is enough. My big solution (which I'm hesitant to implement) is uploading all build files to a cdn/s3 and just keeping all old assets around (<1-3 mb -> so a negligible amount of storage). Especially with a storage that supports deduplication, like backblaze b2.
19 replies
SSolidJS
Created by Bersaelor on 8/6/2024 in #support
importing static assets (telling vinxi/vite about stuff other then png's)
I put all my static files in the public/ folder and reference them using absolut paths (folder = public/imgs/img.png, link = /imgs/img.png). I wonder if it is better or worse vs using the static import feature from vite?
14 replies
SSolidJS
Created by aver6219 on 6/1/2024 in #support
SolidStart ver.1
yarn "have a better resolution algorithm, monorepo support, and plugins out of the box" -> only if compared to npm (because npm is the worst package manager, currently) -> against pnpm its worse (by my knowledge)
15 replies
SSolidJS
Created by aver6219 on 6/1/2024 in #support
SolidStart ver.1
Yarns 2.0+ and everyhting "pnp" has never worked for me (last try in 2023), especially with libraries like prisma, next or vite that rewrite the content in node_modules. I do not know anyone who uses yarn 2.0+, only people who still use yarn 1.0 and did not bother to update (or tried an failed).
15 replies
SSolidJS
Created by aver6219 on 6/1/2024 in #support
SolidStart ver.1
Same as (or better as) npm
15 replies
SSolidJS
Created by aver6219 on 6/1/2024 in #support
SolidStart ver.1
Simple tipp for new developers: just dont use npm -> use pnpm or bun instead No single developer working on bigger projects still uses npm
15 replies
SSolidJS
Created by glassy on 5/29/2024 in #support
createAsync vs createResource and how does Suspense work?
Design, usage and goals are discussed and presented in the RFC itself from 2023 https://github.com/solidjs/solid-router/discussions/306
41 replies
SSolidJS
Created by glassy on 5/29/2024 in #support
createAsync vs createResource and how does Suspense work?
I think much/some of this is documented in the solid-router main repo page https://github.com/solidjs/solid-router?tab=readme-ov-file#data-apis
41 replies
SSolidJS
Created by Aninsi Sasberg on 5/24/2024 in #support
SolidJS with Vite vs Solid Start
You could do it in Solid as well -> you will have to read localStorage setting as early as possible to set the right classes
7 replies
SSolidJS
Created by Aninsi Sasberg on 5/24/2024 in #support
SolidJS with Vite vs Solid Start
I solved the FOUC problem by using Astro - and inlining script tags -> its very good documented https://docs.astro.build/en/tutorial/6-islands/2/
7 replies
SSolidJS
Created by ChrisThornham on 5/13/2024 in #support
How Do I Update The createAsync() Signal?
maybe try: to wrap/extend your fetched data with hasError. So if hasError is true you can display the button to retry. I think caching is still a problem though, since the build-in caching mechanism does not know that an error has happened and caches it instead. So I guess you have to build your own caching mechanism?
33 replies
SSolidJS
Created by Utsuhoagie on 11/18/2023 in #support
How to implement JWT authentication in SolidJS, without SolidStart?
if you are at it, I would recommend setting the following attributes as well Secure SameSite: Strict
9 replies
SSolidJS
Created by Utsuhoagie on 11/18/2023 in #support
How to implement JWT authentication in SolidJS, without SolidStart?
You have to set the path "/" explicitely, or the default is a subpath that can't be accessed in other paths https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies
9 replies