In the Netscape Application Block, what value means an animated GIF should loop forever?

The story behind the answer

In the Netscape Application Block, a value of zero means an animated GIF should loop forever.

This convention belongs to the widely supported NETSCAPE2.0 Application Extension, created by Netscape in the 1990s to add looping behavior to GIF animations. The repeat value is stored as an unsigned 16-bit little-endian number. A zero value is reserved for continuous repetition rather than for a finite number of passes.

Finite values from 1 through 65535 tell a decoder how many repetitions to perform, although implementations and authoring tools have historically differed in whether they describe that number as repeats after the first pass or total plays. That terminology can cause confusion, but the special meaning of zero is the standard practical rule: keep looping indefinitely.

The original GIF89a specification defined application extensions but did not define the Netscape looping block itself. Netscape’s convention became a de facto standard because browsers and image software adopted it. Removing the block generally leaves an animation to play once, depending on the decoder.

Source: Wikipedia · fact-checked Sept. 2026

Add question to a list

Choose a list to keep this question in: