6 ms·
I'm not usually one to ad hominem like this, but IMO you cannot both posit to give advice on good frontend engineering and fiddle with window.onScroll.
by ThePadawan 8y ago
I'm not usually one to ad hominem like this, but IMO you cannot both posit to give advice on good frontend engineering and fiddle with window.onScroll.
- lmilcin 8y agoOr not being able to handle being slashdotted/hackernews-ed.
- hombre_fatal 8y agoWell, even if we were talking about how to build scalable servers (we aren't), I feel like that's some sad, judgy gatekeeping to suggest that one needs to apply those same principles to their own blog else they need to receive such condescension in the comments. It's like saying a real engineer builds their own blog. I wouldn't waste a single second of my life doing so, and the money I'm willing to spend on it reflects that as well. It comes off as petty, to me, to judge someone on this. For example, I'm paid $100k/year to build scalable servers, not my cheap Wordpress blog.
- deleted 8y ago[deleted]
- untog 8y agoI disagree with that one. Reinforcing your personal blog with a CDN would be a waste of money 99% of the time. It's also backend engineering, not frontend.
- iaml 8y agoCloudflare has a free tier.
- untog 8y agoEven still. I spend all day working on this stuff, I definitely can't be bothered to do even more of it when I get home, so I won't blame anyone else that doesn't.
- laurent123456 8y agoJust host it on GitHub with your own domain. It's free, robust, and it means you can change the hosting if you ever want to.
- ChrisSD 8y agoReimplementing basic browser functions (poorly) in Javascript is one of the most annoying trends in web dev.
- wlesieutre 8y agoYeah but wouldn't it be cool if when you spin the mouse wheel it takes ten revolutions and then the page scrolls over sideways, and then you spin it another ten times and it scrolls sideways to page three, etc? True story. I forget where, but I assume they just didn't bother to test it on anything but a Macbook trackpad.
- TuringTest 8y agoYou wouldn't believe what screen transitions they made in the times of Flash.
- wlesieutre 8y agoSure they were terrible, but at least we had auto-playing music to keep us company while we waited
- joshmn 8y agoNow we have both auto-playing music and video. Even on mobile!
- TuringTest 8y agoI'll never forget zombo.com. I'm still waiting!
- azangru 8y agoAre you against listening to the onScroll event in general, or only against scroll hijacking?
- patates 8y agoI'm not the person you are replying to but I have strong feeling that it's the latter. The scroll event has, IMHO, outside the annoying infinite scroll circus and the hijacks, a single good use: Lazy loading of expensive resources (then one would ask why it's not paginated in the first place but well).
- taoistextremist 8y agoIt's more convenient than pagination for the user. At least up until they want to share a specific section
- dmix 8y ago> At least up until they want to share a specific section Which is why I hate automatic pagination unless some sort of anchor or direct URL to a section is made (prominently) available.
- ThePadawan 8y agoI simply find it offputting for anyone to say "I as a web designer know better than you and will smooth your scrolling for you".
- mtrpcic 8y agoSo, the latter then.
- ThePadawan 8y agoI guess. Why would I object to the first? As long as it doesn't impact me, you can listen to whatever the hell you want.
- cntlzw 8y ago/thread
- deleted 8y ago[deleted]
- kakarot 8y agoAs long as you're throttling, there's nothing wrong with interfacing with onScroll. I use it for all sorts of things. Scroll-jacking is the real issue.
- acdha 8y agoShouldn't most of those be using Intersection Observers these days? That should avoid most of the cases where someone unintentionally breaks the user experience.
- antibland 8y agoYes, and another bonus is that Intersection Observer is asynchronous and eliminates the need to tack on an additional debounce function.
- kakarot 8y agoNot yet, but soon: https://caniuse.com/#feat=intersectionobserver https://caniuse.com/#feat=intersectionobserver
- acdha 8y agoGood point: I’ve been using it with polyfills which tends to hit the same point of not using an API which encourages accidental jank but it’s no substitute for native support.
- kakarot 8y agoI am looking forward to switching over. Currently, I try to pool callbacks onto the same onScroll event when I can but it's still janky.
- horsawlarway 8y agoI'm laughing. I literally immediately noticed the scroll-jacking and closed the tab. I then went to the comments to see how far I'd have to dig before finding this - Glad to see it at the top. For the OP (who I'm assuming also owns the blog since the names are the same...): For the love of god - Do not fuck with my control of the browser. I don't want passengers in my car screwing with my mirrors. I don't want sites in my browser screwing with my input.