Bypassing iOS Safari's 60 FPS Limit to Build Web Applications That Feel Native (opens external site)
Comments (141)
8 comments are not loaded here. Read them on Hacker News ↗.
On iPhone or iPad, use Share → Add to Home Screen.
8 comments are not loaded here. Read them on Hacker News ↗.
Replies (3)
Replies (2)
Replies (1)
Replies (1)
I’d suggest that this particular object respect the prefers-reduced-motion setting if it doesn’t already.
Replies (1)
Replies (3)
Replies (2)
It's not really noticeable in my opinion. Hell, even 30 to 60 FPS isn't noticeable.
Replies (3)
Replies (1)
Replies (1)
and 60 vs 120hz, you may not notice it immediately but when you e.g. move a window around on a monitor you should be able to feel it, at least for me it's instantly noticeable, but you may not notice it if you're not switching between or aren't moving things around
Replies (1)
And a fast monitor needs a fast mouse to take full advantage of it. USB mouse protocol does not inform the mouse of the monitor's refresh phase/frequency, so the mouse has to run asynchronously. You need a high mouse sampling rate to avoid noticeable beat patterns caused by this discrepancy. Non-gaming mice sometimes only support 125Hz, which isn't even enough for 60Hz monitors. Common gaming mice support 1000Hz, which is enough for perceptibly flawless mouse control at 120Hz, but for 240Hz you need a high-end gaming mouse with higher sampling rate.
Replies (1)
This is far more understandable because that makes everything run at 60Hz. The article here is a scenario where you have 60Hz content mixed in with 120Hz on the same screen. But still, people who are accustomed to high refresh rate displays would be able to immediately notice.
> And a fast monitor needs a fast mouse to take full advantage of it.
Ideally, yes, but you don't need a high polling rate mouse to be able to notice the difference.
Replies (1)
Low to mid tier devices might get hitches on the glass elements since the glass runs on the GPU during scrolls. If you mean the actual first demo and the one on the right is rendering below 120 Hz, your device is simply not capable of it.
I am.
> you’ll immediately be able to tell which is which
I cannot. lol
Replies (6)
Replies (1)
I'm on an iPhone with ProMotion and both of these are running at 120 fps here. I thought I was going mad, so I had to dig into it a little, even if it's just to provide op with more information.
As far as I could tell (Settings.app's Search seems useless) there are three settings you could engage to influence the refresh rate of websites in Safari:
- Low Power Mode
- "Prefer Rendering Updates at 60Hz" Feature Flag in Safari - which is enabled by default
- Limit Refresh Rate in Accessibility -> Motion
I didn't try Low Power Mode, but the Accessibility setting did the trick for me and I was immediately able to see the difference.
Not sure what's causing this. I'm on an iPhone 15 Pro Max running iOS 27.0.1.
Replies (1)
Replies (1)
Same goes here. If you go to the first two grids, and you shake the square until you can count the afterimages, check to see if one shows more afterimages than the other despite the same speed.
If your device is genuinely limited to 60Hz for any reason or another, you'll see a little warning icon on the top-right.
It might be easier in Low Power Mode, as well. This'll reduce the requestAnimationFrame loop to 30 Hz, but the higher refresh rate examples in this post will show at 60 Hz.
Replies (1)
Replies (1)
I've been making websites for over a decade now, and yet even with AI in the loop, the blog post and demos took almost 5 days to become publishable, and another 4 to get the performance in a place where I was happy. This is because of the hybrid approach, and needing to build the entire page around that fact.
Would I ever use liquid glass in an actual website? I would not, and certainly not as I did here with an annoying `_UILiquidLensView`-inspired scroll indicator. Do I think it serves as a good illustration/example for high-refresh rate websites on mobile? Absolutely!
Continue this thread (1 replies) →
Replies (1)
i have a 15 pro max and a new ipad, no low power mode, frame rate is not limited in accessibility settings...
it's extremely subtle if percievable at all.
Replies (1)
Replies (4)
Replies (1)
Replies (1)
Replies (2)
But man, is that effect how annoying it is to use iOS now?
Replies (3)
Every "liquid glass on web" library in existence falls short because it can't keep up the compositor refresh rate. Simple as that. Part of it was also bringing native UI to the web because I figured it'd be quite jarring to see a convincingly native element in a website for those familiar with web development.
As for using iOS, Apple doesn't use the glass effect (`_UILiquidLensView`) I used for the progress/scroll indicator outside of a very select few use-cases because (as is the case on this website) if it's not positioned squarely in the centre of your macula, the intensity of the refraction combined with the chromatic aberration makes it so that it appears flashy and distracting. I accepted it for the sake of the demo.
Especially because since iOS27, there is a slider to put Liquid Glass into a less transparent look [1] so the glass pill on this site stood out immediately as "the bad old iOS26 days" of Liquid Glass.
With the newly possible iOS27 look, I'd say it is a perfect blend of "looks nice" and "still readable".
[1] https://i.imgur.com/6cRn9Gs.jpeg
Replies (1)
But then it was also such a massive own goal in terms of design it would have been ridiculous not to (even more ridiculous than the fact they ever released their platforms that way to begin with!)
Replies (1)
Replies (1)
Continue this thread (1 replies) →
Replies (4)
Is there really any alternatives? I use FF on iOS, but its still wrapped in Webkit, not Gecko.
Replies (1)
https://blog.mozilla.org/en/mozilla/internet-policy/apple-io...
As someone proficient with both ways of building things: if you do know native development (and I mean "know", not "dabbled for a couple of hours") you'd need really to force me to do apps the other way.
Replies (1)
But yes, Safari seems to be made just bad enough that people are forced to make apps even for things that don't benefit from being apps.
Replies (1)
I had to scroll multiple times to see the difference.
While the effort is commendable, I feel it's largely wasted.
Replies (3)
Replies (1)
Replies (1)
Replies (1)
I have hard time noticing any difference in the examples on iPhone 16 Pro
But my advice here is just don’t do it. Respect your users battery life. If you want a native feel then compile to native code.
There's a "hide scroll tracker" toggle in the hamburger menu which hides it.
Replies (2)
No. The difference has nothing to do with refresh rate. They move differently using different logic. I can only tell them apart because one has inertia and keeps moving after release. If I keep my thumb down they are the same.
IPhone 17, iOS 26
Replies (3)
Replies (5)
That’s certain. Lots of people also can’t perceive the soap opera effect, even if you turn off frame interpolation on their TV and show them the before and after.
https://en.wikipedia.org/wiki/Soap_opera_effect
Midrange Android phones have had 120hz screens for years! Although I'll be the first to admit that specs aren't everything.
It's why the screen is 120Hz not 240Hz or 1200Hz after all, somewhere in the 60-120Hz range is "enough" and for a lot of people 120 is already only a minor benefit at best over 60
iPhone SE 2nd gen, ios 27.2.1
Replies (1)
If I lift my finger then I see the inertia, but that's the only difference.
Interesting from technical point of view, could not care less for all practical purposes.
Replies (1)
Replies (1)
Replies (1)
[1]https://x.com/ridafkih/status/2122834693611819451
Replies (1)
We've also switched a few months ago to a CSS bottom sheet, it's way better than the previous javascript version.
I couldn’t have told you if this would have triggered the compositor at 120Hz but if anything worked it would be this.
Replies (1)
(https://lobste.rs/s/pxvmxo/bypassing_ios_safari_60_fps_limit...)
I guess this may be a worthy trade-off if you're confident your userbase is 100% iOS.
Replies (1)
Replies (2)
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
Replies (1)
Replies (1)
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.
Replies (1)
Replies (1)
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.
Replies (1)
Replies (3)
Replies (2)
Replies (1)
Replies (1)
A iPhone 12 only has a 60hz display - so nothing in this article matters on your device.
Replies (1)
Earlier or lower tiers models only has a 60hz display and if you’re not seeing a difference, it’s because on your device there probably isn’t.
Replies (2)
Not that I'm an Apple junkie, but this is like learning Ford caps its trucks at 100HP if you swap rims, or something.
If I bought an iPhone with high refresh rate, took it home and realized my browser (the main app I use on a phone) is locked at half the device's capacity, I would immediately get a refund.
I notice no difference, what should happen?
Replies (1)