Simplifying subscription downloads module [Done] · 2013-02-04 08:18 by Wladimir Palant
Done, this proposal has been implemented as of 2013-07-08.
The module responsible for updating subscriptions is one of the most complicated components of Adblock Plus, also one that is notoriously complicated to test properly. Much of the code here is outdated for one reason or another.
- Some parameters can be specified as HTTP headers, others as special comments, sometimes both. The HTTP headers are hard to add and seem to be unreliable, they don’t always make it to the client.
- The format of the special comments is inconsistent, with the update interval comment being a special case. Documentation is also inconsistent and in some cases simply non-existent.
- Some of the parameters have been proven as not useful.
- Default update interval is daily which isn’t a good default.
- Specifying update intervals below a day isn’t possible.
- Remove the unnecessary complexity.
- Get rid of inconsistencies and unreliable approaches.
Last-Modifiedheader should no longer be handled, it isn’t effective to reduce traffic.
X-Alternative-Locationsheader should no longer be handled (this is subject to another proposal).
ExpiresHTTP header should no longer be handled. Update interval should be specified via comment only, standard format like
! Expires: 2 daysshould be required. The default update interval should be five days and the lowest possible update interval should be one hour.
- HTTP redirects should no longer get any special handling, handling of the special
Redirectcomment should be improved instead. In case of a
Redirectcomment pointing to a different location Adblock Plus should ignore the filters and try downloading from the new address immediately rather than waiting several days. If the download succeeds after no more than 5 redirects then the address of the filter subscription should be changed.
- Drop support for parameters in the subscription address (currently only Adblock Plus version), this was never documented and isn’t used anywhere.
- The special comments should be documented in the filters guide where subscription authors will see them, not in the FAQ any more.
- The actual download logic should be refactored into a separate module so that it can be reused by URL Fixer / typo correction feature.
Commenting is closed for this article.