I used clearTimeout instead of clearInterval to clear a timeout and it worked.
Found a stackoverflow question: https://stackoverflow.com/q/9913719/1443630
I used clearTimeout instead of clearInterval to clear a timeout and it worked.
Found a stackoverflow question: https://stackoverflow.com/q/9913719/1443630
Continuous socket.io connections quickly filled up the limit of 6 requests in my Firefox causing other requests to not get resolved either.
This is at least the case in Vite 7 I suppose. Could also be related to the particulars of my config. I will check later and see if I can reproduce this in a super small project.
The fix: just set the port again in the server section in your vite config. I
suppose strictPort only would make sense here, then?
This is related to this TIL: Firefox won’t tell you why it’s stalling your request
…or at least I did not find anything obvious that indicated the reason my requests were stalled was because there’s apparently a limit of 6 connections per domain it seems. More in another TIL.
also you can see the number of active connections at about:networking in
Firefox
found this on stackoverflow: https://stackoverflow.com/a/985704/1443630
use document.open
If you want to remove event listeners for a specific element or a set of elements - just clone them and replace the real ones with their clones.
CSS has a clamp function that takes a min value, “preferred” value and a max value.
If the preferred value is between min and max, then the preferred value is returned, otherwise the output is clamped based on min and max.
I used this recently on the astro rewrite of this blog while setting margin for my “See all posts” CTA so that it’s dependent on viewport size such that it never goes out of the viewport and smoothly goes inside the viewport as we resize.
margin-right: clamp(-25.5px,calc((900px - 100vw) / 2 - 10px),0px);Ref: clamp() - CSS | MDN
"Bad luck, I guess. It floats around. It's got to land on somebody. It was my turn, that's all. I was in the path of the tornado. I just didn't expect the storm would last as long as it has."
— Andy