Top
Best
New

Posted by vinhnx 10 hours ago

Bypassing iOS Safari's 60 FPS Limit to Build Web Applications That Feel Native(rida.dev)
288 points | 104 comments
ksec 3 hours ago|
I thought the demo linked to twitter was much more impressive. [1] I can't believe that was web only and not native app. Absolutely blows my mind how far we have come. I know it is prototype and there are bounds to be some edge case still not polished but I think this is the first time ever Web has native app quality, and this is without much JavaScripts.

[1]https://x.com/ridafkih/status/2122834693611819451

maelito 22 minutes ago|
Here's a blog post explaining that a full map navigation mode is completely on the Web. https://cartes.app/blog/navigation-mode

We've also switched a few months ago to a CSS bottom sheet, it's way better than the previous javascript version.

lucideer 2 hours ago||
Haven't had a chance yet to check this on iOS yet, but just to mention for those who only have access to iOS, I expected the disclaimer at the top of the page to imply that the differences between the demos would be imperceptible on Android. They aren't - the canvas is significantly worse.

I guess this may be a worthy trade-off if you're confident your userbase is 100% iOS.

ridafkih 2 hours ago|
Did you mean the OffscreenCanvas is significantly worse? What device are you using if you don't mind me asking?
FLHerne 1 hour ago|||
On my Pixel 9, the scrollarea 'snaps' to pure vertical or horizontal scrolling when the movement is within a few degrees of those.

That would be desirable in the normal use case of scrolling through content, but in this application causes the item dragging to be erratic and not follow my finger reliably.

ridafkih 1 hour ago||
Yeah, this is a CSS property. Let me toss it on really quickly!
jeroenhd 1 hour ago|||
Tested this on my Pixel 9 Pro with Firefox and Chrome.

The "improved" canvas seems to lose tracking with my finger. It's perfectly smooth (although both seem to be?), but at the end of a little wiggle motion, the square is no lunger underneath my finger.

This also makes the glass-pill-drag control look weird, because I expect the pill to be dragged along further than it actually ends up being.

The effect is much more pronounced on Firefox, but scrolling feels weird and off in Chrome as well. I also don't even know if you need this hack to work around the frame rate issue on Android.

I recorded my screen with the touch tracing feature enabled: https://bijlage.zip/e218ea6b-389f-4ac0-9e3c-c1f45624e05f.mp4

ridafkih 1 hour ago||
If you get the chance, let me know if it's fixed now. c: Unfortunately cannot reproduce it on any of my Android devices, including a Google Pixel 9, but I had a hunch.
srcreigh 8 hours ago||
What an incredible post. Not only the bypass , but the method of hacking through WebKit source to find UX workarounds.
throwaway63467 5 hours ago|
That type of investigation has become so easy, a single prompt and a bit of waiting and your agent did all the work for you. Might have been incredible a few years ago now it’s just a nice idea.
afavour 6 minutes ago|||
That isn’t true, though. I’ve actually paired with an LLM examining the way the browser displays things, not too dissimilar from what the OP is doing. It required a ton of handholding because there just isn’t a lot of this in its training data.
samuria 4 hours ago||||
Can we see your write-up about a finding like this? Why be a downer just because it’s become easier?
Bishonen88 4 hours ago||
In all honesty, any such blog post nowadays is less impressive than it would've been 5 years ago. While the OP could've stated that a bit differently, I think we all agree that it is enormously easier to do things like that with the help of AI's... Same story with beautiful websites/projects. 5 years ago, I would've devoured the source code of open source apps to learn how they pulled off some nice animation, have professional monorepo setups with various tools etc. while today - I just ask in plain english and can create the previously impossible while getting a coffee...

Not taking any shots at the article (not my niche of interest). Just stating a general observation.

onion2k 4 hours ago||||
You also have to know, or at least suspect, it's possible. And you need to know the language to prompt with. You need to understand the problem to solve even if AI does the solution. You need to be curious enough to give it a try...

AI can do the solution and the write up, but the impetus to try still has to come from a person.

walthamstow 4 hours ago|||
My dad had a great response to the phrase "anybody could have done that"

He'd say "well they fucking didn't, did they?"

guardiandemon 2 hours ago||
Ha a wise man your dad!
andai 5 hours ago||
That glass effect is very cool but very distracting.

There's a "hide scroll tracker" toggle in the hamburger menu which hides it.

petrichorko 4 hours ago||
Also interesting thing is that I can use iPad’s trackpad to pan the scrollable area-based component, while the first one does nothing. Not sure if that’s related to just some disconnected JS callback, but it surprised me that it works well out of box. I use mine as a tiny laptop, and it bothers me to reach out and touch the screen on some websites that just ignore this input option.
derangedHorse 35 minutes ago||
I only saw a subtle difference in the first example between the scrollable square canvases, but I’m sure there are cases where it would be more noticeable. Nevertheless, this post was an interesting read.
afavour 55 minutes ago||
In case you’re wondering “why isn’t 120fps enabled by default”: on the native side iOS selectively enables it for transitions that cover a lot of the screen. If you use SwiftUI or UIKit it’s done for you but there are switches on CAAnimation (IIRC) that control it.

The web has no equivalent. So it’s all 120hz all the time, or not. And that would drain the battery more than Apple would like.

bruce343434 1 hour ago||
When scrolling past the isometric scrolling thing in firefox, it crashes the tab. But this is a very cool article and even though I'm on linux desktop, the OffscreenCanvas technique is snappier and I will be adapting it. Thanks!
rmccue 45 minutes ago|
Just loading the page at all freezes the tab in Firefox for me.
andai 5 hours ago||
That isometric scrolling thing is nested, wtf! That's amazing.
doug_durham 8 hours ago|
On an iPad the compositor loses track of the cursor position as you drag things. The 60 fps javascript approach keeps everything locked. It seems like there is more work to be done.
ridafkih 7 hours ago|
Do you mind if I ask what model iPad & version of iOS you were on?
More comments...