Script Integrity
Polyfill.io recently served malicious code, redirecting users to inappropriate sites. Subresource Integrity (SRI) can help prevent such issues by verifying script integrity.
Polyfill.io recently served malicious code, redirecting users to inappropriate sites. Subresource Integrity (SRI) can help prevent such issues by verifying script integrity.
I found this essay Primitive Obsession by Andrew Cairns interesting. The big example in it is this: Here the User function takes two string params, string being a primitive type, and here, quite easy to screw up by passing them in the wrong order and/or not pre-validating the values. If you agree, there are a […]
Sets in JavaScript are quite useful as they are like an array, but can only contain one of a specific item. So you can unique-ify an array easily, and even willy-nilly add stuff to it and not worry about duplicates: Now they are even more useful with recently universally available methods, as Brian Smith summarizes:
Which one makes more sense to use, big and slow or small and fast? Especially with the same appearance and functionality, the youtube-lite component is a no-brainer.
Sometimes it’s good to know when a browser feature is supported or not so you can do something. Perhaps load a polyfill or just choose a slightly different approach. This post looks at newish features in browsers and shows the test.
Michelle Barker’s technique for popover footnotes is great. Here we look at ways we could fight the content duplication. There are ups and downs.
This method enhances flexibility by allowing promises to be resolved or rejected remotely, simplifying and streamlining asynchronous code.
Server-side component rendering can improve data loading efficiency over client-rendered SPAs. Despite their benefits, such as out-of-order streaming, they have limitations, including slow server action updates and lack of support for client-side interactivity. React Query complements RSC by managing client-side data updates, addressing some of RSC’s drawbacks.
Let’s say you don’t know JavaScript. You’re a web designer and you’re focused largely on UI and UX. Let’s look at some things you could learn in a day that will give you that bang for the buck.
We can *mostly* use HTML alone for this API. But here, we’ll use CSS to style the “links” within paragraphs and a JS library to position them, in lieu of CSS anchoring.
Frontend Masters Donates to open source projects. $363,806 contributed to date.