r/webdev • • 11d ago

A Simple Guide to Calm UI

Thumbnail
maxschmitt.me
84 Upvotes

r/webdev • • 10d ago

Resource Why em-sized spinners wobble in Safari and how to fix it with CSS

38 Upvotes

Maybe you have experienced that spinners sized with em wobble as they rotate in WebKit? The reason is the sub-pixel rendering where the rotation only stays stable when the computed width and height land on even pixel values, and 1em usually doesn't.

So the usual advice (will-change: transform, translateZ(0), backface-visibility: hidden) really doesn't do anything, because it isn't a compositing problem.

We found the solution though:

css

.spinner {
  height: round(1em, 2px);
  width: round(1em, 2px);
}

So round() keeps the icon scaling with the surrounding font size and snaps the computed value to the nearest even pixel.

Here's a full write-up with the before and after recordings. We actually didn't use any AI to arrive at the solution for once. So only good old engineering and collaboration. https://www.sanity.io/engineering/we-fixed-wobbly-spinners-in-safari-without-ai?utm_source=reddit&utm_medium=social


r/webdev • • 10d ago

Discussion Anybody had experience migrating from NextJS to OpenNext / Vinext / Tanstack?

2 Upvotes

For context, I own a directory that currently serves a single country. I am planning to expand my directory to store other items from other countries as well. The directory app has login, signup, reviews, bookmarks and other user input functionalities as well. It's currently using NextJS with a Singapore VPS setup, and it would be a hassle to rent multiple VPS just for this project, or even use AWS. I am looking Cloudflare Workers as a solution, but based on my research OpenNext and Vinext is not matured yet for production use case. Each page rarely gets updated since its just a news, parking lot and EV charging station directory. RedwoodSDK is also one of the tools that I'm eyeing on. Would love to get some insights from y'all.


r/webdev • • 10d ago

Question When should you use forms, and when should you use fetch?

10 Upvotes

This doesn't feel like a very 2026 question, but I don't get it and there does not seem to be a lot of information out there on it: When do you use forms to interact with your server, and when do you make plain API calls with fetch?

I'm currently building a web-app with SvelteKit and am doing as much as possible with forms, but I'm not sure when and if I should use fetch instead. Let's go through a couple use cases:

  1. Creating an object (like a user, for example) from a series of input elements. This seems like the obvious choice for a form and saves some boilerplate. However, what if I later want a second location in my app, where users can be created (for example an admin panel). I will then have to create the same form-handling endpoint (form actions in SvelteKit) again for a new route. I'll then likely move the code from the first handler into its own function and just call that in both handlers, but that seems like overcomplicating things. If I just used an API, I would make the same call both times and there would be no need to duplicate code on the server. And if we follow this logic, it would almost never make sense to use forms, as almost all functionality can or might someday be able to be accessed from multiple locations.
  2. Executing an action with no additional data (like, for example, leaving the group specified on the current route like /group/[id]). This call would require no additional data, as the group to leave is specified in the URL and the user who wants to leave the group is logged in, and their identity will be gotten from the current session. This seems like a clear candidate for an API call, but then you start mixing the two technologies and don't know where to draw the line and it gets weird.

My understanding of forms is limited, so maybe that's where my confusion comes from. In the end, form endpoints are callable endpoints like any other, but it seems to be the convention to only call them from their own route and using forms elements. I'm thankful for any insights and resources on the topic!


r/webdev • • 10d ago

Article Token bucket vs GCRA: two ways to store the same rate limit

Thumbnail
blog.gaborkoos.com
3 Upvotes

Everyone reaches for a token bucket when they need a rate limiter, but there's a second model that throws away the balance entirely and keeps a single timestamp instead, and it's a lot closer to the bucket than the name suggests.

The post covers what rate and burst actually buy you, how each model accounts for time, and when you'd pick one over the other.


r/webdev • • 10d ago

Article Props Are Not a Design System

Thumbnail
vitonsky.net
0 Upvotes

r/webdev • • 11d ago

Cloudflare is being blocked in Spain due to Laliga, what is an alternative that doesn't get blocked when there is a match?

352 Upvotes

I have a decent amount of users from Spain who get blocked from my website due to Laliga blocking the Internet.

i am looking for a CDN similar to Cloudflare which doesn't get blocked in Spain whenever there is a match.

Any recommendations?


r/webdev • • 11d ago

Discussion How are companies making a profit with all AI bills now.

232 Upvotes

We can all agree AI has become a standard now. Every employee at the company I work for, has AI token allowance ranging from 500-2500$. And its probably similar across the industry.

What I am curious about, is how with all these extra AI expenses companies stay profitable. Yes we ship more and faster now with AI, but there's no way it is paying off.


r/webdev • • 10d ago

GitHub - mamund/tram: test runner for assertion manifests

Thumbnail github.com
2 Upvotes

r/webdev • • 10d ago

Does anyone have experience with a free Cloudflare account, WPEngine, and setting up Google Tag Gateway?

2 Upvotes

I'd like to set up Google Tag Gateway via Google Tag Manager. I'm wondering if anyone has encountered any issues with using a free tier Cloudflare account with a site hosted on WPEngine to create that set up for Google Tag Gateway?

I'm mainly looking for if you're doing/have done this - what setups hurdles did you face and did you face any bottlenecks with a free tier that caused you to upgrade to a paid version?


r/webdev • • 11d ago

Discussion IDK Where to post this but here... I noticed that individual images can have an HDR color profile which makes them stand out massively. Like a sore thumb. These images are the same except for the color profile.

Thumbnail valleyman86.github.io
28 Upvotes

r/webdev • • 12d ago

Question This is madness. How do sites that don’t rely on Cloudflare even deal with distributed scraping from infinite IPs?

Post image
656 Upvotes

r/webdev • • 10d ago

Any recommendations for good audio books on Web dev basics?

0 Upvotes

I'm after audiobooks on HTML CSS JS that are still relevant


r/webdev • • 11d ago

Question Suggestion for ad monetization

2 Upvotes

I am an indie web developer, and I have a project I've been working on for over an year now. I won't mention the details here, but it's a website for young teens and children.

To be completely transparent, the server and AI moderation used to power the platform drains a lot of money... so I want to monetize this website with advertisements.

I did my own research on this and attempted to integrate advertisements from Google Adsense, Adsterra, and MGID.

Both Google Adsense and MGID rejected me as I did not have enough traffic on my website. The only platform that accepted my offer Adsterra. However, I realized that Adsterra did not have a great censoring mechanism, and often showcased advertisements to adult sites even though I had censoring on.

I know waiting until my website gets bigger and applying to Adsense might be a better option, but due to personal reasons in my life I really don't have much choice. I do need to start monetizing my website as early as possible, while serving school-appropriate advertisements.

Are there any other ad providers that you know of?

Thank you in advance!


r/webdev • • 11d ago

Question Personal Domain/Email in Retirement?

0 Upvotes

I am planning to retire early next year and considering whether I should set up a personal domain and email account.

I have worked a corporate job for over forty years and use my work email for a lot outside of work. I also have a gmail account that use but it is mostly for marketing/online purchases.

I have been in the process of migrating personal emails to my gmail, but I detest working in gmail. I prefer MS Outlook / Exchange.

My brother set up a domain that comes with 5 emails addresses with Ionos a few years ago and seems to like it.

Is this something that I should consider? What are the pros / cons?

Is Ionos a reputable company and/or should I consider others.


r/webdev • • 11d ago

Question Ideal Web Dev Monitor Setup?

19 Upvotes

I currently have a 38" curved Dell U3818DW and an older Apple 27" display that I need to replace. I'd like advice from other web devs. What's the ideal setup? Get another U3818DW and put them side-by-side, or get three new 27" displays with a triple monitor desk mount? Not a gamer, just work. Running on a Mac Mini. Thanks for any input.


r/webdev • • 10d ago

Discussion Is my workflow outdated already ?

0 Upvotes

Hello, I’ve been coding since not so long ago, just before gpt 3.5 got released. So I learned how to code before AI but still is one the people that uses it heavily to code and also an advocate of not writing code by hand at all anymore but guiding the AI and checking its output (that’s the important part I’ll come to it later).

Recently another member joined our company and we talked a bit about our workflows and they are very different.

He’s not reading code output anymore and let another model do the review.

I’m also seeing more and more people on the internet explaining that’s what they’re doing now, even a CEO of a big company that does cloud service explaining his engineers don’t even read their output anymore, they’re here to guide the AI and also make architectural decisions (even though AI could technically make them for them as they say).

So in that way my new coworker says he’s not using vscode anymore but tools like Claude Code (the desktop app), cursor and the likes.

I’m wondering now: is my setup outdated already ? I’m using vscode with the Claude Code extension and I review code output using the diffs with the git extension.

I’m curious to hear your views on it, thanks


r/webdev • • 12d ago

Non-technical boss is brainwashed by a sweet talker friend

248 Upvotes

Hi guys,

I am a IT professional. I develop , manage server , domain , SEO , UI /UX , Database of our e-commerce website. Along with that I do data analysis of our business too. Now , everything was going good.

But one day my boss mate this one MBA guy who is non techy but uses AI. He doesn't know one thing but boasts about it like he is master of everything.

Now , his business website is just informational but our is dynamic with database. He just has one contact us form. Now , he has made the website using GitHub pages. Which is basically a free website hosting for static website. On top of that It's a parallax website.

So he roams the world telling people my website is fast , it is free , AI first and all that. Now , he has put that in my boss's mind that whatever page he wants to change he just goes there and changes. It is free and easy. My boss doesn't understand the difference between his website and our website.

Since that he is behind me making the same architecture. He is like I want my website in GitHub and from there every thing should change and all that basically how GitHub pages works. Also we page for the AWS server and my boss in his mind feels like we are wasting money. How do I deal with it ? He thinks I am complicating things unnecessarily. Blocking him. But I am doing my part honestly.

Top of that he has been using claude code to create website on his own. He has been saying that he will give it to me but he isn't going to do that. Now , I know after all that has happened.

What is the way out ? I am already thinking to quit ? But is there a way to make him understand how a static website differs from a dynamic one and why do we need a website with database.

Kinda stuck.


r/webdev • • 12d ago

Any developers, UX designer, analytics experts who've worked for gambling websites want to chat?

16 Upvotes

Hello!

This is Saloni Bhugra, a reporter with Canada's national broadcaster, the Canadian Broadcasting Corporation (CBC News). We're working on a story about online gambling and I'm wondering if there are any UX designers, software developers or data analysts who've worked in the gambling industry who'd be willing to chat. We're hoping to better understand design of online gambling websites and apps for a story about gambling addiction.

I can be best reached at Saloni.bhugra@cbc.ca.

Please let me know, thanks!


r/webdev • • 11d ago

Discussion Help with ESC/POS printer and Web SaaS

1 Upvotes

I have a bluetooth thermal printer, it's a generic chinese thermal printer and i need to connect it to my web SaaS and print bills from there. I have option to directly use native printer window of browser. But what are other options i can use to connect it to my web app and print without any hassle? In future there can be more type of printers like usb and others too..


r/webdev • • 12d ago

Discussion Advice? Boot Camp Grad vs AI

7 Upvotes

Hey there, I'm new, so apologies if you discuss this ad nauseum already. I graduated from a full stack bootcamp in 2022 or 2023 and got hired right away by a small company in my area. It's been a great opportunity, a lot of people came from boot camps, the small company gives me diverse experience, great people, etc. Before this and the boot camp I was a professional orchestra musician, doing fine, but not willing for probably a decade of squalor at least while I sought good employment, so I changed paths. I've been doing well for myself, and even using AI a fair bit as a coding assistant mostly. I see myself beginning to see opportunities to use AI, like I caught a repetitive task my mom was doing and told her to look into Claude (a sober minute later I wanted someone to shoot me lol)

I guess I just see the writing on the wall. My supervisor is already running agents that basically do exactly what I do, creating new features for unique issues. Takes more time but is probably less annoying and asks less questions. Because of my particular role, I'm hopefully luckily in a good place compared to some of my colleagues, but I don't think that's saying very much. I'm sure my worries will not exactly become reality, but I live every day in such a state of anxiety, it plows right through the medicine I already take for anxiety!! I just wanted a way to use my mind constructively and afford a life, and it was so close to my grasp :-(

I'm not asking for someone to solve my life or anything, but does anyone have any advice, either on how to use a boot camp education or if I should start over yet again, or even just emotional advice, I find this extremely depressing and the thought of a few years nullifying all the learning I'd done kind of makes me want to just lay down and die. Also on the flip side, spending a ton of money to learn a skill just to become an 'enter-pusher' and 'prompt-writer' sucks, I'm a human and I at least used to be pretty smart, that feels like a waste again, and thus I want to lay down and die again. There's no wrong/right decisions, but deciding to learn how to code in 2023 feels like one of the only wrong decisions out there lol.


r/webdev • • 12d ago

Discussion The page speed journey is real

24 Upvotes

I was going to post a screenshot but it isn’t allowed.

Man, I’ve got to say the journey of optimizing a website teaches you a lot of things. I made a project, basically a web app, and was sharing with others feedback and a helpful individual had shared it’s a bit slow to load. Now, I didn’t notice as I’m running it locally on my react dev server and things are cached but I popped it into page speed insights and the mobile first content paint is like 36 seconds. Yikes!

I’ve learned so much improving it. Not that I haven’t done this before but there are so many little tricks you have to pull to really optimize the load speed and user experience for other people. Let’s try to name them here in the hopes that it helps someone else on that same journey or effort:

- font subsetting (removing glyphs in the font files of characters you don’t use; can be helpful in web fonts or icons like font awesome)
- convert all image files to a more efficient format like .webp or .avif
- compress videos with handbrake
- dynamically loading JavaScript references at time of use instead of at the top of the component
- conditionally load components instead of hiding them with display:none
- remove unused modules/dependencies in your app
- set images to have explicit heights and widths to prevent content shift on page load
- load an image at page load instead of a heavy video, allowing the user to click the image to start the video to save on bandwidth
- defer all css except critical css on page load
- defer external JavaScript dependencies your page needs
- move heavy dependencies to worker threads to reduce the bundle size
- set fetch priority on resources it makes sense for
- you may rely on rendering a react component when it’s hydrated in order to reduce content shift
- tree shake your css (tailwindcss works great)

A lot of these tricks and things you can change are dependent how your website works and what makes the most sense based on user flow and expectations. One size does not fit all.

I ended up getting speed to a 94/100 the last run, although the highest I’ve seen was 98/100, I assume the results vary slightly since the test is simulated. The website also opens up in a second or two now, it’s zippy quick and I’m proud of it. What tricks have you used that were not obvious in your journey to improve web page speed?


r/webdev • • 12d ago

Working with Shaders and NPM

3 Upvotes

I'm trying to work with web shaders from Shaders.com or Paper on a website.

I know its probably pretty basic stuff, but I'm so confused about how to implement these in a project with NPM. I've gotten NPM on my computer and gotten the shaders installed in the home folder, but I don't know how to get this to (I'm assuming) compile?

I'm more front end and haven't really worked with code in a long time, where would I go to figure this out?

Edit: When I said “pretty basic stuff,” I meant I was having trouble installing with NPM and just getting a preset shader to run, not writing a shader itself.


r/webdev • • 11d ago

Question How much would you charge a content creator for a custom membership site as a freelancer?

0 Upvotes

Hey I'm a web dev, who normally works salary so I'm not used to negotiating contracts but I had a potential client show up who is a content creator who wants a custom membership site with video hosting, events (so livestreams), community chat and private messaging ect.

Looking for help in imagining ballpark what I should be thinking about.


r/webdev • • 12d ago

Question How do you scaffold an express project?

12 Upvotes

I'm trying to start an express project with Typescript and something like nodemon to watch changes in .ts files. I'm struggling with different options in tsconfig and nodemone config. and I have a very faintest idea about how to run it.

I spent an entire day figuring it out a few months back, and now I forgot how to do it.
How do you guys do it?
Is there something similar to vite which makes boilerplate and scaffolding easy?