Achieving a full 120 Hz input and rendering capability in iOS Safari web applications, utilizing native scroll containers and OffscreenCanvas, represents a significant advancement for platform performance.
Earlier, Devon Govett of React Aria presented "Scrolling is All You Need: Building a Swipeable Sheet" in October, detailing his team's work on a sheet component that skillfully exploits the physics and smooth interactions inherent to native browsers to simulate a native feel. More recently, Jordan Walke, the creator of React, shared a video on X showcasing a convincing, native-like mobile interaction achieved through DOM and CSS. This development reignited a long-standing technical challenge for the author, prompting this response, though the author noted that any construction using this method would inherently be constrained to 60 FPS.
The video posted by Jordan Walke omits a crucial detail: without enabling the "Prefer Page Rendering Updates near 60fps" flag located deep within the Safari developer settings on iOS, WebKit restricts requestAnimationFrame to just 60 Hz on a 120 Hz screen, and touch and pointer events are similarly capped on a standard page. This limitation is what contributes to the irritating feel of even the best mobile websites. The objective then became finding a method to mitigate this subpar experience without relying on developer flags.
Drawing from the React Aria contribution, the reason those interactions feel so refined is that scrolling is managed by the compositor, operating in its own dedicated thread. This process handles movement, clipping, and fading without requiring a round trip through JavaScript. The flow is: finger to digitizer, digitizer to compositor, and finally to the GPU. This mechanism will form the foundation of the interaction being explored.
Two grids were presented for comparison, both animating a square upon dragging. The grid on the left relies on JavaScript events to set the CSS transform attribute, whereas the grid on the right simply positions a square within a scrollable area. On iOS Safari, the distinction is immediately apparent: one refreshes at a maximum rate of 60 times per second during a renderer pass, while the other utilizes the compositor.
To harness the capabilities of the scroll area, a method was required to ascertain the scroll position outside of the rendering pipeline. If this could be accomplished, the scroll area could be treated akin to a trackpad, or its native behaviors like bounce, momentum, and physics could be extracted and applied directly from the compositor to custom animations. The potential flexibility of this approach was immense if the values could be retrieved frequently enough.
Measurements on an iPhone Duo indicated that scroll events updated between 5 and 26 times per second during momentum scrolling. The most favorable scenario, during slow, deliberate scrolling, approached 60 updates per second, which was deemed insufficient. The strategy then shifted toward synchronously reading `scrollTop` and `scrollLeft`.
Initial attempts included having a `MessageChannel` call itself recursively, which functioned but resulted in 50,000 reads per second using only 80 distinct values—a considerable waste of resources and heat due to pinning a CPU core. A subsequent failure involved employing `Atomics` to trigger at the screen's refresh rate; this succeeded in extracting 80 distinct positions per second, but the associated drawbacks were too severe. Because it mandates a `SharedArrayBuffer`, the implementation necessitates COOP/COEP headers, which consequently disrupts cross-origin assets on the website.
The successful method ultimately involved utilizing a `MessageChannel` similarly to the first attempt, but throttling the subsequent measurement to the next tick using a `setTimeout` synchronized to the device's refresh rate, phase-locked using `requestAnimationFrame` timestamps. Despite initial apprehension regarding this technique, it proved effective. The sole remaining limitation specific to this solution was that iOS rounds `performance.now()` to the millisecond, necessitating the derivation of the minimum time between draws from the refresh interval.
All tested solutions yielded 80 position readings per second, which constitutes two-thirds of the 120 Hz input goal. Safari's UI process communicates one scroll position to the web process at a time, awaiting confirmation before transmitting another, which caused subsequent incoming data to be overwritten, leading to lost position updates. Investigation within WebKit revealed a workaround: when a rendering update is queued for the page, Safari flushes the position without waiting. Executing an empty `requestAnimationFrame` loop achieved this, boosting reads by approximately 12.5% and reaching 90 unique position reads per second.
It was initially assumed that the Inter-Process Communication (IPC) limit had been reached, but it turned out that ProMotion was merely deciding not to render at a refresh rate exceeding 90 Hz. Obtaining the final 30 Hz proved more challenging. A GPU-accelerated CSS animation allows the screen to operate at 120 Hz, but only while scrolling is occurring. Therefore, a small, imperceptible scroller is kept active in the background, poised to boost performance to the full ProMotion refresh rate whenever needed. Naturally, the display should not be locked at 120 Hz constantly, so the techniques used to achieve this are reserved for periods when animations are anticipated: touch events, scroll-derived animations, etc. If the interaction does not require momentum, rubber banding, or snapping, the entire mechanism can be bypassed by simply using a passive `touchmove` listener on the controller, which fires at the full 120 Hz; this immediately provides updates from the controller at 120 Hz.
One remaining issue was that `scrollTop` and `scrollLeft` are rounded to the nearest integer, despite iOS scrolling with sub-point accuracy. This was easily resolved by scaling the scrollable surface up by the device pixel ratio and then scaling its container back down by the reciprocal. If the viewport itself is to be used as the controller, an invasive approach involves setting the initial-scale in the same manner, though this carries certain caveats: units must be scaled by the DPR, text autosizing must be disabled, and safe areas require manual scaling. Furthermore, tiny text-selection indicators will appear. These are trade-offs, but not mandatory.
Henceforth, these scrolling grids will be referred to as "controllers" because they function identically to one. The requirement is simply to render one invisible and position it over the area where high-frequency input is desired. It should be noted that the page itself can also function as a controller, but Safari throttles reported scroll positions to 10 Hz during the URL bar resize that occurs when the scroll direction is altered. WebKit bypasses this throttling if the page features a scroll-driven animation animating a non-GPU-accelerated attribute, which the author achieved by transitioning between two transparent colors. This grants high-frequency input, but since the DOM itself only updates 60 times per second, leveraging it as is would result in updating a value twice for every drawn frame, offering the user no benefit.
The majority of dragging interactions are already handled by the controllers, and predetermined animations are covered by CSS animations. However, what about more complex interactions, such as computation-derived layouts or shaders? Inquiries directed toward search engines or AI systems regarding "How to render canvas content on iOS at 120 Hz without feature flag?" yield a consensus of fundamental impossibility within iOS Safari. Even WebKit’s own bug tracker shows numerous requests for this functionality. Game-engine developers, such as Ink & Switch, have even cited Capacitor & Tauri for relying on private APIs. Google's response confirms this, stating: "There is no public web API or standard JavaScript workaround to force HTML5 <canvas> (requestAnimationFrame) to run at 120 Hz on iOS Safari without changing the system feature flag." Fable 5.2 echoes this sentiment. The concise answer is that JavaScript-drawn canvas frames cannot achieve this on iOS. WebKit limits page rendering updates (when canvas content is presented) to 60 Hz unless the user disables the flag, and no web API overrides this. "Timer-based loops (setTimeout, MessageChannel) won't help, in my understanding: you can draw more often, but the result is still presented at the 60 Hz rendering update." Low Power Mode introduces further throttling.
The author initially focused solely on scroll mechanics, attempting to break workers, pre-rendering permutation "flip-books," and even live-generating video. All these attempts proved too sluggish, jagged, or demanded excessive RAM, leading to crashes in the WebKit process. After seven attempts and significant investigation into WebKit's source code by various agents, the solution involving OffscreenCanvas was found. In WebKit on iOS, creating a canvas element and invoking `transferControlToOffscreen` yields an OffscreenCanvas. The original canvas becomes a placeholder, and WebKit (adhering to the HTML specification's recommendation) skips waiting for the next rendering pass when an OffscreenCanvas submits a frame. Unlike previous endeavors, this method is easy on battery life without workarounds and only consumes memory proportional to what is needed for a higher-frequency backing store. This provided 120 FPS rendering on iOS WebKit canvases.
By integrating these components, it becomes possible to accept input at 120 Hz and render the output at the identical frame rate. The initial implementation involved creating a small UI replica of Ando’s mobile application, complete with a Liquid Glass tab bar, buttons, and fluid navigation interactions. Once installed as a Progressive Web App (PWA), the author repeatedly had to verify they were not interacting with the native application. This page features two custom "Liquid Glass" elements in the viewport, each rendering at the full device refresh rate. Achieving this performantly and convincingly requires careful design. Upon initial page load, a snapshot is captured and loaded into a WebGL texture, which serves as the base for a composite fed into a shader. As the page scrolls, the region beneath each component is sampled to generate the effect.
Why it matters
For platform and security focused readers, this represents a significant technical hurdle in achieving truly native-feeling web experiences on high-refresh-rate mobile devices. Mastering these low-level browser interactions is critical for building high-performance, production-ready applications.






