Categories: SoftwareWorkspace

Mozilla Explores Faster Web Loading With Mozjpeg Encoder

The Mozilla Foundation is seeking to improve the loading speeds of web pages with the launch of its ‘Mozjpeg’ Project.

The aim of the project is to “provide a production-quality JPEG encoder that improves compression while maintaining compatibility with the vast majority of deployed decoders.”

Better Compression

The project has developed a faster JPEG encoder that claims to to reduce file sizes by up to 10 percent on standard JPEG images.

JPEG is the most commonly used photography and image format used on the Internet (ahead of GIF and PNG files). Indeed, the file format is also one of the most commonly used by all types of software, including Microsoft Office and Adobe Photoshop. So anything that can be done to reduce the size of JPEG images could dramatically improve loading times of web pages.

.uk domain name, Web address © Pavel Ignatov Shutterstock 2012“JPEG has been in use since around 1992,” explained Josh Aas, a senior technology strategist at Mozilla Corp, in a blog post. “The number of photos displayed by the average Web site has grown over the years, as has the size of those photos. HTML, JS, and CSS files are relatively small in comparison, which means photos can easily make up the bulk of the network traffic for a page load. Reducing the size of these files is an obvious goal for optimization.”

But according to Aas, production JPEG encoders have largely been stagnant in terms of compression efficiency. So the Foundation talked with a number of engineers to see if JPEG encoders have really reached their full compression potential after 20+ years.

Faster Loading

“We concluded that the answer is ‘no,’ even within the constraints of strong compatibility requirements,” Aas wrote. “With feedback on promising avenues for exploration in hand, we started the ‘mozjpeg’ project.”

Mozilla has therefore released version 1.0, which is a fork of libjpeg-turbo (a popular open-source JPEG codec) and combined it with ‘jpgcrush’ (a popular Perl script). Mozilla said it can now reduce file sizes, typically by 2-6 percent for PNGs encoded to JPEG. However with average JPEG file sizes, it achieved an average 10 percent reduction using a sample of 1,500 JPEG files from Wikimedia.

“It does this by figuring out which progressive coding configuration uses the fewest bits,” said Aas. “So far as we know, no production encoder has this functionality built in, so we added it as the first feature in ‘mozjpeg’.”

And the next step is to improve the encoding by making use of ‘trellis quantization‘, which is an algorithm that is typically used for video compression purposes.

The news that Mozilla is seeking to improve the loading speeds of web pages will be welcomed by many Internet users around the world. Less welcome news however is Mozilla’s intent to incorporate advertising to its Firefox web browser, through a new feature called ‘Directory Tiles’, which will replace some of the empty tiles which appear when opening a new tab.

Are you a Firefox enthusiast? Take our quiz!

Tom Jowitt

Tom Jowitt is a leading British tech freelancer and long standing contributor to Silicon UK. He is also a bit of a Lord of the Rings nut...

Recent Posts

NASA, Boeing To Begin Starliner Testing After ‘Anomalies’

American space agency prepares for testing of Boeing's Starliner, to ensure it has two space…

2 days ago

Meta Launches Friends Tab, As Zuck Touts ‘OG Facebook’

Zuckerberg seeks to revive Facebook's original spirit, as Meta launches Facebook Friends tab, so users…

2 days ago

WhatsApp Appeal Against EU Fine Backed By Court Advisor

Notable development for Meta, after appeal against 2021 WhatsApp privacy fine is backed by advisor…

3 days ago

Intel Board Shake-Up As Three Members Confirm Retirement

First sign of shake-up under new CEO Lip-Bu Tan? Three Intel board members confirm they…

3 days ago

Trump’s SEC Pick Pledges ‘Coherent’ Crypto Rules

Trump's nominee for SEC Chairman, Paul Atkins, has pledged a “rational, coherent, and principled approach”…

3 days ago