VeryEasyTools

Tech notes

Why Do Phone Browsers Reload on Big Files? Memory Limits and How to Stay Under Them

VeryEasyTools · 4 min read

Reload at 580 MBiPhone Safari: 410 MB was fine

How this was measured

Devices
iPhone (Safari), Mac (Chrome)
Tests
Growing the output of a video trim until the tab reloaded; processing several photos one after another
Math
One image in memory = width × height × 4 bytes (red, green, blue, alpha)
Measured
October 2026 (video), November 4, 2026 (photos)

Work on a large video in a web page on your phone and the page can suddenly jump back to the start. It reloads without any error message, so it’s hard to tell what went wrong. Most of the time, the tab has used more memory than it’s allowed. While building tools that process files entirely in the browser, I measured that limit and worked around it. Here is how.

Why the tab reloads

When a phone runs low on memory, the operating system clears out whatever you’re least likely to notice. iPhone Safari runs each web page in its own process, and when one page uses too much, the system ends that process. Safari then loads the page again, which to you looks like a sudden refresh. If it keeps happening, you may see “A problem repeatedly occurred”.

There is no published number for how much one tab can use. It depends on the device’s total memory, what other apps are using and the OS version, so I had to measure it myself. Android Chrome and desktop browsers work on the same principle, but computers have memory to spare and survive much larger files.

Trimming video: 410 MB worked, 580 MB reloaded

Trimming doesn’t load the whole original into memory. The file is read piece by piece as needed (WORKERFS), so even a 600 MB original opened on the iPhone without trouble. What takes up memory is the new file being created, because the result builds up in memory until you save it.

I tested iPhone Safari with larger and larger outputs: a 410 MB result was created, and at 580 MB the tab reloaded. To leave some margin, I set the output limit on phones to 300 MB. Before trimming, the size is estimated as original size × (selected length ÷ total length), and if it’s over the limit you’re asked to shorten the selection before anything starts. Being stopped up front is far less frustrating than a reload halfway through.

On computers the limit is 1.5 GB. If Chrome reports 4 GB of device memory (navigator.deviceMemory), it drops to 1 GB, and at 2 GB or less to the same 300 MB as phones. Safari and Firefox don’t report this value, so the site tells phones from computers by whether it’s a touch device, not by screen width.

One photo is bigger than you think

A photo file is a few megabytes, but to draw or compress it, the browser has to unpack it to 4 bytes per pixel (red, green, blue, alpha). At that point the size depends on the pixel count, not the file size.

Photo Pixels Unpacked size
iPhone default (4032 × 3024) 12 MP about 49 MB
iPhone high resolution (5712 × 4284) 24 MP about 98 MB
Long side reduced to 2048 (2048 × 1536) 3.1 MP about 13 MB

A single 2.4 MB HEIC photo becomes 98 MB in memory. Hold the original, a result to compare it with and an intermediate resized copy at the same time, and you’re quickly in the hundreds of megabytes. While I was building the photo compressor, a test page that kept several large comparison images around reloaded on the second or third photo on an iPhone. So I changed it to process photos one at a time and release large images as soon as they’re done. After that change, many photos in a row went through without a reload.

Animations cost memory for every frame

The Boomerang option in Video to GIF holds every frame of the clip in memory so it can play them backward. Each frame is width × height × 4 bytes, multiplied by the number of frames.

Settings Frames Memory
480 px wide, 12 fps, 10 seconds 120 about 60 MB
640 px wide, 15 fps, 15 seconds 225 about 200 MB

So I set the limits on GIF length and width based on this memory math, not just by the size of the output file. It’s why the length limit on phones (15 seconds) is half the one on computers (30 seconds).

WebAssembly memory is one big block

The video tools run ffmpeg as WebAssembly. A WebAssembly program gets its memory as one large block. If it starts small and runs out, the whole block is enlarged, and moving the contents to the new place can briefly need two copies. And once it has grown, the block doesn’t shrink back when the job is done.

That’s why this site doesn’t leave results inside the engine. As soon as a file is ready it is taken out, and the copy inside the engine is deleted right away, so the same result exists twice for as little time as possible. If a job fails or is canceled, the engine is shut down completely and set up fresh for the next one, so the next job doesn’t inherit a memory block that may be in a bad state.

How to avoid it: if you build tools

If your tool handles large files in the browser, these help:

  • Don’t read the whole original. Slice the file object and read only what you need; then even videos over 1 GB never have to sit in memory.
  • Estimate the output size and stop before starting. A reload mid-way throws away all the time already spent.
  • One at a time, and release when done. Don’t keep many images unpacked; drop references to large images and buffers as soon as you’re finished with them.
  • Measure limits on real devices. There is no published number, so find what works and what doesn’t, and leave a margin.

How to avoid it: if you’re using such a tool

  • Don’t switch to another app while it’s processing. The iPhone takes memory and the video chip back from off-screen pages first.
  • Close other tabs, and larger files will go through.
  • For jobs past the limit, use a computer. The same tool handles results about five times larger there than on a phone.

Try it yourself

Cut just the part you need out of a long video, at its original quality.

Open Trim Video →
All blog posts →