Firefox logo

Firefox 57, released last month, includes a secret feature that will delay the loading of tracking scripts —JavaScript code loaded from known tracking domains such as advertising, analytics, and social networks.

Honza Bambas, the Mozilla engineer who developed this feature calls the process "tailing."

Tailing improves page load times

Work on this feature started eight months ago, and Bambas says he came up with the concept in order to prioritize the processing of resources needed to render the actual page and have it ready for user interaction as soon as possible, while separating and delaying unimportant tracking scripts.

"This has a positive effect on page load performance as we save some of the network bandwidth, I/O and CPU for loading and processing of images and scripts running on the site so the web page is complete and ready sooner," Bambas says.

Tracking scripts are not blocked entirely but only delayed. Based on current Firefox settings, tracking scripts are delayed for a maximum of six seconds, after which they are loaded regardless if the underlying web page has finished loading or not.

Tailing efficient against modern JS tracking

The tracking script tailing delay does not work all the time. Firefox will delay scripts only when they are added dynamically to a page or via an async call.

By default, websites will load JavaScript files via sync calls. This doesn't affect tailing too much because most modern websites are built using JavaScript libraries that load JavaScript resources in parallel (async) instead of one after the other (sync).

Further, most advertising networks also load their code via async calls, meaning the Firefox tailing feature will be efficient in most scenarios.

Ad and analytics industries are not angry

Surprisingly, the delay of tracking scripts does not anger people in the advertising and analytics industry. An employee of an web analytics company says this helps the industry.

"From what is described here, it may actually help us. When folks throw tons of tags into their site, we're all competing against each other as well as the site's own loading, it makes sense to prioritize the site's rendering," said John Clover, an engineer for Heap Analytics. "I think Mozilla's heart is in the right place."

Most users often blame sketchy advertising and tracking code for delaying a site's loading process. With Mozilla putting the focus on code needed to render the page, sites will load faster, and users will be able to use them sooner. Analytics firms don't lose anything in the process. The tracking scripts will still load, but with fewer user complaints.

A quick look at the Firefox about:config page reveals the existence of a few parameters that users can adjust. Users can edit the first two parameters (network.http.tailing.delay-quantum-after-domcontentloaded and network.http.tailing.delay-quantum) to change the minimum delay values, the third (network.http.tailing.delay-max) for the maximum value, and the last (network.http.tailing.enabled) to disable or enable the tailing effect altogether.

Firefox 57 tailing options

Related Articles:

Firefox Now Shows Warnings On Sites with Data Breaches

Mozilla Added WebP Image Support to Firefox 65

Mozilla Firefox to Support Google's WebP Image Format

Mozilla Firefox Adding Setting to Disable Recommended Extensions

Mozilla Firefox 63 Released with Enhanced Tracking Protection and More