Setting the frame disposal method is a good way to optimize a animated gif. There is much information online about it, and frame disposal code spec is given in https://www.w3.org/Graphics/GIF/spec-gif89a.txt.
For example if your gif has a static background then you can optimize the animation a lot that way. I have added a dispose code setting as pull request https://github.com/jnordberg/gif.js/pull/72.
Setting the frame disposal method is a good way to optimize a animated gif. There is much information online about it, and frame disposal code spec is given in https://www.w3.org/Graphics/GIF/spec-gif89a.txt.
For example if your gif has a static background then you can optimize the animation a lot that way. I have added a dispose code setting as pull request https://github.com/jnordberg/gif.js/pull/72.