| ▲ | Bypassing iOS Safari's 60 FPS Limit to Build Web Applications That Feel Native(rida.dev) |
| 132 points by vinhnx 5 hours ago | 42 comments |
| |
|
| ▲ | srcreigh 3 hours ago | parent | next [-] |
| What an incredible post. Not only the bypass , but the method of hacking through WebKit source to find UX workarounds. |
|
| ▲ | doug_durham 3 hours ago | parent | prev | next [-] |
| 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 2 hours ago | parent [-] | | Do you mind if I ask what model iPad & version of iOS you were on? |
|
|
| ▲ | 2001zhaozhao 2 hours ago | parent | prev | next [-] |
| Wow very useful for my webgame! Apple pls don't notice |
|
| ▲ | iniekaas 4 hours ago | parent | prev | next [-] |
| This kinda felt good. |
|
| ▲ | nanapipirara 2 hours ago | parent | prev | next [-] |
| Please keep liquid glass out of websites… It is very distracting and useless. |
| |
| ▲ | matsemann an hour ago | parent [-] | | I guess in this post it served a purpose, it was the example of how a full site could react in 120 Hz to inputs. But man, is that effect how annoying it is to use iOS now? | | |
| ▲ | ridafkih an hour ago | parent | next [-] | | You're the first person who has made that criticism that actually understood why glass was used for the demo page. 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. | |
| ▲ | leokennis 26 minutes ago | parent | prev | next [-] | | I noticed that glass thing in the top right immediately on my iPhone. 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 | |
| ▲ | Barbing an hour ago | parent | prev [-] | | I don’t think so. The upper left icon was unusually distracting (iOS 27). |
|
|
|
| ▲ | faangguyindia 2 hours ago | parent | prev | next [-] |
| Still waiting for a Rust framework which can replace Flutter for Android and iOS development |
| |
| ▲ | 2001zhaozhao 2 hours ago | parent | next [-] | | I don't know about Rust framework, but Kotlin Multiplatform has always been a good option compared to Flutter. It has good interop so you can build actual native iOS UI while sharing business logic in Kotlin, or you can just build the UI in Compose Multiplatform (decently fast on iOS, literally native on Android which is the more important platform because Androids are slower). | |
| ▲ | zote an hour ago | parent | prev [-] | | Dioxus?
https://dioxuslabs.com/ |
|
|
| ▲ | catlifeonmars 4 hours ago | parent | prev | next [-] |
| 60fps is perfectly serviceable. That first example is updating _at most_ 60fps and that phrase is doing a lot of heavy lifting. What you see is <60fps jerks. This article feels disingenuous |
| |
| ▲ | ridafkih 25 minutes ago | parent | next [-] | | By "first example," do you mean the glass element on the top-left, or do you mean the first pair of grids? 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. | |
| ▲ | Rohansi 3 hours ago | parent | prev | next [-] | | Sure, dropping frames is worse, but why would it ever be acceptable for an app to cap itself at half the screen's refresh rate? Especially when the difference between 60 and 120fps is very noticeable? | | |
| ▲ | bigstrat2003 2 hours ago | parent [-] | | > Especially when the difference between 60 and 120fps is very noticeable? It's not really noticeable in my opinion. Hell, even 30 to 60 FPS isn't noticeable. | | |
| ▲ | arcanemachiner 2 hours ago | parent | next [-] | | There are two different kinds of people... | |
| ▲ | holoduke an hour ago | parent | prev | next [-] | | Oh it is. Going from 60 to 120 is a big difference. Even from 120 to 180 or 240 is a big difference. Everyone will notice it. Does it affect your productivity? Probably not. | |
| ▲ | r_lee an hour ago | parent | prev [-] | | are you just pretending or...? you can immediately notice when you scroll up and down | | |
| ▲ | swiftcoder 40 minutes ago | parent [-] | | As I understand it, a pretty significant percentage of people can't really see the difference between 60 and 120hz. I personally only notice it in a few edge cases |
|
|
| |
| ▲ | sgt an hour ago | parent | prev [-] | | Not sure why you are getting downvoted. The problem is NOT that it's capped to 60fps, it's the yanks and jerks. Which I guess could be a web platform or Safari issue, but 60fps in itself is smooth on native apps. |
|
|
| ▲ | CGamesPlay 4 hours ago | parent | prev | next [-] |
| That "liquid glass" scroll tracker widget is the best ocular migraine simulator I've ever encountered. If you've ever wanted to know what an ocular migraine looks like, look a few inches away from that thing and scroll the page. |
| |
| ▲ | jakespencer 4 hours ago | parent | next [-] | | Oh wow, you are right. I had to click away because I started feeling sick by association. | | |
| ▲ | trymas an hour ago | parent | next [-] | | Same, 5 seconds after scrolling and seeing that effect gave me a sense of sea-sickness and migraine (as you well said, probably just by association). | |
| ▲ | ridafkih an hour ago | parent | prev [-] | | Author here, I've added an option to hide it under the menu for future ocular migraine havers! |
| |
| ▲ | JohnTHaller 4 hours ago | parent | prev [-] | | This is accurate. Had a migraine aura last week. |
|
|
| ▲ | jkahrs595 4 hours ago | parent | prev | next [-] |
| > If you’re on iOS Safari I am. > you’ll immediately be able to tell which is which I cannot. lol |
| |
| ▲ | kalev 36 minutes ago | parent | next [-] | | Only iPhone 13 Pro and Pro Max models and newer support adaptive refresh rates of up to 120Hz, which are the devices this post is specifically aimed at. | |
| ▲ | sitharus 3 hours ago | parent | prev | next [-] | | Same, looks identical to me. Tried several different motions as well but can’t pick which is which. | | |
| ▲ | ckaik 2 hours ago | parent [-] | | Same as well. 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. |
| |
| ▲ | MBCook 3 hours ago | parent | prev | next [-] | | Not all iOS devices have 120 Hz screens. | |
| ▲ | Barbing an hour ago | parent | prev | next [-] | | They were night and day. iPhone 17 Pro, iOS 27 (not in low power mode) | |
| ▲ | convivialdingo 2 hours ago | parent | prev | next [-] | | My test was to rapidly wiggle the boxes up and down and I could see 4 shadows on one and 8 on the other. Definitely a difference. | |
| ▲ | Nursie 3 hours ago | parent | prev [-] | | Likewise. Maybe it’s my old-man (47) eyes, but I saw no difference! |
|
|
| ▲ | Rodmine 43 minutes ago | parent | prev | next [-] |
| Safari is one of the greatest pieces of niche applications. It has to be made exactly good enough for web browsing that users don’t feel like downloading an alternative but also exactly bad enough for building web apps on it so that developers are forced to create a native iOS app. |
| |
| ▲ | Alifatisk 9 minutes ago | parent | next [-] | | > It has to be made exactly good enough for web browsing that users don’t feel like downloading an alternative Is there really any alternatives? I use FF on iOS, but its still wrapped in Webkit, not Gecko. | |
| ▲ | rimliu 8 minutes ago | parent | prev [-] | | "Forced". 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. |
|
|
| ▲ | SV_BubbleTime 4 hours ago | parent | prev | next [-] |
| I have nothing to add on IOS or a 60fps website cap… but I did notice the “glass” UI element in the top left corner and how much more glass looking that is than whatever Apple tried to do. The chromatic aberrations are a nice touch. |
| |
| ▲ | marcellus23 4 hours ago | parent [-] | | Liquid Glass also has chromatic aberration. That sample on the website is actually pretty much exactly what certain configurations of Liquid Glass looks like. |
|
|
| ▲ | smolder 2 hours ago | parent | prev | next [-] |
| The unfortunate thing is that measuring framerate is another vector that lets you de-anonymize people, and shitty companies that operate what's left of the www all use advanced methods of de-anonymization so they can advertise or sell that shit to palantir. And governments are planning to make it illegal to have a website that isn't a spying apparatus. That's where we're at. The web is not going to be "free as in freedom" for much longer if we let trends continue. Stallman was right, outside of eating toenails or whatever. |
|
| ▲ | zb3 2 hours ago | parent | prev [-] |
| "Apple" should instead be named "Asshole", this describes their approach to web apps well.. |