Popular ad-blocking browser extension AdBlock has added a new feature that will cache popular JavaScript libraries locally on the users' computers.
The feature is currently available only via the AdBlock Chrome extension, but an AdBlock spokesperson tells Bleeping Computer the feature will be added to the Firefox add-on as well.
Users will need to update to the latest version of their AdBlock Chrome extension, go to the extension's settings panel and enable the "Enable local content caching for popular website libraries."
How the new feature works
By default, the AdBlock extensions intercept web traffic and block the loading of resources from known advertising-related domains. This new feature will use AdBlock's preexisting capabilities to look for popular JavaScript libraries in a website's source code, skip loading the remote library, and load it from a local folder instead.
"For now, we are starting with jQuery, since it's very widely-used," an AdBlock told Bleeping Computer via email. Caching for more libraries will be added in future versions.
"We'd look at Bootstrap and Modernizr next since they are also used widely," AdBlock told us. "Then it would be things like AngularJS, Dojo, etc."
For users who want to keep an eye on what is cached and what not. On Windows, all files are cached locally in:
C:\Users\<username>\AppData\Local\Google\Chrome\User Data\Default\Extensions\gighmmpiobklfepjocnamgkkbiglidom\< version >\localLib
AdBlock says it started working on this feature for two reasons. First, by serving files from a local folder it means that sites will load faster. Second, is related to user privacy, and most specifically for JavaScript files loaded from CDNs (Content Delivery Networks).
New feature also blocks CDN-based tracking
"Many of the most widely-used CDNs are operated by large technology companies, like Google and Microsoft," AdBlock says. "It is possible that these companies are tracking requests to their CDNs in a way that could be tied back to individual users."
By keeping copies of popular JavaScript libraries in a local folder, AdBlock prevents this additional tracking behavior.
As evident from the screenshot above, the local caching feature is still in beta, and bugs may arise when users enable the feature.
One such bug is related to sites using SRI (Subresource Integrity), a security feature for validating the authenticity of JS and CSS resources.
Similar to Decentraleyes
Security researcher Mike Gualtieri spotted the bug and told Bleeping Computer about it. But overlooking the bug, Gualtieri was impressed with AdBlock's new feature. "At a glance, I really like this," the researcher says.
"I personally use Privacy Badger to block potential 3rd party resources that may be tracking me online and it works really good. But, CDN's can still track you even if their cookies are being blocked," Gualtieri adds. "Local caching of resources is a very good solution to this problem."
Gualtieri also pointed out that this new AdBlock feature is very similar to the Decentraleyes extension [Firefox, Chrome] that was launched two years ago.
Article updated with the file path where files are cached.
Comments
TheDcoder - 6 years ago
uBlock Origin, Privacy Badger and Decentraleyes. That's all you need... for Firefox atleast.