Jorge wrote:
On Sun, Sep 06, 2009 at 11:17:25PM +0000, corvid wrote:
I just put together a somewhat hacky patch to add "same host" and "same domain" for image loading from the tools button (or dillorc) http://www.dillo.org/test/img_loading_options.patch
I ran on it as long as I could tolerate images over dialup (not long :), so here it is, and I will clean it up if there is interest shown in getting it into dillo.
Good! I've had a similar idea for a long time.
Since before the url filtering thread, I believe a simple blocking scheme based on same host/domain cuts most of the problem (bandwidth, privacy, tracking, web bugs etc).
I'd suggest to add the filtering function in Capi. This is to make a_Capi_open_url() call a check function, e.g.
if (Capi_filters_check_url(...) < 0) /* abort */
(you may add a ParentUrl DilloUrl to the webstructure).
The point is to be able to reuse and improve the filter. (e.g. for CSS urls, sound streams, etc).
(I would probably want to change the names of the dillorc choices for image loading, make the internal value into an enum, look at the loadImages/autoload_image code duplication, etc., etc... Oh, and look up how to fix the tools menu width...)
Something like:
filter_remote_resources = {LOAD_ALL, SAME_HOST, SAME_DOMAIN}
should be enough to get started.
I made a new one: http://www.dillo.org/test/filtering.1.patch It doesn't have the menu stuff, so you have to set the preference.