Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Firefox 4.0: Improper handling of Animated Gif background-image

  • 2
  • 35
  • 4 views
  • Nzaghachi ikpeazụ nke mti131

more options

FF 4.0 is giving erratic and incorrect displays of an animated gif on a project I am working on. I have prepared a very small sample that demonstrates the problem.

The problem occurs when an animated gif is used as the background-image for a div (it may also be true when used as a background-image for the body, but I have not tested that).

When a page is first loaded, the animated gif displays properly.

I would expect that the animation be displayed as animated either:

  1. On each page load
  2. On a page load with new session or when the image is removed from cache prior to loading the page. Otherwise the last frame of the image would show

The sample page is designed to test this.

IE: Behaved as in #1, i.e. the image was animated on each and every page load. (IE 8: 8.0.6001....)

Google Chrome: Behaved as in #2, i.e. the image is animated only when there is a new session or when the image is no longer in cache. (Version 10.0.648.204)

FF 3.6.8: Slightly strange, but acceptable.

  • The image is animated on new session and on any reload button.
  • The last frame is displayed if the location is reentered in the URL bar.
  • The last frame is displayed if the back/forward navigation buttons are used.
  • SOMETIMES the image is animated and sometimes the last frame is displayed when the change page button is pressed (i.e. Javascript change page).

FF 4.0: Just plain NOT acceptable

  • Correctly animates the image on page load for new session
  • Correctly animates the image on reload button following clearing the image from cache.
  • INCORRECTLY shows the FIRST gif frame if the reload button is pressed.
  • INCORRECTLY shows the FIRST gif frame if the URL is reentered from the URL bar.
  • INCORRECTLY shows the FIRST gif frame if the page change button is pressed (i.e. Javascript change page).
  • INCORRECTLY shows the FIRST gif frame if theURL is reentered from the URL bar after clearing the image from cache.
  • INCORRECTLY shows the FIRST gif frame if the page change button is pressed (i.e. Javascript change page) after clearing the item from cache.

All of these tests were run with Windows XP-Pro (all service packs and updates applied).

I can find no clear specification as to what should happen with pages using animated gifs that are already loaded.

  • I can conceive of rationales for always displaying with animation.
  • I can also conceive of rationales for sometimes displaying the last frame, especially if the same page is being reloaded since many sites reload the same page in response to user form submissions.
  1. I can see no rationale for displaying the first frame of the gif and would suggest that this is a bug.
FF 4.0 is giving erratic and incorrect displays of an animated gif on a project I am working on. I have prepared a very small sample that demonstrates the problem. The problem occurs when an animated gif is used as the background-image for a div (it may also be true when used as a background-image for the body, but I have not tested that). When a page is first loaded, the animated gif displays properly. I would expect that the animation be displayed as animated either: # On each page load # On a page load with new session or when the image is removed from cache prior to loading the page. Otherwise the last frame of the image would show The sample page is designed to test this. IE: Behaved as in #1, i.e. the image was animated on each and every page load. (IE 8: 8.0.6001....) Google Chrome: Behaved as in #2, i.e. the image is animated only when there is a new session or when the image is no longer in cache. (Version 10.0.648.204) FF 3.6.8: Slightly strange, but acceptable. * The image is animated on new session and on any reload button. * The last frame is displayed if the location is reentered in the URL bar. * The last frame is displayed if the back/forward navigation buttons are used. * SOMETIMES the image is animated and sometimes the last frame is displayed when the change page button is pressed (i.e. Javascript change page). FF 4.0: Just plain NOT acceptable * Correctly animates the image on page load for new session * Correctly animates the image on reload button following clearing the image from cache. * INCORRECTLY shows the FIRST gif frame if the reload button is pressed. * INCORRECTLY shows the FIRST gif frame if the URL is reentered from the URL bar. * INCORRECTLY shows the FIRST gif frame if the page change button is pressed (i.e. Javascript change page). * INCORRECTLY shows the FIRST gif frame if theURL is reentered from the URL bar after clearing the image from cache. * INCORRECTLY shows the FIRST gif frame if the page change button is pressed (i.e. Javascript change page) after clearing the item from cache. All of these tests were run with Windows XP-Pro (all service packs and updates applied). I can find no clear specification as to what ''should'' happen with pages using animated gifs that are already loaded. * I can conceive of rationales for always displaying with animation. * I can also conceive of rationales for sometimes displaying the last frame, especially if the same page is being reloaded since many sites reload the same page in response to user form submissions. # '''I can see no rationale for displaying the first frame of the gif and would suggest that this is a bug. '''

All Replies (2)

more options

Can be this bug:

  • Bug 641198 – Rollover animated gif show only one frame.

You can try these nightly test builds to see if they behave better:

Fx5.0  ftp://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-aurora
Fx6.0  ftp://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-central

Create a new profile exclusively for each Firefox version and create a desktop shortcut with -P "profile" appended to the target to launch each Firefox version with its own profile.

See these mozillaZine KB articles for information:

more options

I have also a problem with animated GIFs used as background images in the horizontal menu (defined in styles.css #menuPrincipal a:hover). Only the first frame of the GIF appears after some attempts. Clearing the cache didn't solve the problem. I have this problem with firefox 4 only, it works well with firefox 3.6. Site : http://www.energiedentaire.fr