From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?=C3=93scar_Fuentes?= Newsgroups: gmane.emacs.help Subject: Re: eww/shr: a method for ignoring elements? Date: Sun, 27 Dec 2015 01:20:21 +0100 Message-ID: <8737uovj22.fsf@wanadoo.es> References: <87bn9conkh.fsf@gnus.org> <877fk0vlge.fsf@wanadoo.es> <87ege8n5oh.fsf@gnus.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1451175652 27230 80.91.229.3 (27 Dec 2015 00:20:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 27 Dec 2015 00:20:52 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Lars Ingebrigtsen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Dec 27 01:20:42 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aCz4j-0007yJ-Fo for geh-help-gnu-emacs@m.gmane.org; Sun, 27 Dec 2015 01:20:41 +0100 Original-Received: from localhost ([::1]:40408 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aCz4i-0006yS-Ia for geh-help-gnu-emacs@m.gmane.org; Sat, 26 Dec 2015 19:20:40 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43273) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aCz4W-0006yL-1k for help-gnu-emacs@gnu.org; Sat, 26 Dec 2015 19:20:31 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aCz4S-0006sm-6j for help-gnu-emacs@gnu.org; Sat, 26 Dec 2015 19:20:27 -0500 Original-Received: from smtp22.acens.net ([86.109.99.146]:33520 helo=smtp.movistar.es) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aCz4R-0006si-SC for help-gnu-emacs@gnu.org; Sat, 26 Dec 2015 19:20:24 -0500 X-CTCH-RefID: str=0001.0A0B0204.567F2EC6.007D, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown Original-Received: from qcore (83.43.197.156) by smtp.movistar.es (8.6.122.03) (authenticated as 981711563$telefonica.net) id 56663A2201428FAF; Sun, 27 Dec 2015 00:20:22 +0000 In-Reply-To: <87ege8n5oh.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 27 Dec 2015 00:36:30 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 86.109.99.146 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:108493 Archived-At: Lars Ingebrigtsen writes: > =C3=93scar Fuentes writes: > >> Lars Magne Ingebrigtsen writes: >> >>> See `shr-blocked-images'. >> >> Thanks Lars, although that variable affects only images. >> >> My primary use case is related to blocking trackers, > > What kind? Things like google-analythics and disqus. When one of those do not respond, for whatever reason, eww just waits for a long time. This is part of the message sequence of a web page I just visited: Contacting host: feeds.nature.com:80 Opening TLS connection to =E2=80=98disqus.com=E2=80=99... Opening TLS connection with =E2=80=98gnutls-cli --insecure -p 443 disqus.co= m=E2=80=99...done Opening TLS connection to =E2=80=98disqus.com=E2=80=99...done Opening TLS connection to =E2=80=98a.disquscdn.com=E2=80=99... Opening TLS connection with =E2=80=98gnutls-cli --insecure -p 443 a.disqusc= dn.com=E2=80=99...done Opening TLS connection to =E2=80=98a.disquscdn.com=E2=80=99...done If disqus.com responds quickly, there is no problem. But if it is slow or unresponsive (something that happens a few days every other month) eww hangs on Opening TLS connection with =E2=80=98gnutls-cli --insecure -p 443 disqus.co= m=E2=80=99...done At that point pressing C-g makes the same message reappear (it seems that eww re-tries the operation) which hangs again. Several C-g's are required to unblock eww (and Emacs). To make things worse, every now and then Emacs crashes on that sequence of C-g's. And all this for accessing a site that provides nil or negative value to the page's content. >> javascript-based commentary sections (disqus, bazaar-voice) and >> similar stuff. > > shr doesn't do JS... I know, but the sites are contacted anyways (eww has no way to know that the content being asked for depends on the availability of JS.) >> Besides privacy control, too often eww hangs because the sites which >> are contacted by those elements do not respond quickly and it is >> necessary to press C-g several times to make eww responsive again. > > Images should be loaded asynchronously. The only synch element should > be the DNS resolution, which we must make asynch one of these days. Images is not the worst problem (although moving content around for showing an image after you begun to read the text is more annoying on a text-based browser than on a GUI-based one, in my experience, and implementing a poor-man's version of Ad-Block would be nice too), but the problem is with eww blocking while it contacts stuff mentioned on the HTML, see above.