Rebuild the user manual with listen-backlog documentation
[privoxy.git] / doc / webserver / user-manual / actions-file.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
3 <html>
4 <head>
5   <title>Actions Files</title>
6   <meta name="GENERATOR" content=
7   "Modular DocBook HTML Stylesheet Version 1.79">
8   <link rel="HOME" title="Privoxy 3.0.27 User Manual" href="index.html">
9   <link rel="PREVIOUS" title="The Main Configuration File" href=
10   "config.html">
11   <link rel="NEXT" title="Filter Files" href="filter-file.html">
12   <link rel="STYLESHEET" type="text/css" href="../p_doc.css">
13   <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
14   <link rel="STYLESHEET" type="text/css" href="p_doc.css">
15 </head>
16 <body class="SECT1" bgcolor="#EEEEEE" text="#000000" link="#0000FF" vlink=
17 "#840084" alink="#0000FF">
18   <div class="NAVHEADER">
19     <table summary="Header navigation table" width="100%" border="0"
20     cellpadding="0" cellspacing="0">
21       <tr>
22         <th colspan="3" align="center">Privoxy 3.0.27 User Manual</th>
23       </tr>
24       <tr>
25         <td width="10%" align="left" valign="bottom"><a href="config.html"
26         accesskey="P">Prev</a></td>
27         <td width="80%" align="center" valign="bottom"></td>
28         <td width="10%" align="right" valign="bottom"><a href=
29         "filter-file.html" accesskey="N">Next</a></td>
30       </tr>
31     </table>
32     <hr align="left" width="100%">
33   </div>
34   <div class="SECT1">
35     <h1 class="SECT1"><a name="ACTIONS-FILE" id="ACTIONS-FILE">8. Actions
36     Files</a></h1>
37     <p>The actions files are used to define what <span class=
38     "emphasis"><i class="EMPHASIS">actions</i></span> <span class=
39     "APPLICATION">Privoxy</span> takes for which URLs, and thus determines
40     how ad images, cookies and various other aspects of HTTP content and
41     transactions are handled, and on which sites (or even parts thereof).
42     There are a number of such actions, with a wide range of functionality.
43     Each action does something a little different. These actions give us a
44     veritable arsenal of tools with which to exert our control, preferences
45     and independence. Actions can be combined so that their effects are
46     aggregated when applied against a given set of URLs.</p>
47     <p>There are three action files included with <span class=
48     "APPLICATION">Privoxy</span> with differing purposes:</p>
49     <ul>
50       <li>
51         <p><tt class="FILENAME">match-all.action</tt> - is used to define
52         which <span class="QUOTE">"actions"</span> relating to
53         banner-blocking, images, pop-ups, content modification, cookie
54         handling etc should be applied by default. It should be the first
55         actions file loaded</p>
56       </li>
57       <li>
58         <p><tt class="FILENAME">default.action</tt> - defines many exceptions
59         (both positive and negative) from the default set of actions that's
60         configured in <tt class="FILENAME">match-all.action</tt>. It is a set
61         of rules that should work reasonably well as-is for most users. This
62         file is only supposed to be edited by the developers. It should be
63         the second actions file loaded.</p>
64       </li>
65       <li>
66         <p><tt class="FILENAME">user.action</tt> - is intended to be for
67         local site preferences and exceptions. As an example, if your ISP or
68         your bank has specific requirements, and need special handling, this
69         kind of thing should go here. This file will not be upgraded.</p>
70       </li>
71       <li>
72         <p><span class="GUIBUTTON">Edit</span> <span class="GUIBUTTON">Set to
73         Cautious</span> <span class="GUIBUTTON">Set to Medium</span>
74         <span class="GUIBUTTON">Set to Advanced</span></p>
75         <p>These have increasing levels of aggressiveness <span class=
76         "emphasis"><i class="EMPHASIS">and have no influence on your browsing
77         unless you select them explicitly in the editor</i></span>. A default
78         installation should be pre-set to <tt class="LITERAL">Cautious</tt>.
79         New users should try this for a while before adjusting the settings
80         to more aggressive levels. The more aggressive the settings, then the
81         more likelihood there is of problems such as sites not working as
82         they should.</p>
83         <p>The <span class="GUIBUTTON">Edit</span> button allows you to turn
84         each action on/off individually for fine-tuning. The <span class=
85         "GUIBUTTON">Cautious</span> button changes the actions list to
86         low/safe settings which will activate ad blocking and a minimal set
87         of <span class="APPLICATION">Privoxy</span>'s features, and
88         subsequently there will be less of a chance for accidental problems.
89         The <span class="GUIBUTTON">Medium</span> button sets the list to a
90         medium level of other features and a low level set of privacy
91         features. The <span class="GUIBUTTON">Advanced</span> button sets the
92         list to a high level of ad blocking and medium level of privacy. See
93         the chart below. The latter three buttons over-ride any changes via
94         with the <span class="GUIBUTTON">Edit</span> button. More fine-tuning
95         can be done in the lower sections of this internal page.</p>
96         <p>While the actions file editor allows to enable these settings in
97         all actions files, they are only supposed to be enabled in the first
98         one to make sure you don't unintentionally overrule earlier
99         rules.</p>
100         <p>The default profiles, and their associated actions, as pre-defined
101         in <tt class="FILENAME">default.action</tt> are:</p>
102         <div class="TABLE">
103           <a name="AEN2892" id="AEN2892"></a>
104           <p><b>Table 1. Default Configurations</b></p>
105           <table border="1" frame="border" rules="all" class="CALSTABLE">
106             <col width="1*" title="C1">
107             <col width="1*" title="C2">
108             <col width="1*" title="C3">
109             <col width="1*" title="C4">
110             <thead>
111               <tr>
112                 <th>Feature</th>
113                 <th>Cautious</th>
114                 <th>Medium</th>
115                 <th>Advanced</th>
116               </tr>
117             </thead>
118             <tbody>
119               <tr>
120                 <td>Ad-blocking Aggressiveness</td>
121                 <td>medium</td>
122                 <td>high</td>
123                 <td>high</td>
124               </tr>
125               <tr>
126                 <td>Ad-filtering by size</td>
127                 <td>no</td>
128                 <td>yes</td>
129                 <td>yes</td>
130               </tr>
131               <tr>
132                 <td>Ad-filtering by link</td>
133                 <td>no</td>
134                 <td>no</td>
135                 <td>yes</td>
136               </tr>
137               <tr>
138                 <td>Pop-up killing</td>
139                 <td>blocks only</td>
140                 <td>blocks only</td>
141                 <td>blocks only</td>
142               </tr>
143               <tr>
144                 <td>Privacy Features</td>
145                 <td>low</td>
146                 <td>medium</td>
147                 <td>medium/high</td>
148               </tr>
149               <tr>
150                 <td>Cookie handling</td>
151                 <td>none</td>
152                 <td>session-only</td>
153                 <td>kill</td>
154               </tr>
155               <tr>
156                 <td>Referer forging</td>
157                 <td>no</td>
158                 <td>yes</td>
159                 <td>yes</td>
160               </tr>
161               <tr>
162                 <td>GIF de-animation</td>
163                 <td>no</td>
164                 <td>yes</td>
165                 <td>yes</td>
166               </tr>
167               <tr>
168                 <td>Fast redirects</td>
169                 <td>no</td>
170                 <td>no</td>
171                 <td>yes</td>
172               </tr>
173               <tr>
174                 <td>HTML taming</td>
175                 <td>no</td>
176                 <td>no</td>
177                 <td>yes</td>
178               </tr>
179               <tr>
180                 <td>JavaScript taming</td>
181                 <td>no</td>
182                 <td>no</td>
183                 <td>yes</td>
184               </tr>
185               <tr>
186                 <td>Web-bug killing</td>
187                 <td>no</td>
188                 <td>yes</td>
189                 <td>yes</td>
190               </tr>
191               <tr>
192                 <td>Image tag reordering</td>
193                 <td>no</td>
194                 <td>yes</td>
195                 <td>yes</td>
196               </tr>
197             </tbody>
198           </table>
199         </div>
200       </li>
201     </ul>
202     <p>The list of actions files to be used are defined in the main
203     configuration file, and are processed in the order they are defined (e.g.
204     <tt class="FILENAME">default.action</tt> is typically processed before
205     <tt class="FILENAME">user.action</tt>). The content of these can all be
206     viewed and edited from <a href="http://config.privoxy.org/show-status"
207     target="_top">http://config.privoxy.org/show-status</a>. The over-riding
208     principle when applying actions, is that the last action that matches a
209     given URL wins. The broadest, most general rules go first (defined in
210     <tt class="FILENAME">default.action</tt>), followed by any exceptions
211     (typically also in <tt class="FILENAME">default.action</tt>), which are
212     then followed lastly by any local preferences (typically in <span class=
213     "emphasis"><i class="EMPHASIS">user</i></span><tt class=
214     "FILENAME">.action</tt>). Generally, <tt class=
215     "FILENAME">user.action</tt> has the last word.</p>
216     <p>An actions file typically has multiple sections. If you want to use
217     <span class="QUOTE">"aliases"</span> in an actions file, you have to
218     place the (optional) <a href="actions-file.html#ALIASES">alias
219     section</a> at the top of that file. Then comes the default set of rules
220     which will apply universally to all sites and pages (be <span class=
221     "emphasis"><i class="EMPHASIS">very careful</i></span> with using such a
222     universal set in <tt class="FILENAME">user.action</tt> or any other
223     actions file after <tt class="FILENAME">default.action</tt>, because it
224     will override the result from consulting any previous file). And then
225     below that, exceptions to the defined universal policies. You can regard
226     <tt class="FILENAME">user.action</tt> as an appendix to <tt class=
227     "FILENAME">default.action</tt>, with the advantage that it is a separate
228     file, which makes preserving your personal settings across <span class=
229     "APPLICATION">Privoxy</span> upgrades easier.</p>
230     <p>Actions can be used to block anything you want, including ads,
231     banners, or just some obnoxious URL whose content you would rather not
232     see. Cookies can be accepted or rejected, or accepted only during the
233     current browser session (i.e. not written to disk), content can be
234     modified, some JavaScripts tamed, user-tracking fooled, and much more.
235     See below for a <a href="actions-file.html#ACTIONS">complete list of
236     actions</a>.</p>
237     <div class="SECT2">
238       <h2 class="SECT2"><a name="RIGHT-MIX" id="RIGHT-MIX">8.1. Finding the
239       Right Mix</a></h2>
240       <p>Note that some <a href="actions-file.html#ACTIONS">actions</a>, like
241       cookie suppression or script disabling, may render some sites unusable
242       that rely on these techniques to work properly. Finding the right mix
243       of actions is not always easy and certainly a matter of personal taste.
244       And, things can always change, requiring refinements in the
245       configuration. In general, it can be said that the more <span class=
246       "QUOTE">"aggressive"</span> your default settings (in the top section
247       of the actions file) are, the more exceptions for <span class=
248       "QUOTE">"trusted"</span> sites you will have to make later. If, for
249       example, you want to crunch all cookies per default, you'll have to
250       make exceptions from that rule for sites that you regularly use and
251       that require cookies for actually useful purposes, like maybe your
252       bank, favorite shop, or newspaper.</p>
253       <p>We have tried to provide you with reasonable rules to start from in
254       the distribution actions files. But there is no general rule of thumb
255       on these things. There just are too many variables, and sites are
256       constantly changing. Sooner or later you will want to change the rules
257       (and read this chapter again :).</p>
258     </div>
259     <div class="SECT2">
260       <h2 class="SECT2"><a name="HOW-TO-EDIT" id="HOW-TO-EDIT">8.2. How to
261       Edit</a></h2>
262       <p>The easiest way to edit the actions files is with a browser by using
263       our browser-based editor, which can be reached from <a href=
264       "http://config.privoxy.org/show-status" target=
265       "_top">http://config.privoxy.org/show-status</a>. Note: the config file
266       option <a href=
267       "config.html#ENABLE-EDIT-ACTIONS">enable-edit-actions</a> must be
268       enabled for this to work. The editor allows both fine-grained control
269       over every single feature on a per-URL basis, and easy choosing from
270       wholesale sets of defaults like <span class="QUOTE">"Cautious"</span>,
271       <span class="QUOTE">"Medium"</span> or <span class=
272       "QUOTE">"Advanced"</span>. Warning: the <span class=
273       "QUOTE">"Advanced"</span> setting is more aggressive, and will be more
274       likely to cause problems for some sites. Experienced users only!</p>
275       <p>If you prefer plain text editing to GUIs, you can of course also
276       directly edit the the actions files with your favorite text editor.
277       Look at <tt class="FILENAME">default.action</tt> which is richly
278       commented with many good examples.</p>
279     </div>
280     <div class="SECT2">
281       <h2 class="SECT2"><a name="ACTIONS-APPLY" id="ACTIONS-APPLY">8.3. How
282       Actions are Applied to Requests</a></h2>
283       <p>Actions files are divided into sections. There are special sections,
284       like the <span class="QUOTE">"<a href=
285       "actions-file.html#ALIASES">alias</a>"</span> sections which will be
286       discussed later. For now let's concentrate on regular sections: They
287       have a heading line (often split up to multiple lines for readability)
288       which consist of a list of actions, separated by whitespace and
289       enclosed in curly braces. Below that, there is a list of URL and tag
290       patterns, each on a separate line.</p>
291       <p>To determine which actions apply to a request, the URL of the
292       request is compared to all URL patterns in each <span class=
293       "QUOTE">"action file"</span>. Every time it matches, the list of
294       applicable actions for the request is incrementally updated, using the
295       heading of the section in which the pattern is located. The same is
296       done again for tags and tag patterns later on.</p>
297       <p>If multiple applying sections set the same action differently, the
298       last match wins. If not, the effects are aggregated. E.g. a URL might
299       match a regular section with a heading line of <tt class="LITERAL">{
300       +<a href="actions-file.html#HANDLE-AS-IMAGE">handle-as-image</a>
301       }</tt>, then later another one with just <tt class="LITERAL">{
302       +<a href="actions-file.html#BLOCK">block</a> }</tt>, resulting in
303       <span class="emphasis"><i class="EMPHASIS">both</i></span> actions to
304       apply. And there may well be cases where you will want to combine
305       actions together. Such a section then might look like:</p>
306       <table border="0" bgcolor="#E0E0E0" width="100%">
307         <tr>
308           <td>
309             <pre class="SCREEN">  { +<tt class=
310             "LITERAL">handle-as-image</tt>  +<tt class=
311             "LITERAL">block{Banner ads.}</tt> }
312   # Block these as if they were images. Send no block page.
313    banners.example.com
314    media.example.com/.*banners
315    .example.com/images/ads/</pre>
316           </td>
317         </tr>
318       </table>
319       <p>You can trace this process for URL patterns and any given URL by
320       visiting <a href="http://config.privoxy.org/show-url-info" target=
321       "_top">http://config.privoxy.org/show-url-info</a>.</p>
322       <p>Examples and more detail on this is provided in the Appendix,
323       <a href="appendix.html#ACTIONSANAT">Troubleshooting: Anatomy of an
324       Action</a> section.</p>
325     </div>
326     <div class="SECT2">
327       <h2 class="SECT2"><a name="AF-PATTERNS" id="AF-PATTERNS">8.4.
328       Patterns</a></h2>
329       <p>As mentioned, <span class="APPLICATION">Privoxy</span> uses
330       <span class="QUOTE">"patterns"</span> to determine what <span class=
331       "emphasis"><i class="EMPHASIS">actions</i></span> might apply to which
332       sites and pages your browser attempts to access. These <span class=
333       "QUOTE">"patterns"</span> use wild card type <span class=
334       "emphasis"><i class="EMPHASIS">pattern</i></span> matching to achieve a
335       high degree of flexibility. This allows one expression to be expanded
336       and potentially match against many similar patterns.</p>
337       <p>Generally, an URL pattern has the form <tt class=
338       "LITERAL">&lt;host&gt;&lt;port&gt;/&lt;path&gt;</tt>, where the
339       <tt class="LITERAL">&lt;host&gt;</tt>, the <tt class=
340       "LITERAL">&lt;port&gt;</tt> and the <tt class=
341       "LITERAL">&lt;path&gt;</tt> are optional. (This is why the special
342       <tt class="LITERAL">/</tt> pattern matches all URLs). Note that the
343       protocol portion of the URL pattern (e.g. <tt class=
344       "LITERAL">http://</tt>) should <span class="emphasis"><i class=
345       "EMPHASIS">not</i></span> be included in the pattern. This is assumed
346       already!</p>
347       <p>The pattern matching syntax is different for the host and path parts
348       of the URL. The host part uses a simple globbing type matching
349       technique, while the path part uses more flexible <a href=
350       "http://en.wikipedia.org/wiki/Regular_expressions" target=
351       "_top"><span class="QUOTE">"Regular Expressions"</span></a> (POSIX
352       1003.2).</p>
353       <p>The port part of a pattern is a decimal port number preceded by a
354       colon (<tt class="LITERAL">:</tt>). If the host part contains a
355       numerical IPv6 address, it has to be put into angle brackets
356       (<tt class="LITERAL">&lt;</tt>, <tt class="LITERAL">&gt;</tt>).</p>
357       <div class="VARIABLELIST">
358         <dl>
359           <dt><tt class="LITERAL">www.example.com/</tt></dt>
360           <dd>
361             <p>is a host-only pattern and will match any request to
362             <tt class="LITERAL">www.example.com</tt>, regardless of which
363             document on that server is requested. So ALL pages in this domain
364             would be covered by the scope of this action. Note that a simple
365             <tt class="LITERAL">example.com</tt> is different and would NOT
366             match.</p>
367           </dd>
368           <dt><tt class="LITERAL">www.example.com</tt></dt>
369           <dd>
370             <p>means exactly the same. For host-only patterns, the trailing
371             <tt class="LITERAL">/</tt> may be omitted.</p>
372           </dd>
373           <dt><tt class="LITERAL">www.example.com/index.html</tt></dt>
374           <dd>
375             <p>matches all the documents on <tt class=
376             "LITERAL">www.example.com</tt> whose name starts with <tt class=
377             "LITERAL">/index.html</tt>.</p>
378           </dd>
379           <dt><tt class="LITERAL">www.example.com/index.html$</tt></dt>
380           <dd>
381             <p>matches only the single document <tt class=
382             "LITERAL">/index.html</tt> on <tt class=
383             "LITERAL">www.example.com</tt>.</p>
384           </dd>
385           <dt><tt class="LITERAL">/index.html$</tt></dt>
386           <dd>
387             <p>matches the document <tt class="LITERAL">/index.html</tt>,
388             regardless of the domain, i.e. on <span class=
389             "emphasis"><i class="EMPHASIS">any</i></span> web server
390             anywhere.</p>
391           </dd>
392           <dt><tt class="LITERAL">/</tt></dt>
393           <dd>
394             <p>Matches any URL because there's no requirement for either the
395             domain or the path to match anything.</p>
396           </dd>
397           <dt><tt class="LITERAL">:8000/</tt></dt>
398           <dd>
399             <p>Matches any URL pointing to TCP port 8000.</p>
400           </dd>
401           <dt><tt class="LITERAL">10.0.0.1/</tt></dt>
402           <dd>
403             <p>Matches any URL with the host address <tt class=
404             "LITERAL">10.0.0.1</tt>. (Note that the real URL uses plain
405             brackets, not angle brackets.)</p>
406           </dd>
407           <dt><tt class="LITERAL">&lt;2001:db8::1&gt;/</tt></dt>
408           <dd>
409             <p>Matches any URL with the host address <tt class=
410             "LITERAL">2001:db8::1</tt>. (Note that the real URL uses plain
411             brackets, not angle brackets.)</p>
412           </dd>
413           <dt><tt class="LITERAL">index.html</tt></dt>
414           <dd>
415             <p>matches nothing, since it would be interpreted as a domain
416             name and there is no top-level domain called <tt class=
417             "LITERAL">.html</tt>. So its a mistake.</p>
418           </dd>
419         </dl>
420       </div>
421       <div class="SECT3">
422         <h3 class="SECT3"><a name="HOST-PATTERN" id="HOST-PATTERN">8.4.1. The
423         Host Pattern</a></h3>
424         <p>The matching of the host part offers some flexible options: if the
425         host pattern starts or ends with a dot, it becomes unanchored at that
426         end. The host pattern is often referred to as domain pattern as it is
427         usually used to match domain names and not IP addresses. For
428         example:</p>
429         <div class="VARIABLELIST">
430           <dl>
431             <dt><tt class="LITERAL">.example.com</tt></dt>
432             <dd>
433               <p>matches any domain with first-level domain <tt class=
434               "LITERAL">com</tt> and second-level domain <tt class=
435               "LITERAL">example</tt>. For example <tt class=
436               "LITERAL">www.example.com</tt>, <tt class=
437               "LITERAL">example.com</tt> and <tt class=
438               "LITERAL">foo.bar.baz.example.com</tt>. Note that it wouldn't
439               match if the second-level domain was <tt class=
440               "LITERAL">another-example</tt>.</p>
441             </dd>
442             <dt><tt class="LITERAL">www.</tt></dt>
443             <dd>
444               <p>matches any domain that <span class="emphasis"><i class=
445               "EMPHASIS">STARTS</i></span> with <tt class="LITERAL">www.</tt>
446               (It also matches the domain <tt class="LITERAL">www</tt> but
447               most of the time that doesn't matter.)</p>
448             </dd>
449             <dt><tt class="LITERAL">.example.</tt></dt>
450             <dd>
451               <p>matches any domain that <span class="emphasis"><i class=
452               "EMPHASIS">CONTAINS</i></span> <tt class=
453               "LITERAL">.example.</tt>. And, by the way, also included would
454               be any files or documents that exist within that domain since
455               no path limitations are specified. (Correctly speaking: It
456               matches any FQDN that contains <tt class="LITERAL">example</tt>
457               as a domain.) This might be <tt class=
458               "LITERAL">www.example.com</tt>, <tt class=
459               "LITERAL">news.example.de</tt>, or <tt class=
460               "LITERAL">www.example.net/cgi/testing.pl</tt> for instance. All
461               these cases are matched.</p>
462             </dd>
463           </dl>
464         </div>
465         <p>Additionally, there are wild-cards that you can use in the domain
466         names themselves. These work similarly to shell globbing type
467         wild-cards: <span class="QUOTE">"*"</span> represents zero or more
468         arbitrary characters (this is equivalent to the <a href=
469         "http://en.wikipedia.org/wiki/Regular_expressions" target=
470         "_top"><span class="QUOTE">"Regular Expression"</span></a> based
471         syntax of <span class="QUOTE">".*"</span>), <span class=
472         "QUOTE">"?"</span> represents any single character (this is
473         equivalent to the regular expression syntax of a simple <span class=
474         "QUOTE">"."</span>), and you can define <span class=
475         "QUOTE">"character classes"</span> in square brackets which is
476         similar to the same regular expression technique. All of this can be
477         freely mixed:</p>
478         <div class="VARIABLELIST">
479           <dl>
480             <dt><tt class="LITERAL">ad*.example.com</tt></dt>
481             <dd>
482               <p>matches <span class="QUOTE">"adserver.example.com"</span>,
483               <span class="QUOTE">"ads.example.com"</span>, etc but not
484               <span class="QUOTE">"sfads.example.com"</span></p>
485             </dd>
486             <dt><tt class="LITERAL">*ad*.example.com</tt></dt>
487             <dd>
488               <p>matches all of the above, and then some.</p>
489             </dd>
490             <dt><tt class="LITERAL">.?pix.com</tt></dt>
491             <dd>
492               <p>matches <tt class="LITERAL">www.ipix.com</tt>, <tt class=
493               "LITERAL">pictures.epix.com</tt>, <tt class=
494               "LITERAL">a.b.c.d.e.upix.com</tt> etc.</p>
495             </dd>
496             <dt><tt class="LITERAL">www[1-9a-ez].example.c*</tt></dt>
497             <dd>
498               <p>matches <tt class="LITERAL">www1.example.com</tt>,
499               <tt class="LITERAL">www4.example.cc</tt>, <tt class=
500               "LITERAL">wwwd.example.cy</tt>, <tt class=
501               "LITERAL">wwwz.example.com</tt> etc., but <span class=
502               "emphasis"><i class="EMPHASIS">not</i></span> <tt class=
503               "LITERAL">wwww.example.com</tt>.</p>
504             </dd>
505           </dl>
506         </div>
507         <p>While flexible, this is not the sophistication of full regular
508         expression based syntax.</p>
509       </div>
510       <div class="SECT3">
511         <h3 class="SECT3"><a name="PATH-PATTERN" id="PATH-PATTERN">8.4.2. The
512         Path Pattern</a></h3>
513         <p><span class="APPLICATION">Privoxy</span> uses <span class=
514         "QUOTE">"modern"</span> POSIX 1003.2 <a href=
515         "http://en.wikipedia.org/wiki/Regular_expressions" target=
516         "_top"><span class="QUOTE">"Regular Expressions"</span></a> for
517         matching the path portion (after the slash), and is thus more
518         flexible.</p>
519         <p>There is an <a href="appendix.html#REGEX">Appendix</a> with a
520         brief quick-start into regular expressions, you also might want to
521         have a look at your operating system's documentation on regular
522         expressions (try <tt class="LITERAL">man re_format</tt>).</p>
523         <p>Note that the path pattern is automatically left-anchored at the
524         <span class="QUOTE">"/"</span>, i.e. it matches as if it would start
525         with a <span class="QUOTE">"^"</span> (regular expression speak for
526         the beginning of a line).</p>
527         <p>Please also note that matching in the path is <span class=
528         "emphasis"><i class="EMPHASIS">CASE INSENSITIVE</i></span> by
529         default, but you can switch to case sensitive at any point in the
530         pattern by using the <span class="QUOTE">"(?-i)"</span> switch:
531         <tt class="LITERAL">www.example.com/(?-i)PaTtErN.*</tt> will match
532         only documents whose path starts with <tt class=
533         "LITERAL">PaTtErN</tt> in <span class="emphasis"><i class=
534         "EMPHASIS">exactly</i></span> this capitalization.</p>
535         <div class="VARIABLELIST">
536           <dl>
537             <dt><tt class="LITERAL">.example.com/.*</tt></dt>
538             <dd>
539               <p>Is equivalent to just <span class=
540               "QUOTE">".example.com"</span>, since any documents within that
541               domain are matched with or without the <span class=
542               "QUOTE">".*"</span> regular expression. This is redundant</p>
543             </dd>
544             <dt><tt class="LITERAL">.example.com/.*/index.html$</tt></dt>
545             <dd>
546               <p>Will match any page in the domain of <span class=
547               "QUOTE">"example.com"</span> that is named <span class=
548               "QUOTE">"index.html"</span>, and that is part of some path. For
549               example, it matches <span class=
550               "QUOTE">"www.example.com/testing/index.html"</span> but NOT
551               <span class="QUOTE">"www.example.com/index.html"</span> because
552               the regular expression called for at least two <span class=
553               "QUOTE">"/'s"</span>, thus the path requirement. It also would
554               match <span class=
555               "QUOTE">"www.example.com/testing/index_html"</span>, because of
556               the special meta-character <span class="QUOTE">"."</span>.</p>
557             </dd>
558             <dt><tt class="LITERAL">.example.com/(.*/)?index\.html$</tt></dt>
559             <dd>
560               <p>This regular expression is conditional so it will match any
561               page named <span class="QUOTE">"index.html"</span> regardless
562               of path which in this case can have one or more <span class=
563               "QUOTE">"/'s"</span>. And this one must contain exactly
564               <span class="QUOTE">".html"</span> (and end with that!).</p>
565             </dd>
566             <dt><tt class=
567             "LITERAL">.example.com/(.*/)(ads|banners?|junk)</tt></dt>
568             <dd>
569               <p>This regular expression will match any path of <span class=
570               "QUOTE">"example.com"</span> that contains any of the words
571               <span class="QUOTE">"ads"</span>, <span class=
572               "QUOTE">"banner"</span>, <span class="QUOTE">"banners"</span>
573               (because of the <span class="QUOTE">"?"</span>) or <span class=
574               "QUOTE">"junk"</span>. The path does not have to end in these
575               words, just contain them. The path has to contain at least two
576               slashes (including the one at the beginning).</p>
577             </dd>
578             <dt><tt class=
579             "LITERAL">.example.com/(.*/)(ads|banners?|junk)/.*\.(jpe?g|gif|png)$</tt></dt>
580             <dd>
581               <p>This is very much the same as above, except now it must end
582               in either <span class="QUOTE">".jpg"</span>, <span class=
583               "QUOTE">".jpeg"</span>, <span class="QUOTE">".gif"</span> or
584               <span class="QUOTE">".png"</span>. So this one is limited to
585               common image formats.</p>
586             </dd>
587           </dl>
588         </div>
589         <p>There are many, many good examples to be found in <tt class=
590         "FILENAME">default.action</tt>, and more tutorials below in <a href=
591         "appendix.html#REGEX">Appendix on regular expressions</a>.</p>
592       </div>
593       <div class="SECT3">
594         <h3 class="SECT3"><a name="TAG-PATTERN" id="TAG-PATTERN">8.4.3. The
595         Request Tag Pattern</a></h3>
596         <p>Request tag patterns are used to change the applying actions based
597         on the request's tags. Tags can be created based on HTTP headers with
598         either the <a href=
599         "actions-file.html#CLIENT-HEADER-TAGGER">client-header-tagger</a> or
600         the <a href=
601         "actions-file.html#SERVER-HEADER-TAGGER">server-header-tagger</a>
602         action.</p>
603         <p>Request tag patterns have to start with <span class=
604         "QUOTE">"TAG:"</span>, so <span class="APPLICATION">Privoxy</span>
605         can tell them apart from other patterns. Everything after the colon
606         including white space, is interpreted as a regular expression with
607         path pattern syntax, except that tag patterns aren't left-anchored
608         automatically (<span class="APPLICATION">Privoxy</span> doesn't
609         silently add a <span class="QUOTE">"^"</span>, you have to do it
610         yourself if you need it).</p>
611         <p>To match all requests that are tagged with <span class=
612         "QUOTE">"foo"</span> your pattern line should be <span class=
613         "QUOTE">"TAG:^foo$"</span>, <span class="QUOTE">"TAG:foo"</span>
614         would work as well, but it would also match requests whose tags
615         contain <span class="QUOTE">"foo"</span> somewhere. <span class=
616         "QUOTE">"TAG: foo"</span> wouldn't work as it requires white
617         space.</p>
618         <p>Sections can contain URL and request tag patterns at the same
619         time, but request tag patterns are checked after the URL patterns and
620         thus always overrule them, even if they are located before the URL
621         patterns.</p>
622         <p>Once a new request tag is added, Privoxy checks right away if it's
623         matched by one of the request tag patterns and updates the action
624         settings accordingly. As a result request tags can be used to
625         activate other tagger actions, as long as these other taggers look
626         for headers that haven't already be parsed.</p>
627         <p>For example you could tag client requests which use the <tt class=
628         "LITERAL">POST</tt> method, then use this tag to activate another
629         tagger that adds a tag if cookies are sent, and then use a block
630         action based on the cookie tag. This allows the outcome of one
631         action, to be input into a subsequent action. However if you'd
632         reverse the position of the described taggers, and activated the
633         method tagger based on the cookie tagger, no method tags would be
634         created. The method tagger would look for the request line, but at
635         the time the cookie tag is created, the request line has already been
636         parsed.</p>
637         <p>While this is a limitation you should be aware of, this kind of
638         indirection is seldom needed anyway and even the example doesn't make
639         too much sense.</p>
640       </div>
641       <div class="SECT3">
642         <h3 class="SECT3"><a name="NEGATIVE-TAG-PATTERNS" id=
643         "NEGATIVE-TAG-PATTERNS">8.4.4. The Negative Request Tag
644         Patterns</a></h3>
645         <p>To match requests that do not have a certain request tag, specify
646         a negative tag pattern by prefixing the tag pattern line with either
647         <span class="QUOTE">"NO-REQUEST-TAG:"</span> or <span class=
648         "QUOTE">"NO-RESPONSE-TAG:"</span> instead of <span class=
649         "QUOTE">"TAG:"</span>.</p>
650         <p>Negative request tag patterns created with <span class=
651         "QUOTE">"NO-REQUEST-TAG:"</span> are checked after all client headers
652         are scanned, the ones created with <span class=
653         "QUOTE">"NO-RESPONSE-TAG:"</span> are checked after all server
654         headers are scanned. In both cases all the created tags are
655         considered.</p>
656       </div>
657       <div class="SECT3">
658         <h3 class="SECT3"><a name="CLIENT-TAG-PATTERN" id=
659         "CLIENT-TAG-PATTERN">8.4.5. The Client Tag Pattern</a></h3>
660         <div class="WARNING">
661           <table class="WARNING" border="1" width="100%">
662             <tr>
663               <td align="center"><b>Warning</b></td>
664             </tr>
665             <tr>
666               <td align="left">
667                 <p>This is an experimental feature. The syntax is likely to
668                 change in future versions.</p>
669               </td>
670             </tr>
671           </table>
672         </div>
673         <p>Client tag patterns are not set based on HTTP headers but based on
674         the client's IP address. Users can enable them themselves, but the
675         Privoxy admin controls which tags are available and what their effect
676         is.</p>
677         <p>After a client-specific tag has been defined with the <a href=
678         "config.html#CLIENT-SPECIFIC-TAG">client-specific-tag</a>, directive,
679         action sections can be activated based on the tag by using a
680         CLIENT-TAG pattern. The CLIENT-TAG pattern is evaluated at the same
681         priority as URL patterns, as a result the last matching pattern wins.
682         Tags that are created based on client or server headers are evaluated
683         later on and can overrule CLIENT-TAG and URL patterns!</p>
684         <p>The tag is set for all requests that come from clients that
685         requested it to be set. Note that "clients" are differentiated by IP
686         address, if the IP address changes the tag has to be requested
687         again.</p>
688         <p>Clients can request tags to be set by using the CGI interface
689         <a href="http://config.privoxy.org/client-tags" target=
690         "_top">http://config.privoxy.org/client-tags</a>.</p>
691         <p>Example:</p>
692         <table border="0" bgcolor="#E0E0E0" width="100%">
693           <tr>
694             <td>
695               <pre class="SCREEN">
696               # If the admin defined the client-specific-tag circumvent-blocks,
697 # and the request comes from a client that previously requested
698 # the tag to be set, overrule all previous +block actions that
699 # are enabled based on URL to CLIENT-TAG patterns.
700 {-block}
701 CLIENT-TAG:^circumvent-blocks$
702
703 # This section is not overruled because it's located after
704 # the previous one.
705 {+block{Nobody is supposed to request this.}}
706 example.org/blocked-example-page</pre>
707             </td>
708           </tr>
709         </table>
710       </div>
711     </div>
712     <div class="SECT2">
713       <h2 class="SECT2"><a name="ACTIONS" id="ACTIONS">8.5. Actions</a></h2>
714       <p>All actions are disabled by default, until they are explicitly
715       enabled somewhere in an actions file. Actions are turned on if preceded
716       with a <span class="QUOTE">"+"</span>, and turned off if preceded with
717       a <span class="QUOTE">"-"</span>. So a <tt class="LITERAL">+action</tt>
718       means <span class="QUOTE">"do that action"</span>, e.g. <tt class=
719       "LITERAL">+block</tt> means <span class="QUOTE">"please block URLs that
720       match the following patterns"</span>, and <tt class=
721       "LITERAL">-block</tt> means <span class="QUOTE">"don't block URLs that
722       match the following patterns, even if <tt class="LITERAL">+block</tt>
723       previously applied."</span></p>
724       <p>Again, actions are invoked by placing them on a line, enclosed in
725       curly braces and separated by whitespace, like in <tt class=
726       "LITERAL">{+some-action -some-other-action{some-parameter}}</tt>,
727       followed by a list of URL patterns, one per line, to which they apply.
728       Together, the actions line and the following pattern lines make up a
729       section of the actions file.</p>
730       <p>Actions fall into three categories:</p>
731       <ul>
732         <li>
733           <p>Boolean, i.e the action can only be <span class=
734           "QUOTE">"enabled"</span> or <span class="QUOTE">"disabled"</span>.
735           Syntax:</p>
736           <table border="0" bgcolor="#E0E0E0" width="90%">
737             <tr>
738               <td>
739                 <pre class="SCREEN">  +<tt class=
740                 "REPLACEABLE"><i>name</i></tt>        # enable action <tt class=
741                 "REPLACEABLE"><i>name</i></tt>
742   -<tt class=
743 "REPLACEABLE"><i>name</i></tt>        # disable action <tt class="REPLACEABLE"><i>name</i></tt></pre>
744               </td>
745             </tr>
746           </table>
747           <p>Example: <tt class="LITERAL">+handle-as-image</tt></p>
748         </li>
749         <li>
750           <p>Parameterized, where some value is required in order to enable
751           this type of action. Syntax:</p>
752           <table border="0" bgcolor="#E0E0E0" width="90%">
753             <tr>
754               <td>
755                 <pre class="SCREEN">  +<tt class=
756                 "REPLACEABLE"><i>name</i></tt>{<tt class=
757                 "REPLACEABLE"><i>param</i></tt>}  # enable action and set parameter to <tt class="REPLACEABLE"><i>param</i></tt>,
758                # overwriting parameter from previous match if necessary
759   -<tt class=
760 "REPLACEABLE"><i>name</i></tt>         # disable action. The parameter can be omitted</pre>
761               </td>
762             </tr>
763           </table>
764           <p>Note that if the URL matches multiple positive forms of a
765           parameterized action, the last match wins, i.e. the params from
766           earlier matches are simply ignored.</p>
767           <p>Example: <tt class="LITERAL">+hide-user-agent{Mozilla/5.0 (X11;
768           U; FreeBSD i386; en-US; rv:1.8.1.4) Gecko/20070602
769           Firefox/2.0.0.4}</tt></p>
770         </li>
771         <li>
772           <p>Multi-value. These look exactly like parameterized actions, but
773           they behave differently: If the action applies multiple times to
774           the same URL, but with different parameters, <span class=
775           "emphasis"><i class="EMPHASIS">all</i></span> the parameters from
776           <span class="emphasis"><i class="EMPHASIS">all</i></span> matches
777           are remembered. This is used for actions that can be executed for
778           the same request repeatedly, like adding multiple headers, or
779           filtering through multiple filters. Syntax:</p>
780           <table border="0" bgcolor="#E0E0E0" width="90%">
781             <tr>
782               <td>
783                 <pre class="SCREEN">  +<tt class=
784                 "REPLACEABLE"><i>name</i></tt>{<tt class=
785                 "REPLACEABLE"><i>param</i></tt>}   # enable action and add <tt class=
786                 "REPLACEABLE"><i>param</i></tt> to the list of parameters
787   -<tt class="REPLACEABLE"><i>name</i></tt>{<tt class=
788 "REPLACEABLE"><i>param</i></tt>}   # remove the parameter <tt class=
789 "REPLACEABLE"><i>param</i></tt> from the list of parameters
790                 # If it was the last one left, disable the action.
791   <tt class=
792 "REPLACEABLE"><i>-name</i></tt>          # disable this action completely and remove all parameters from the list</pre>
793               </td>
794             </tr>
795           </table>
796           <p>Examples: <tt class="LITERAL">+add-header{X-Fun-Header: Some
797           text}</tt> and <tt class=
798           "LITERAL">+filter{html-annoyances}</tt></p>
799         </li>
800       </ul>
801       <p>If nothing is specified in any actions file, no <span class=
802       "QUOTE">"actions"</span> are taken. So in this case <span class=
803       "APPLICATION">Privoxy</span> would just be a normal, non-blocking,
804       non-filtering proxy. You must specifically enable the privacy and
805       blocking features you need (although the provided default actions files
806       will give a good starting point).</p>
807       <p>Later defined action sections always over-ride earlier ones of the
808       same type. So exceptions to any rules you make, should come in the
809       latter part of the file (or in a file that is processed later when
810       using multiple actions files such as <tt class=
811       "FILENAME">user.action</tt>). For multi-valued actions, the actions are
812       applied in the order they are specified. Actions files are processed in
813       the order they are defined in <tt class="FILENAME">config</tt> (the
814       default installation has three actions files). It also quite possible
815       for any given URL to match more than one <span class=
816       "QUOTE">"pattern"</span> (because of wildcards and regular
817       expressions), and thus to trigger more than one set of actions! Last
818       match wins.</p>
819       <p>The list of valid <span class="APPLICATION">Privoxy</span> actions
820       are:</p>
821       <div class="SECT3">
822         <h4 class="SECT3"><a name="ADD-HEADER" id="ADD-HEADER">8.5.1.
823         add-header</a></h4>
824         <div class="VARIABLELIST">
825           <dl>
826             <dt>Typical use:</dt>
827             <dd>
828               <p>Confuse log analysis, custom applications</p>
829             </dd>
830             <dt>Effect:</dt>
831             <dd>
832               <p>Sends a user defined HTTP header to the web server.</p>
833             </dd>
834             <dt>Type:</dt>
835             <dd>
836               <p>Multi-value.</p>
837             </dd>
838             <dt>Parameter:</dt>
839             <dd>
840               <p>Any string value is possible. Validity of the defined HTTP
841               headers is not checked. It is recommended that you use the
842               <span class="QUOTE">"<tt class="LITERAL">X-</tt>"</span> prefix
843               for custom headers.</p>
844             </dd>
845             <dt>Notes:</dt>
846             <dd>
847               <p>This action may be specified multiple times, in order to
848               define multiple headers. This is rarely needed for the typical
849               user. If you don't know what <span class="QUOTE">"HTTP
850               headers"</span> are, you definitely don't need to worry about
851               this one.</p>
852               <p>Headers added by this action are not modified by other
853               actions.</p>
854             </dd>
855             <dt>Example usage:</dt>
856             <dd>
857               <table border="0" bgcolor="#E0E0E0" width="90%">
858                 <tr>
859                   <td>
860                     <pre class="SCREEN">
861                     # Add a DNT ("Do not track") header to all requests,
862 # event to those that already have one.
863 #
864 # This is just an example, not a recommendation.
865 #
866 # There is no reason to believe that user-tracking websites care
867 # about the DNT header and depending on the User-Agent, adding the
868 # header may make user-tracking easier.
869 {+add-header{DNT: 1}}
870 /</pre>
871                   </td>
872                 </tr>
873               </table>
874             </dd>
875           </dl>
876         </div>
877       </div>
878       <div class="SECT3">
879         <h4 class="SECT3"><a name="BLOCK" id="BLOCK">8.5.2. block</a></h4>
880         <div class="VARIABLELIST">
881           <dl>
882             <dt>Typical use:</dt>
883             <dd>
884               <p>Block ads or other unwanted content</p>
885             </dd>
886             <dt>Effect:</dt>
887             <dd>
888               <p>Requests for URLs to which this action applies are blocked,
889               i.e. the requests are trapped by <span class=
890               "APPLICATION">Privoxy</span> and the requested URL is never
891               retrieved, but is answered locally with a substitute page or
892               image, as determined by the <tt class="LITERAL"><a href=
893               "actions-file.html#HANDLE-AS-IMAGE">handle-as-image</a></tt>,
894               <tt class="LITERAL"><a href=
895               "actions-file.html#SET-IMAGE-BLOCKER">set-image-blocker</a></tt>,
896               and <tt class="LITERAL"><a href=
897               "actions-file.html#HANDLE-AS-EMPTY-DOCUMENT">handle-as-empty-document</a></tt>
898               actions.</p>
899             </dd>
900             <dt>Type:</dt>
901             <dd>
902               <p>Parameterized.</p>
903             </dd>
904             <dt>Parameter:</dt>
905             <dd>
906               <p>A block reason that should be given to the user.</p>
907             </dd>
908             <dt>Notes:</dt>
909             <dd>
910               <p><span class="APPLICATION">Privoxy</span> sends a special
911               <span class="QUOTE">"BLOCKED"</span> page for requests to
912               blocked pages. This page contains the block reason given as
913               parameter, a link to find out why the block action applies, and
914               a click-through to the blocked content (the latter only if the
915               force feature is available and enabled).</p>
916               <p>A very important exception occurs if <span class=
917               "emphasis"><i class="EMPHASIS">both</i></span> <tt class=
918               "LITERAL">block</tt> and <tt class="LITERAL"><a href=
919               "actions-file.html#HANDLE-AS-IMAGE">handle-as-image</a></tt>,
920               apply to the same request: it will then be replaced by an
921               image. If <tt class="LITERAL"><a href=
922               "actions-file.html#SET-IMAGE-BLOCKER">set-image-blocker</a></tt>
923               (see below) also applies, the type of image will be determined
924               by its parameter, if not, the standard checkerboard pattern is
925               sent.</p>
926               <p>It is important to understand this process, in order to
927               understand how <span class="APPLICATION">Privoxy</span> deals
928               with ads and other unwanted content. Blocking is a core
929               feature, and one upon which various other features depend.</p>
930               <p>The <tt class="LITERAL"><a href=
931               "actions-file.html#FILTER">filter</a></tt> action can perform a
932               very similar task, by <span class="QUOTE">"blocking"</span>
933               banner images and other content through rewriting the relevant
934               URLs in the document's HTML source, so they don't get requested
935               in the first place. Note that this is a totally different
936               technique, and it's easy to confuse the two.</p>
937             </dd>
938             <dt>Example usage (section):</dt>
939             <dd>
940               <table border="0" bgcolor="#E0E0E0" width="90%">
941                 <tr>
942                   <td>
943                     <pre class="SCREEN">{+block{No nasty stuff for you.}}
944 # Block and replace with "blocked" page
945  .nasty-stuff.example.com
946
947 {+block{Doubleclick banners.} +handle-as-image}
948 # Block and replace with image
949  .ad.doubleclick.net
950  .ads.r.us/banners/
951
952 {+block{Layered ads.} +handle-as-empty-document}
953 # Block and then ignore
954  adserver.example.net/.*\.js$</pre>
955                   </td>
956                 </tr>
957               </table>
958             </dd>
959           </dl>
960         </div>
961       </div>
962       <div class="SECT3">
963         <h4 class="SECT3"><a name="CHANGE-X-FORWARDED-FOR" id=
964         "CHANGE-X-FORWARDED-FOR">8.5.3. change-x-forwarded-for</a></h4>
965         <div class="VARIABLELIST">
966           <dl>
967             <dt>Typical use:</dt>
968             <dd>
969               <p>Improve privacy by not forwarding the source of the request
970               in the HTTP headers.</p>
971             </dd>
972             <dt>Effect:</dt>
973             <dd>
974               <p>Deletes the <span class="QUOTE">"X-Forwarded-For:"</span>
975               HTTP header from the client request, or adds a new one.</p>
976             </dd>
977             <dt>Type:</dt>
978             <dd>
979               <p>Parameterized.</p>
980             </dd>
981             <dt>Parameter:</dt>
982             <dd>
983               <ul>
984                 <li>
985                   <p><span class="QUOTE">"block"</span> to delete the
986                   header.</p>
987                 </li>
988                 <li>
989                   <p><span class="QUOTE">"add"</span> to create the header
990                   (or append the client's IP address to an already existing
991                   one).</p>
992                 </li>
993               </ul>
994             </dd>
995             <dt>Notes:</dt>
996             <dd>
997               <p>It is safe and recommended to use <tt class=
998               "LITERAL">block</tt>.</p>
999               <p>Forwarding the source address of the request may make sense
1000               in some multi-user setups but is also a privacy risk.</p>
1001             </dd>
1002             <dt>Example usage:</dt>
1003             <dd>
1004               <table border="0" bgcolor="#E0E0E0" width="90%">
1005                 <tr>
1006                   <td>
1007                     <pre class="SCREEN">+change-x-forwarded-for{block}</pre>
1008                   </td>
1009                 </tr>
1010               </table>
1011             </dd>
1012           </dl>
1013         </div>
1014       </div>
1015       <div class="SECT3">
1016         <h4 class="SECT3"><a name="CLIENT-HEADER-FILTER" id=
1017         "CLIENT-HEADER-FILTER">8.5.4. client-header-filter</a></h4>
1018         <div class="VARIABLELIST">
1019           <dl>
1020             <dt>Typical use:</dt>
1021             <dd>
1022               <p>Rewrite or remove single client headers.</p>
1023             </dd>
1024             <dt>Effect:</dt>
1025             <dd>
1026               <p>All client headers to which this action applies are filtered
1027               on-the-fly through the specified regular expression based
1028               substitutions.</p>
1029             </dd>
1030             <dt>Type:</dt>
1031             <dd>
1032               <p>Multi-value.</p>
1033             </dd>
1034             <dt>Parameter:</dt>
1035             <dd>
1036               <p>The name of a client-header filter, as defined in one of the
1037               <a href="filter-file.html">filter files</a>.</p>
1038             </dd>
1039             <dt>Notes:</dt>
1040             <dd>
1041               <p>Client-header filters are applied to each header on its own,
1042               not to all at once. This makes it easier to diagnose problems,
1043               but on the downside you can't write filters that only change
1044               header x if header y's value is z. You can do that by using
1045               tags though.</p>
1046               <p>Client-header filters are executed after the other header
1047               actions have finished and use their output as input.</p>
1048               <p>If the request URI gets changed, <span class=
1049               "APPLICATION">Privoxy</span> will detect that and use the new
1050               one. This can be used to rewrite the request destination behind
1051               the client's back, for example to specify a Tor exit relay for
1052               certain requests.</p>
1053               <p>Please refer to the <a href="filter-file.html">filter file
1054               chapter</a> to learn which client-header filters are available
1055               by default, and how to create your own.</p>
1056             </dd>
1057             <dt>Example usage (section):</dt>
1058             <dd>
1059               <table border="0" bgcolor="#E0E0E0" width="90%">
1060                 <tr>
1061                   <td>
1062                     <pre class="SCREEN">
1063                     # Hide Tor exit notation in Host and Referer Headers
1064 {+client-header-filter{hide-tor-exit-notation}}
1065 /
1066     </pre>
1067                   </td>
1068                 </tr>
1069               </table>
1070             </dd>
1071           </dl>
1072         </div>
1073       </div>
1074       <div class="SECT3">
1075         <h4 class="SECT3"><a name="CLIENT-HEADER-TAGGER" id=
1076         "CLIENT-HEADER-TAGGER">8.5.5. client-header-tagger</a></h4>
1077         <div class="VARIABLELIST">
1078           <dl>
1079             <dt>Typical use:</dt>
1080             <dd>
1081               <p>Block requests based on their headers.</p>
1082             </dd>
1083             <dt>Effect:</dt>
1084             <dd>
1085               <p>Client headers to which this action applies are filtered
1086               on-the-fly through the specified regular expression based
1087               substitutions, the result is used as tag.</p>
1088             </dd>
1089             <dt>Type:</dt>
1090             <dd>
1091               <p>Multi-value.</p>
1092             </dd>
1093             <dt>Parameter:</dt>
1094             <dd>
1095               <p>The name of a client-header tagger, as defined in one of the
1096               <a href="filter-file.html">filter files</a>.</p>
1097             </dd>
1098             <dt>Notes:</dt>
1099             <dd>
1100               <p>Client-header taggers are applied to each header on its own,
1101               and as the header isn't modified, each tagger <span class=
1102               "QUOTE">"sees"</span> the original.</p>
1103               <p>Client-header taggers are the first actions that are
1104               executed and their tags can be used to control every other
1105               action.</p>
1106             </dd>
1107             <dt>Example usage (section):</dt>
1108             <dd>
1109               <table border="0" bgcolor="#E0E0E0" width="90%">
1110                 <tr>
1111                   <td>
1112                     <pre class="SCREEN">
1113                     # Tag every request with the User-Agent header
1114 {+client-header-tagger{user-agent}}
1115 /
1116
1117 # Tagging itself doesn't change the action
1118 # settings, sections with TAG patterns do:
1119 #
1120 # If it's a download agent, use a different forwarding proxy,
1121 # show the real User-Agent and make sure resume works.
1122 {+forward-override{forward-socks5 10.0.0.2:2222 .} \
1123  -hide-if-modified-since      \
1124  -overwrite-last-modified     \
1125  -hide-user-agent             \
1126  -filter                      \
1127  -deanimate-gifs              \
1128 }
1129 TAG:^User-Agent: NetBSD-ftp/
1130 TAG:^User-Agent: Novell ZYPP Installer
1131 TAG:^User-Agent: RPM APT-HTTP/
1132 TAG:^User-Agent: fetch libfetch/
1133 TAG:^User-Agent: Ubuntu APT-HTTP/
1134 TAG:^User-Agent: MPlayer/
1135     </pre>
1136                   </td>
1137                 </tr>
1138               </table>
1139               <table border="0" bgcolor="#E0E0E0" width="90%">
1140                 <tr>
1141                   <td>
1142                     <pre class="SCREEN">
1143                     # Tag all requests with the Range header set
1144 {+client-header-tagger{range-requests}}
1145 /
1146
1147 # Disable filtering for the tagged requests.
1148 #
1149 # With filtering enabled Privoxy would remove the Range headers
1150 # to be able to filter the whole response. The downside is that
1151 # it prevents clients from resuming downloads or skipping over
1152 # parts of multimedia files.
1153 {-filter -deanimate-gifs}
1154 TAG:^RANGE-REQUEST$
1155     </pre>
1156                   </td>
1157                 </tr>
1158               </table>
1159               <table border="0" bgcolor="#E0E0E0" width="90%">
1160                 <tr>
1161                   <td>
1162                     <pre class="SCREEN">
1163                     # Tag all requests with the client IP address
1164 #
1165 # (Technically the client IP address isn't included in the
1166 # client headers but client-header taggers can set it anyway.
1167 # For details see the tagger in default.filter)
1168 {+client-header-tagger{client-ip-address}}
1169 /
1170
1171 # Change forwarding settings for requests coming from address 10.0.0.1
1172 {+forward-override{forward-socks5 127.0.1.2:2222 .}}
1173 TAG:^IP-ADDRESS: 10\.0\.0\.1$
1174      </pre>
1175                   </td>
1176                 </tr>
1177               </table>
1178             </dd>
1179           </dl>
1180         </div>
1181       </div>
1182       <div class="SECT3">
1183         <h4 class="SECT3"><a name="CONTENT-TYPE-OVERWRITE" id=
1184         "CONTENT-TYPE-OVERWRITE">8.5.6. content-type-overwrite</a></h4>
1185         <div class="VARIABLELIST">
1186           <dl>
1187             <dt>Typical use:</dt>
1188             <dd>
1189               <p>Stop useless download menus from popping up, or change the
1190               browser's rendering mode</p>
1191             </dd>
1192             <dt>Effect:</dt>
1193             <dd>
1194               <p>Replaces the <span class="QUOTE">"Content-Type:"</span> HTTP
1195               server header.</p>
1196             </dd>
1197             <dt>Type:</dt>
1198             <dd>
1199               <p>Parameterized.</p>
1200             </dd>
1201             <dt>Parameter:</dt>
1202             <dd>
1203               <p>Any string.</p>
1204             </dd>
1205             <dt>Notes:</dt>
1206             <dd>
1207               <p>The <span class="QUOTE">"Content-Type:"</span> HTTP server
1208               header is used by the browser to decide what to do with the
1209               document. The value of this header can cause the browser to
1210               open a download menu instead of displaying the document by
1211               itself, even if the document's format is supported by the
1212               browser.</p>
1213               <p>The declared content type can also affect which rendering
1214               mode the browser chooses. If XHTML is delivered as <span class=
1215               "QUOTE">"text/html"</span>, many browsers treat it as yet
1216               another broken HTML document. If it is send as <span class=
1217               "QUOTE">"application/xml"</span>, browsers with XHTML support
1218               will only display it, if the syntax is correct.</p>
1219               <p>If you see a web site that proudly uses XHTML buttons, but
1220               sets <span class="QUOTE">"Content-Type: text/html"</span>, you
1221               can use <span class="APPLICATION">Privoxy</span> to overwrite
1222               it with <span class="QUOTE">"application/xml"</span> and
1223               validate the web master's claim inside your XHTML-supporting
1224               browser. If the syntax is incorrect, the browser will complain
1225               loudly.</p>
1226               <p>You can also go the opposite direction: if your browser
1227               prints error messages instead of rendering a document falsely
1228               declared as XHTML, you can overwrite the content type with
1229               <span class="QUOTE">"text/html"</span> and have it rendered as
1230               broken HTML document.</p>
1231               <p>By default <tt class="LITERAL">content-type-overwrite</tt>
1232               only replaces <span class="QUOTE">"Content-Type:"</span>
1233               headers that look like some kind of text. If you want to
1234               overwrite it unconditionally, you have to combine it with
1235               <tt class="LITERAL"><a href=
1236               "actions-file.html#FORCE-TEXT-MODE">force-text-mode</a></tt>.
1237               This limitation exists for a reason, think twice before
1238               circumventing it.</p>
1239               <p>Most of the time it's easier to replace this action with a
1240               custom <tt class="LITERAL"><a href=
1241               "actions-file.html#SERVER-HEADER-FILTER">server-header
1242               filter</a></tt>. It allows you to activate it for every
1243               document of a certain site and it will still only replace the
1244               content types you aimed at.</p>
1245               <p>Of course you can apply <tt class=
1246               "LITERAL">content-type-overwrite</tt> to a whole site and then
1247               make URL based exceptions, but it's a lot more work to get the
1248               same precision.</p>
1249             </dd>
1250             <dt>Example usage (sections):</dt>
1251             <dd>
1252               <table border="0" bgcolor="#E0E0E0" width="90%">
1253                 <tr>
1254                   <td>
1255                     <pre class="SCREEN">
1256                     # Check if www.example.net/ really uses valid XHTML
1257 { +content-type-overwrite{application/xml} }
1258 www.example.net/
1259
1260 # but leave the content type unmodified if the URL looks like a style sheet
1261 {-content-type-overwrite}
1262 www.example.net/.*\.css$
1263 www.example.net/.*style</pre>
1264                   </td>
1265                 </tr>
1266               </table>
1267             </dd>
1268           </dl>
1269         </div>
1270       </div>
1271       <div class="SECT3">
1272         <h4 class="SECT3"><a name="CRUNCH-CLIENT-HEADER" id=
1273         "CRUNCH-CLIENT-HEADER">8.5.7. crunch-client-header</a></h4>
1274         <div class="VARIABLELIST">
1275           <dl>
1276             <dt>Typical use:</dt>
1277             <dd>
1278               <p>Remove a client header <span class=
1279               "APPLICATION">Privoxy</span> has no dedicated action for.</p>
1280             </dd>
1281             <dt>Effect:</dt>
1282             <dd>
1283               <p>Deletes every header sent by the client that contains the
1284               string the user supplied as parameter.</p>
1285             </dd>
1286             <dt>Type:</dt>
1287             <dd>
1288               <p>Parameterized.</p>
1289             </dd>
1290             <dt>Parameter:</dt>
1291             <dd>
1292               <p>Any string.</p>
1293             </dd>
1294             <dt>Notes:</dt>
1295             <dd>
1296               <p>This action allows you to block client headers for which no
1297               dedicated <span class="APPLICATION">Privoxy</span> action
1298               exists. <span class="APPLICATION">Privoxy</span> will remove
1299               every client header that contains the string you supplied as
1300               parameter.</p>
1301               <p>Regular expressions are <span class="emphasis"><i class=
1302               "EMPHASIS">not supported</i></span> and you can't use this
1303               action to block different headers in the same request, unless
1304               they contain the same string.</p>
1305               <p><tt class="LITERAL">crunch-client-header</tt> is only meant
1306               for quick tests. If you have to block several different
1307               headers, or only want to modify parts of them, you should use a
1308               <tt class="LITERAL"><a href=
1309               "actions-file.html#CLIENT-HEADER-FILTER">client-header
1310               filter</a></tt>.</p>
1311               <div class="WARNING">
1312                 <table class="WARNING" border="1" width="90%">
1313                   <tr>
1314                     <td align="center"><b>Warning</b></td>
1315                   </tr>
1316                   <tr>
1317                     <td align="left">
1318                       <p>Don't block any header without understanding the
1319                       consequences.</p>
1320                     </td>
1321                   </tr>
1322                 </table>
1323               </div>
1324             </dd>
1325             <dt>Example usage (section):</dt>
1326             <dd>
1327               <table border="0" bgcolor="#E0E0E0" width="90%">
1328                 <tr>
1329                   <td>
1330                     <pre class="SCREEN">
1331                     # Block the non-existent "Privacy-Violation:" client header
1332 { +crunch-client-header{Privacy-Violation:} }
1333 /
1334     </pre>
1335                   </td>
1336                 </tr>
1337               </table>
1338             </dd>
1339           </dl>
1340         </div>
1341       </div>
1342       <div class="SECT3">
1343         <h4 class="SECT3"><a name="CRUNCH-IF-NONE-MATCH" id=
1344         "CRUNCH-IF-NONE-MATCH">8.5.8. crunch-if-none-match</a></h4>
1345         <div class="VARIABLELIST">
1346           <dl>
1347             <dt>Typical use:</dt>
1348             <dd>
1349               <p>Prevent yet another way to track the user's steps between
1350               sessions.</p>
1351             </dd>
1352             <dt>Effect:</dt>
1353             <dd>
1354               <p>Deletes the <span class="QUOTE">"If-None-Match:"</span> HTTP
1355               client header.</p>
1356             </dd>
1357             <dt>Type:</dt>
1358             <dd>
1359               <p>Boolean.</p>
1360             </dd>
1361             <dt>Parameter:</dt>
1362             <dd>
1363               <p>N/A</p>
1364             </dd>
1365             <dt>Notes:</dt>
1366             <dd>
1367               <p>Removing the <span class="QUOTE">"If-None-Match:"</span>
1368               HTTP client header is useful for filter testing, where you want
1369               to force a real reload instead of getting status code
1370               <span class="QUOTE">"304"</span> which would cause the browser
1371               to use a cached copy of the page.</p>
1372               <p>It is also useful to make sure the header isn't used as a
1373               cookie replacement (unlikely but possible).</p>
1374               <p>Blocking the <span class="QUOTE">"If-None-Match:"</span>
1375               header shouldn't cause any caching problems, as long as the
1376               <span class="QUOTE">"If-Modified-Since:"</span> header isn't
1377               blocked or missing as well.</p>
1378               <p>It is recommended to use this action together with
1379               <tt class="LITERAL"><a href=
1380               "actions-file.html#HIDE-IF-MODIFIED-SINCE">hide-if-modified-since</a></tt>
1381               and <tt class="LITERAL"><a href=
1382               "actions-file.html#OVERWRITE-LAST-MODIFIED">overwrite-last-modified</a></tt>.</p>
1383             </dd>
1384             <dt>Example usage (section):</dt>
1385             <dd>
1386               <table border="0" bgcolor="#E0E0E0" width="90%">
1387                 <tr>
1388                   <td>
1389                     <pre class="SCREEN">
1390                     # Let the browser revalidate cached documents but don't
1391 # allow the server to use the revalidation headers for user tracking.
1392 {+hide-if-modified-since{-60} \
1393  +overwrite-last-modified{randomize} \
1394  +crunch-if-none-match}
1395 /   </pre>
1396                   </td>
1397                 </tr>
1398               </table>
1399             </dd>
1400           </dl>
1401         </div>
1402       </div>
1403       <div class="SECT3">
1404         <h4 class="SECT3"><a name="CRUNCH-INCOMING-COOKIES" id=
1405         "CRUNCH-INCOMING-COOKIES">8.5.9. crunch-incoming-cookies</a></h4>
1406         <div class="VARIABLELIST">
1407           <dl>
1408             <dt>Typical use:</dt>
1409             <dd>
1410               <p>Prevent the web server from setting HTTP cookies on your
1411               system</p>
1412             </dd>
1413             <dt>Effect:</dt>
1414             <dd>
1415               <p>Deletes any <span class="QUOTE">"Set-Cookie:"</span> HTTP
1416               headers from server replies.</p>
1417             </dd>
1418             <dt>Type:</dt>
1419             <dd>
1420               <p>Boolean.</p>
1421             </dd>
1422             <dt>Parameter:</dt>
1423             <dd>
1424               <p>N/A</p>
1425             </dd>
1426             <dt>Notes:</dt>
1427             <dd>
1428               <p>This action is only concerned with <span class=
1429               "emphasis"><i class="EMPHASIS">incoming</i></span> HTTP
1430               cookies. For <span class="emphasis"><i class=
1431               "EMPHASIS">outgoing</i></span> HTTP cookies, use <tt class=
1432               "LITERAL"><a href=
1433               "actions-file.html#CRUNCH-OUTGOING-COOKIES">crunch-outgoing-cookies</a></tt>.
1434               Use <span class="emphasis"><i class="EMPHASIS">both</i></span>
1435               to disable HTTP cookies completely.</p>
1436               <p>It makes <span class="emphasis"><i class="EMPHASIS">no sense
1437               at all</i></span> to use this action in conjunction with the
1438               <tt class="LITERAL"><a href=
1439               "actions-file.html#SESSION-COOKIES-ONLY">session-cookies-only</a></tt>
1440               action, since it would prevent the session cookies from being
1441               set. See also <tt class="LITERAL"><a href=
1442               "actions-file.html#FILTER-CONTENT-COOKIES">filter-content-cookies</a></tt>.</p>
1443             </dd>
1444             <dt>Example usage:</dt>
1445             <dd>
1446               <table border="0" bgcolor="#E0E0E0" width="90%">
1447                 <tr>
1448                   <td>
1449                     <pre class="SCREEN">+crunch-incoming-cookies</pre>
1450                   </td>
1451                 </tr>
1452               </table>
1453             </dd>
1454           </dl>
1455         </div>
1456       </div>
1457       <div class="SECT3">
1458         <h4 class="SECT3"><a name="CRUNCH-SERVER-HEADER" id=
1459         "CRUNCH-SERVER-HEADER">8.5.10. crunch-server-header</a></h4>
1460         <div class="VARIABLELIST">
1461           <dl>
1462             <dt>Typical use:</dt>
1463             <dd>
1464               <p>Remove a server header <span class=
1465               "APPLICATION">Privoxy</span> has no dedicated action for.</p>
1466             </dd>
1467             <dt>Effect:</dt>
1468             <dd>
1469               <p>Deletes every header sent by the server that contains the
1470               string the user supplied as parameter.</p>
1471             </dd>
1472             <dt>Type:</dt>
1473             <dd>
1474               <p>Parameterized.</p>
1475             </dd>
1476             <dt>Parameter:</dt>
1477             <dd>
1478               <p>Any string.</p>
1479             </dd>
1480             <dt>Notes:</dt>
1481             <dd>
1482               <p>This action allows you to block server headers for which no
1483               dedicated <span class="APPLICATION">Privoxy</span> action
1484               exists. <span class="APPLICATION">Privoxy</span> will remove
1485               every server header that contains the string you supplied as
1486               parameter.</p>
1487               <p>Regular expressions are <span class="emphasis"><i class=
1488               "EMPHASIS">not supported</i></span> and you can't use this
1489               action to block different headers in the same request, unless
1490               they contain the same string.</p>
1491               <p><tt class="LITERAL">crunch-server-header</tt> is only meant
1492               for quick tests. If you have to block several different
1493               headers, or only want to modify parts of them, you should use a
1494               custom <tt class="LITERAL"><a href=
1495               "actions-file.html#SERVER-HEADER-FILTER">server-header
1496               filter</a></tt>.</p>
1497               <div class="WARNING">
1498                 <table class="WARNING" border="1" width="90%">
1499                   <tr>
1500                     <td align="center"><b>Warning</b></td>
1501                   </tr>
1502                   <tr>
1503                     <td align="left">
1504                       <p>Don't block any header without understanding the
1505                       consequences.</p>
1506                     </td>
1507                   </tr>
1508                 </table>
1509               </div>
1510             </dd>
1511             <dt>Example usage (section):</dt>
1512             <dd>
1513               <table border="0" bgcolor="#E0E0E0" width="90%">
1514                 <tr>
1515                   <td>
1516                     <pre class="SCREEN">
1517                     # Crunch server headers that try to prevent caching
1518 { +crunch-server-header{no-cache} }
1519 /   </pre>
1520                   </td>
1521                 </tr>
1522               </table>
1523             </dd>
1524           </dl>
1525         </div>
1526       </div>
1527       <div class="SECT3">
1528         <h4 class="SECT3"><a name="CRUNCH-OUTGOING-COOKIES" id=
1529         "CRUNCH-OUTGOING-COOKIES">8.5.11. crunch-outgoing-cookies</a></h4>
1530         <div class="VARIABLELIST">
1531           <dl>
1532             <dt>Typical use:</dt>
1533             <dd>
1534               <p>Prevent the web server from reading any HTTP cookies from
1535               your system</p>
1536             </dd>
1537             <dt>Effect:</dt>
1538             <dd>
1539               <p>Deletes any <span class="QUOTE">"Cookie:"</span> HTTP
1540               headers from client requests.</p>
1541             </dd>
1542             <dt>Type:</dt>
1543             <dd>
1544               <p>Boolean.</p>
1545             </dd>
1546             <dt>Parameter:</dt>
1547             <dd>
1548               <p>N/A</p>
1549             </dd>
1550             <dt>Notes:</dt>
1551             <dd>
1552               <p>This action is only concerned with <span class=
1553               "emphasis"><i class="EMPHASIS">outgoing</i></span> HTTP
1554               cookies. For <span class="emphasis"><i class=
1555               "EMPHASIS">incoming</i></span> HTTP cookies, use <tt class=
1556               "LITERAL"><a href=
1557               "actions-file.html#CRUNCH-INCOMING-COOKIES">crunch-incoming-cookies</a></tt>.
1558               Use <span class="emphasis"><i class="EMPHASIS">both</i></span>
1559               to disable HTTP cookies completely.</p>
1560               <p>It makes <span class="emphasis"><i class="EMPHASIS">no sense
1561               at all</i></span> to use this action in conjunction with the
1562               <tt class="LITERAL"><a href=
1563               "actions-file.html#SESSION-COOKIES-ONLY">session-cookies-only</a></tt>
1564               action, since it would prevent the session cookies from being
1565               read.</p>
1566             </dd>
1567             <dt>Example usage:</dt>
1568             <dd>
1569               <table border="0" bgcolor="#E0E0E0" width="90%">
1570                 <tr>
1571                   <td>
1572                     <pre class="SCREEN">+crunch-outgoing-cookies</pre>
1573                   </td>
1574                 </tr>
1575               </table>
1576             </dd>
1577           </dl>
1578         </div>
1579       </div>
1580       <div class="SECT3">
1581         <h4 class="SECT3"><a name="DEANIMATE-GIFS" id=
1582         "DEANIMATE-GIFS">8.5.12. deanimate-gifs</a></h4>
1583         <div class="VARIABLELIST">
1584           <dl>
1585             <dt>Typical use:</dt>
1586             <dd>
1587               <p>Stop those annoying, distracting animated GIF images.</p>
1588             </dd>
1589             <dt>Effect:</dt>
1590             <dd>
1591               <p>De-animate GIF animations, i.e. reduce them to their first
1592               or last image.</p>
1593             </dd>
1594             <dt>Type:</dt>
1595             <dd>
1596               <p>Parameterized.</p>
1597             </dd>
1598             <dt>Parameter:</dt>
1599             <dd>
1600               <p><span class="QUOTE">"last"</span> or <span class=
1601               "QUOTE">"first"</span></p>
1602             </dd>
1603             <dt>Notes:</dt>
1604             <dd>
1605               <p>This will also shrink the images considerably (in bytes, not
1606               pixels!). If the option <span class="QUOTE">"first"</span> is
1607               given, the first frame of the animation is used as the
1608               replacement. If <span class="QUOTE">"last"</span> is given, the
1609               last frame of the animation is used instead, which probably
1610               makes more sense for most banner animations, but also has the
1611               risk of not showing the entire last frame (if it is only a
1612               delta to an earlier frame).</p>
1613               <p>You can safely use this action with patterns that will also
1614               match non-GIF objects, because no attempt will be made at
1615               anything that doesn't look like a GIF.</p>
1616             </dd>
1617             <dt>Example usage:</dt>
1618             <dd>
1619               <table border="0" bgcolor="#E0E0E0" width="90%">
1620                 <tr>
1621                   <td>
1622                     <pre class="SCREEN">+deanimate-gifs{last}</pre>
1623                   </td>
1624                 </tr>
1625               </table>
1626             </dd>
1627           </dl>
1628         </div>
1629       </div>
1630       <div class="SECT3">
1631         <h4 class="SECT3"><a name="DOWNGRADE-HTTP-VERSION" id=
1632         "DOWNGRADE-HTTP-VERSION">8.5.13. downgrade-http-version</a></h4>
1633         <div class="VARIABLELIST">
1634           <dl>
1635             <dt>Typical use:</dt>
1636             <dd>
1637               <p>Work around (very rare) problems with HTTP/1.1</p>
1638             </dd>
1639             <dt>Effect:</dt>
1640             <dd>
1641               <p>Downgrades HTTP/1.1 client requests and server replies to
1642               HTTP/1.0.</p>
1643             </dd>
1644             <dt>Type:</dt>
1645             <dd>
1646               <p>Boolean.</p>
1647             </dd>
1648             <dt>Parameter:</dt>
1649             <dd>
1650               <p>N/A</p>
1651             </dd>
1652             <dt>Notes:</dt>
1653             <dd>
1654               <p>This is a left-over from the time when <span class=
1655               "APPLICATION">Privoxy</span> didn't support important HTTP/1.1
1656               features well. It is left here for the unlikely case that you
1657               experience HTTP/1.1-related problems with some server out
1658               there.</p>
1659               <p>Note that enabling this action is only a workaround. It
1660               should not be enabled for sites that work without it. While it
1661               shouldn't break any pages, it has an (usually negative)
1662               performance impact.</p>
1663               <p>If you come across a site where enabling this action helps,
1664               please report it, so the cause of the problem can be analyzed.
1665               If the problem turns out to be caused by a bug in <span class=
1666               "APPLICATION">Privoxy</span> it should be fixed so the
1667               following release works without the work around.</p>
1668             </dd>
1669             <dt>Example usage (section):</dt>
1670             <dd>
1671               <table border="0" bgcolor="#E0E0E0" width="90%">
1672                 <tr>
1673                   <td>
1674                     <pre class="SCREEN">{+downgrade-http-version}
1675 problem-host.example.com</pre>
1676                   </td>
1677                 </tr>
1678               </table>
1679             </dd>
1680           </dl>
1681         </div>
1682       </div>
1683       <div class="SECT3">
1684         <h4 class="SECT3"><a name="EXTERNAL-FILTER" id=
1685         "EXTERNAL-FILTER">8.5.14. external-filter</a></h4>
1686         <div class="VARIABLELIST">
1687           <dl>
1688             <dt>Typical use:</dt>
1689             <dd>
1690               <p>Modify content using a programming language of your
1691               choice.</p>
1692             </dd>
1693             <dt>Effect:</dt>
1694             <dd>
1695               <p>All instances of text-based type, most notably HTML and
1696               JavaScript, to which this action applies, can be filtered
1697               on-the-fly through the specified external filter. By default
1698               plain text documents are exempted from filtering, because web
1699               servers often use the <tt class="LITERAL">text/plain</tt> MIME
1700               type for all files whose type they don't know.)</p>
1701             </dd>
1702             <dt>Type:</dt>
1703             <dd>
1704               <p>Multi-value.</p>
1705             </dd>
1706             <dt>Parameter:</dt>
1707             <dd>
1708               <p>The name of an external content filter, as defined in the
1709               <a href="filter-file.html">filter file</a>. External filters
1710               can be defined in one or more files as defined by the
1711               <tt class="LITERAL"><a href=
1712               "config.html#FILTERFILE">filterfile</a></tt> option in the
1713               <a href="config.html">config file</a>.</p>
1714               <p>When used in its negative form, and without parameters,
1715               <span class="emphasis"><i class="EMPHASIS">all</i></span>
1716               filtering with external filters is completely disabled.</p>
1717             </dd>
1718             <dt>Notes:</dt>
1719             <dd>
1720               <p>External filters are scripts or programs that can modify the
1721               content in case common <tt class="LITERAL"><a href=
1722               "actions-file.html#FILTER">filters</a></tt> aren't powerful
1723               enough. With the exception that this action doesn't use
1724               pcrs-based filters, the notes in the <tt class=
1725               "LITERAL"><a href="actions-file.html#FILTER">filter</a></tt>
1726               section apply.</p>
1727               <div class="WARNING">
1728                 <table class="WARNING" border="1" width="90%">
1729                   <tr>
1730                     <td align="center"><b>Warning</b></td>
1731                   </tr>
1732                   <tr>
1733                     <td align="left">
1734                       <p>Currently external filters are executed with
1735                       <span class="APPLICATION">Privoxy</span>'s privileges.
1736                       Only use external filters you understand and trust.</p>
1737                     </td>
1738                   </tr>
1739                 </table>
1740               </div>
1741               <p>This feature is experimental, the <tt class=
1742               "LITERAL"><a href=
1743               "filter-file.html#EXTERNAL-FILTER-SYNTAX">syntax</a></tt> may
1744               change in the future.</p>
1745             </dd>
1746             <dt>Example usage:</dt>
1747             <dd>
1748               <table border="0" bgcolor="#E0E0E0" width="90%">
1749                 <tr>
1750                   <td>
1751                     <pre class="SCREEN">+external-filter{fancy-filter}</pre>
1752                   </td>
1753                 </tr>
1754               </table>
1755             </dd>
1756           </dl>
1757         </div>
1758       </div>
1759       <div class="SECT3">
1760         <h4 class="SECT3"><a name="FAST-REDIRECTS" id=
1761         "FAST-REDIRECTS">8.5.15. fast-redirects</a></h4>
1762         <div class="VARIABLELIST">
1763           <dl>
1764             <dt>Typical use:</dt>
1765             <dd>
1766               <p>Fool some click-tracking scripts and speed up indirect
1767               links.</p>
1768             </dd>
1769             <dt>Effect:</dt>
1770             <dd>
1771               <p>Detects redirection URLs and redirects the browser without
1772               contacting the redirection server first.</p>
1773             </dd>
1774             <dt>Type:</dt>
1775             <dd>
1776               <p>Parameterized.</p>
1777             </dd>
1778             <dt>Parameter:</dt>
1779             <dd>
1780               <ul>
1781                 <li>
1782                   <p><span class="QUOTE">"simple-check"</span> to just search
1783                   for the string <span class="QUOTE">"http://"</span> to
1784                   detect redirection URLs.</p>
1785                 </li>
1786                 <li>
1787                   <p><span class="QUOTE">"check-decoded-url"</span> to decode
1788                   URLs (if necessary) before searching for redirection
1789                   URLs.</p>
1790                 </li>
1791               </ul>
1792             </dd>
1793             <dt>Notes:</dt>
1794             <dd>
1795               <p>Many sites, like yahoo.com, don't just link to other sites.
1796               Instead, they will link to some script on their own servers,
1797               giving the destination as a parameter, which will then redirect
1798               you to the final target. URLs resulting from this scheme
1799               typically look like: <span class=
1800               "QUOTE">"http://www.example.org/click-tracker.cgi?target=http%3a//www.example.net/"</span>.</p>
1801               <p>Sometimes, there are even multiple consecutive redirects
1802               encoded in the URL. These redirections via scripts make your
1803               web browsing more traceable, since the server from which you
1804               follow such a link can see where you go to. Apart from that,
1805               valuable bandwidth and time is wasted, while your browser asks
1806               the server for one redirect after the other. Plus, it feeds the
1807               advertisers.</p>
1808               <p>This feature is currently not very smart and is scheduled
1809               for improvement. If it is enabled by default, you will have to
1810               create some exceptions to this action. It can lead to failures
1811               in several ways:</p>
1812               <p>Not every URLs with other URLs as parameters is evil. Some
1813               sites offer a real service that requires this information to
1814               work. For example a validation service needs to know, which
1815               document to validate. <tt class="LITERAL">fast-redirects</tt>
1816               assumes that every URL parameter that looks like another URL is
1817               a redirection target, and will always redirect to the last one.
1818               Most of the time the assumption is correct, but if it isn't,
1819               the user gets redirected anyway.</p>
1820               <p>Another failure occurs if the URL contains other parameters
1821               after the URL parameter. The URL: <span class=
1822               "QUOTE">"http://www.example.org/?redirect=http%3a//www.example.net/&amp;foo=bar"</span>.
1823               contains the redirection URL <span class=
1824               "QUOTE">"http://www.example.net/"</span>, followed by another
1825               parameter. <tt class="LITERAL">fast-redirects</tt> doesn't know
1826               that and will cause a redirect to <span class=
1827               "QUOTE">"http://www.example.net/&amp;foo=bar"</span>. Depending
1828               on the target server configuration, the parameter will be
1829               silently ignored or lead to a <span class="QUOTE">"page not
1830               found"</span> error. You can prevent this problem by first
1831               using the <tt class="LITERAL"><a href=
1832               "actions-file.html#REDIRECT">redirect</a></tt> action to remove
1833               the last part of the URL, but it requires a little effort.</p>
1834               <p>To detect a redirection URL, <tt class=
1835               "LITERAL">fast-redirects</tt> only looks for the string
1836               <span class="QUOTE">"http://"</span>, either in plain text
1837               (invalid but often used) or encoded as <span class=
1838               "QUOTE">"http%3a//"</span>. Some sites use their own URL
1839               encoding scheme, encrypt the address of the target server or
1840               replace it with a database id. In theses cases <tt class=
1841               "LITERAL">fast-redirects</tt> is fooled and the request reaches
1842               the redirection server where it probably gets logged.</p>
1843             </dd>
1844             <dt>Example usage:</dt>
1845             <dd>
1846               <table border="0" bgcolor="#E0E0E0" width="90%">
1847                 <tr>
1848                   <td>
1849                     <pre class="SCREEN"> { +fast-redirects{simple-check} }
1850    one.example.com
1851
1852  { +fast-redirects{check-decoded-url} }
1853    another.example.com/testing</pre>
1854                   </td>
1855                 </tr>
1856               </table>
1857             </dd>
1858           </dl>
1859         </div>
1860       </div>
1861       <div class="SECT3">
1862         <h4 class="SECT3"><a name="FILTER" id="FILTER">8.5.16.
1863         filter</a></h4>
1864         <div class="VARIABLELIST">
1865           <dl>
1866             <dt>Typical use:</dt>
1867             <dd>
1868               <p>Get rid of HTML and JavaScript annoyances, banner
1869               advertisements (by size), do fun text replacements, add
1870               personalized effects, etc.</p>
1871             </dd>
1872             <dt>Effect:</dt>
1873             <dd>
1874               <p>All instances of text-based type, most notably HTML and
1875               JavaScript, to which this action applies, can be filtered
1876               on-the-fly through the specified regular expression based
1877               substitutions. (Note: as of version 3.0.3 plain text documents
1878               are exempted from filtering, because web servers often use the
1879               <tt class="LITERAL">text/plain</tt> MIME type for all files
1880               whose type they don't know.)</p>
1881             </dd>
1882             <dt>Type:</dt>
1883             <dd>
1884               <p>Multi-value.</p>
1885             </dd>
1886             <dt>Parameter:</dt>
1887             <dd>
1888               <p>The name of a content filter, as defined in the <a href=
1889               "filter-file.html">filter file</a>. Filters can be defined in
1890               one or more files as defined by the <tt class=
1891               "LITERAL"><a href="config.html#FILTERFILE">filterfile</a></tt>
1892               option in the <a href="config.html">config file</a>. <tt class=
1893               "FILENAME">default.filter</tt> is the collection of filters
1894               supplied by the developers. Locally defined filters should go
1895               in their own file, such as <tt class=
1896               "FILENAME">user.filter</tt>.</p>
1897               <p>When used in its negative form, and without parameters,
1898               <span class="emphasis"><i class="EMPHASIS">all</i></span>
1899               filtering is completely disabled.</p>
1900             </dd>
1901             <dt>Notes:</dt>
1902             <dd>
1903               <p>For your convenience, there are a number of pre-defined
1904               filters available in the distribution filter file that you can
1905               use. See the examples below for a list.</p>
1906               <p>Filtering requires buffering the page content, which may
1907               appear to slow down page rendering since nothing is displayed
1908               until all content has passed the filters. (The total time until
1909               the page is completely rendered doesn't change much, but it may
1910               be perceived as slower since the page is not incrementally
1911               displayed.) This effect will be more noticeable on slower
1912               connections.</p>
1913               <p><span class="QUOTE">"Rolling your own"</span> filters
1914               requires a knowledge of <a href=
1915               "http://en.wikipedia.org/wiki/Regular_expressions" target=
1916               "_top"><span class="QUOTE">"Regular Expressions"</span></a> and
1917               <a href="http://en.wikipedia.org/wiki/Html" target=
1918               "_top"><span class="QUOTE">"HTML"</span></a>. This is very
1919               powerful feature, and potentially very intrusive. Filters
1920               should be used with caution, and where an equivalent
1921               <span class="QUOTE">"action"</span> is not available.</p>
1922               <p>The amount of data that can be filtered is limited to the
1923               <tt class="LITERAL"><a href=
1924               "config.html#BUFFER-LIMIT">buffer-limit</a></tt> option in the
1925               main <a href="config.html">config file</a>. The default is 4096
1926               KB (4 Megs). Once this limit is exceeded, the buffered data,
1927               and all pending data, is passed through unfiltered.</p>
1928               <p>Inappropriate MIME types, such as zipped files, are not
1929               filtered at all. (Again, only text-based types except plain
1930               text). Encrypted SSL data (from HTTPS servers) cannot be
1931               filtered either, since this would violate the integrity of the
1932               secure transaction. In some situations it might be necessary to
1933               protect certain text, like source code, from filtering by
1934               defining appropriate <tt class="LITERAL">-filter</tt>
1935               exceptions.</p>
1936               <p>Compressed content can't be filtered either, but if
1937               <span class="APPLICATION">Privoxy</span> is compiled with zlib
1938               support and a supported compression algorithm is used (gzip or
1939               deflate), <span class="APPLICATION">Privoxy</span> can first
1940               decompress the content and then filter it.</p>
1941               <p>If you use a <span class="APPLICATION">Privoxy</span>
1942               version without zlib support, but want filtering to work on as
1943               much documents as possible, even those that would normally be
1944               sent compressed, you must use the <tt class="LITERAL"><a href=
1945               "actions-file.html#PREVENT-COMPRESSION">prevent-compression</a></tt>
1946               action in conjunction with <tt class="LITERAL">filter</tt>.</p>
1947               <p>Content filtering can achieve some of the same effects as
1948               the <tt class="LITERAL"><a href=
1949               "actions-file.html#BLOCK">block</a></tt> action, i.e. it can be
1950               used to block ads and banners. But the mechanism works quite
1951               differently. One effective use, is to block ad banners based on
1952               their size (see below), since many of these seem to be somewhat
1953               standardized.</p>
1954               <p><a href="contact.html">Feedback</a> with suggestions for new
1955               or improved filters is particularly welcome!</p>
1956               <p>The below list has only the names and a one-line description
1957               of each predefined filter. There are <a href=
1958               "filter-file.html#PREDEFINED-FILTERS">more verbose
1959               explanations</a> of what these filters do in the <a href=
1960               "filter-file.html">filter file chapter</a>.</p>
1961             </dd>
1962             <dt>Example usage (with filters from the distribution <tt class=
1963             "FILENAME">default.filter</tt> file). See <a href=
1964             "filter-file.html#PREDEFINED-FILTERS">the Predefined Filters
1965             section</a> for more explanation on each:</dt>
1966             <dd>
1967               <p><a name="FILTER-JS-ANNOYANCES" id=
1968               "FILTER-JS-ANNOYANCES"></a></p>
1969               <table border="0" bgcolor="#E0E0E0" width="90%">
1970                 <tr>
1971                   <td>
1972                     <pre class="SCREEN">
1973                     +filter{js-annoyances}       # Get rid of particularly annoying JavaScript abuse.</pre>
1974                   </td>
1975                 </tr>
1976               </table>
1977               <p><a name="FILTER-JS-EVENTS" id="FILTER-JS-EVENTS"></a></p>
1978               <table border="0" bgcolor="#E0E0E0" width="90%">
1979                 <tr>
1980                   <td>
1981                     <pre class="SCREEN">
1982                     +filter{js-events}           # Kill JavaScript event bindings and timers (Radically destructive! Only for extra nasty sites).</pre>
1983                   </td>
1984                 </tr>
1985               </table>
1986               <p><a name="FILTER-HTML-ANNOYANCES" id=
1987               "FILTER-HTML-ANNOYANCES"></a></p>
1988               <table border="0" bgcolor="#E0E0E0" width="90%">
1989                 <tr>
1990                   <td>
1991                     <pre class="SCREEN">
1992                     +filter{html-annoyances}     # Get rid of particularly annoying HTML abuse.</pre>
1993                   </td>
1994                 </tr>
1995               </table>
1996               <p><a name="FILTER-CONTENT-COOKIES" id=
1997               "FILTER-CONTENT-COOKIES"></a></p>
1998               <table border="0" bgcolor="#E0E0E0" width="90%">
1999                 <tr>
2000                   <td>
2001                     <pre class="SCREEN">
2002                     +filter{content-cookies}     # Kill cookies that come in the HTML or JS content.</pre>
2003                   </td>
2004                 </tr>
2005               </table>
2006               <p><a name="FILTER-REFRESH-TAGS" id=
2007               "FILTER-REFRESH-TAGS"></a></p>
2008               <table border="0" bgcolor="#E0E0E0" width="90%">
2009                 <tr>
2010                   <td>
2011                     <pre class="SCREEN">
2012                     +filter{refresh-tags}        # Kill automatic refresh tags if refresh time is larger than 9 seconds.</pre>
2013                   </td>
2014                 </tr>
2015               </table>
2016               <p><a name="FILTER-UNSOLICITED-POPUPS" id=
2017               "FILTER-UNSOLICITED-POPUPS"></a></p>
2018               <table border="0" bgcolor="#E0E0E0" width="90%">
2019                 <tr>
2020                   <td>
2021                     <pre class="SCREEN">
2022                     +filter{unsolicited-popups}  # Disable only unsolicited pop-up windows.</pre>
2023                   </td>
2024                 </tr>
2025               </table>
2026               <p><a name="FILTER-ALL-POPUPS" id="FILTER-ALL-POPUPS"></a></p>
2027               <table border="0" bgcolor="#E0E0E0" width="90%">
2028                 <tr>
2029                   <td>
2030                     <pre class="SCREEN">
2031                     +filter{all-popups}          # Kill all popups in JavaScript and HTML.</pre>
2032                   </td>
2033                 </tr>
2034               </table>
2035               <p><a name="FILTER-IMG-REORDER" id=
2036               "FILTER-IMG-REORDER"></a></p>
2037               <table border="0" bgcolor="#E0E0E0" width="90%">
2038                 <tr>
2039                   <td>
2040                     <pre class="SCREEN">
2041                     +filter{img-reorder}         # Reorder attributes in &lt;img&gt; tags to make the banners-by-* filters more effective.</pre>
2042                   </td>
2043                 </tr>
2044               </table>
2045               <p><a name="FILTER-BANNERS-BY-SIZE" id=
2046               "FILTER-BANNERS-BY-SIZE"></a></p>
2047               <table border="0" bgcolor="#E0E0E0" width="90%">
2048                 <tr>
2049                   <td>
2050                     <pre class="SCREEN">
2051                     +filter{banners-by-size}     # Kill banners by size.</pre>
2052                   </td>
2053                 </tr>
2054               </table>
2055               <p><a name="FILTER-BANNERS-BY-LINK" id=
2056               "FILTER-BANNERS-BY-LINK"></a></p>
2057               <table border="0" bgcolor="#E0E0E0" width="90%">
2058                 <tr>
2059                   <td>
2060                     <pre class="SCREEN">
2061                     +filter{banners-by-link}     # Kill banners by their links to known clicktrackers.</pre>
2062                   </td>
2063                 </tr>
2064               </table>
2065               <p><a name="FILTER-WEBBUGS" id="FILTER-WEBBUGS"></a></p>
2066               <table border="0" bgcolor="#E0E0E0" width="90%">
2067                 <tr>
2068                   <td>
2069                     <pre class="SCREEN">
2070                     +filter{webbugs}             # Squish WebBugs (1x1 invisible GIFs used for user tracking).</pre>
2071                   </td>
2072                 </tr>
2073               </table>
2074               <p><a name="FILTER-TINY-TEXTFORMS" id=
2075               "FILTER-TINY-TEXTFORMS"></a></p>
2076               <table border="0" bgcolor="#E0E0E0" width="90%">
2077                 <tr>
2078                   <td>
2079                     <pre class="SCREEN">
2080                     +filter{tiny-textforms}      # Extend those tiny textareas up to 40x80 and kill the hard wrap.</pre>
2081                   </td>
2082                 </tr>
2083               </table>
2084               <p><a name="FILTER-JUMPING-WINDOWS" id=
2085               "FILTER-JUMPING-WINDOWS"></a></p>
2086               <table border="0" bgcolor="#E0E0E0" width="90%">
2087                 <tr>
2088                   <td>
2089                     <pre class="SCREEN">
2090                     +filter{jumping-windows}     # Prevent windows from resizing and moving themselves.</pre>
2091                   </td>
2092                 </tr>
2093               </table>
2094               <p><a name="FILTER-FRAMESET-BORDERS" id=
2095               "FILTER-FRAMESET-BORDERS"></a></p>
2096               <table border="0" bgcolor="#E0E0E0" width="90%">
2097                 <tr>
2098                   <td>
2099                     <pre class="SCREEN">
2100                     +filter{frameset-borders}    # Give frames a border and make them resizable.</pre>
2101                   </td>
2102                 </tr>
2103               </table>
2104               <p><a name="FILTER-IFRAMES" id="FILTER-IFRAMES"></a></p>
2105               <table border="0" bgcolor="#E0E0E0" width="90%">
2106                 <tr>
2107                   <td>
2108                     <pre class="SCREEN">
2109                     +filter{iframes}             # Removes all detected iframes. Should only be enabled for individual sites.</pre>
2110                   </td>
2111                 </tr>
2112               </table>
2113               <p><a name="FILTER-DEMORONIZER" id=
2114               "FILTER-DEMORONIZER"></a></p>
2115               <table border="0" bgcolor="#E0E0E0" width="90%">
2116                 <tr>
2117                   <td>
2118                     <pre class="SCREEN">
2119                     +filter{demoronizer}         # Fix MS's non-standard use of standard charsets.</pre>
2120                   </td>
2121                 </tr>
2122               </table>
2123               <p><a name="FILTER-SHOCKWAVE-FLASH" id=
2124               "FILTER-SHOCKWAVE-FLASH"></a></p>
2125               <table border="0" bgcolor="#E0E0E0" width="90%">
2126                 <tr>
2127                   <td>
2128                     <pre class="SCREEN">
2129                     +filter{shockwave-flash}     # Kill embedded Shockwave Flash objects.</pre>
2130                   </td>
2131                 </tr>
2132               </table>
2133               <p><a name="FILTER-QUICKTIME-KIOSKMODE" id=
2134               "FILTER-QUICKTIME-KIOSKMODE"></a></p>
2135               <table border="0" bgcolor="#E0E0E0" width="90%">
2136                 <tr>
2137                   <td>
2138                     <pre class="SCREEN">
2139                     +filter{quicktime-kioskmode} # Make Quicktime movies saveable.</pre>
2140                   </td>
2141                 </tr>
2142               </table>
2143               <p><a name="FILTER-FUN" id="FILTER-FUN"></a></p>
2144               <table border="0" bgcolor="#E0E0E0" width="90%">
2145                 <tr>
2146                   <td>
2147                     <pre class="SCREEN">
2148                     +filter{fun}                 # Text replacements for subversive browsing fun!</pre>
2149                   </td>
2150                 </tr>
2151               </table>
2152               <p><a name="FILTER-CRUDE-PARENTAL" id=
2153               "FILTER-CRUDE-PARENTAL"></a></p>
2154               <table border="0" bgcolor="#E0E0E0" width="90%">
2155                 <tr>
2156                   <td>
2157                     <pre class="SCREEN">
2158                     +filter{crude-parental}      # Crude parental filtering. Note that this filter doesn't work reliably.</pre>
2159                   </td>
2160                 </tr>
2161               </table>
2162               <p><a name="FILTER-IE-EXPLOITS" id=
2163               "FILTER-IE-EXPLOITS"></a></p>
2164               <table border="0" bgcolor="#E0E0E0" width="90%">
2165                 <tr>
2166                   <td>
2167                     <pre class="SCREEN">
2168                     +filter{ie-exploits}         # Disable some known Internet Explorer bug exploits.</pre>
2169                   </td>
2170                 </tr>
2171               </table>
2172               <p><a name="FILTER-SITE-SPECIFICS" id=
2173               "FILTER-SITE-SPECIFICS"></a></p>
2174               <table border="0" bgcolor="#E0E0E0" width="90%">
2175                 <tr>
2176                   <td>
2177                     <pre class="SCREEN">
2178                     +filter{site-specifics}      # Cure for site-specific problems. Don't apply generally!</pre>
2179                   </td>
2180                 </tr>
2181               </table>
2182               <p><a name="FILTER-NO-PING" id="FILTER-NO-PING"></a></p>
2183               <table border="0" bgcolor="#E0E0E0" width="90%">
2184                 <tr>
2185                   <td>
2186                     <pre class="SCREEN">
2187                     +filter{no-ping}             # Removes non-standard ping attributes in &lt;a&gt; and &lt;area&gt; tags.</pre>
2188                   </td>
2189                 </tr>
2190               </table>
2191               <p><a name="FILTER-GOOGLE" id="FILTER-GOOGLE"></a></p>
2192               <table border="0" bgcolor="#E0E0E0" width="90%">
2193                 <tr>
2194                   <td>
2195                     <pre class="SCREEN">
2196                     +filter{google}              # CSS-based block for Google text ads. Also removes a width limitation and the toolbar advertisement.</pre>
2197                   </td>
2198                 </tr>
2199               </table>
2200               <p><a name="FILTER-YAHOO" id="FILTER-YAHOO"></a></p>
2201               <table border="0" bgcolor="#E0E0E0" width="90%">
2202                 <tr>
2203                   <td>
2204                     <pre class="SCREEN">
2205                     +filter{yahoo}               # CSS-based block for Yahoo text ads. Also removes a width limitation.</pre>
2206                   </td>
2207                 </tr>
2208               </table>
2209               <p><a name="FILTER-MSN" id="FILTER-MSN"></a></p>
2210               <table border="0" bgcolor="#E0E0E0" width="90%">
2211                 <tr>
2212                   <td>
2213                     <pre class="SCREEN">
2214                     +filter{msn}                 # CSS-based block for MSN text ads. Also removes tracking URLs and a width limitation.</pre>
2215                   </td>
2216                 </tr>
2217               </table>
2218               <p><a name="FILTER-BLOGSPOT" id="FILTER-BLOGSPOT"></a></p>
2219               <table border="0" bgcolor="#E0E0E0" width="90%">
2220                 <tr>
2221                   <td>
2222                     <pre class="SCREEN">
2223                     +filter{blogspot}            # Cleans up some Blogspot blogs. Read the fine print before using this.</pre>
2224                   </td>
2225                 </tr>
2226               </table>
2227             </dd>
2228           </dl>
2229         </div>
2230       </div>
2231       <div class="SECT3">
2232         <h4 class="SECT3"><a name="FORCE-TEXT-MODE" id=
2233         "FORCE-TEXT-MODE">8.5.17. force-text-mode</a></h4>
2234         <div class="VARIABLELIST">
2235           <dl>
2236             <dt>Typical use:</dt>
2237             <dd>
2238               <p>Force <span class="APPLICATION">Privoxy</span> to treat a
2239               document as if it was in some kind of <span class=
2240               "emphasis"><i class="EMPHASIS">text</i></span> format.</p>
2241             </dd>
2242             <dt>Effect:</dt>
2243             <dd>
2244               <p>Declares a document as text, even if the <span class=
2245               "QUOTE">"Content-Type:"</span> isn't detected as such.</p>
2246             </dd>
2247             <dt>Type:</dt>
2248             <dd>
2249               <p>Boolean.</p>
2250             </dd>
2251             <dt>Parameter:</dt>
2252             <dd>
2253               <p>N/A</p>
2254             </dd>
2255             <dt>Notes:</dt>
2256             <dd>
2257               <p>As explained <tt class="LITERAL"><a href=
2258               "actions-file.html#FILTER">above</a></tt>, <span class=
2259               "APPLICATION">Privoxy</span> tries to only filter files that
2260               are in some kind of text format. The same restrictions apply to
2261               <tt class="LITERAL"><a href=
2262               "actions-file.html#CONTENT-TYPE-OVERWRITE">content-type-overwrite</a></tt>.
2263               <tt class="LITERAL">force-text-mode</tt> declares a document as
2264               text, without looking at the <span class=
2265               "QUOTE">"Content-Type:"</span> first.</p>
2266               <div class="WARNING">
2267                 <table class="WARNING" border="1" width="90%">
2268                   <tr>
2269                     <td align="center"><b>Warning</b></td>
2270                   </tr>
2271                   <tr>
2272                     <td align="left">
2273                       <p>Think twice before activating this action. Filtering
2274                       binary data with regular expressions can cause file
2275                       damage.</p>
2276                     </td>
2277                   </tr>
2278                 </table>
2279               </div>
2280             </dd>
2281             <dt>Example usage:</dt>
2282             <dd>
2283               <table border="0" bgcolor="#E0E0E0" width="90%">
2284                 <tr>
2285                   <td>
2286                     <pre class="SCREEN">+force-text-mode
2287      </pre>
2288                   </td>
2289                 </tr>
2290               </table>
2291             </dd>
2292           </dl>
2293         </div>
2294       </div>
2295       <div class="SECT3">
2296         <h4 class="SECT3"><a name="FORWARD-OVERRIDE" id=
2297         "FORWARD-OVERRIDE">8.5.18. forward-override</a></h4>
2298         <div class="VARIABLELIST">
2299           <dl>
2300             <dt>Typical use:</dt>
2301             <dd>
2302               <p>Change the forwarding settings based on User-Agent or
2303               request origin</p>
2304             </dd>
2305             <dt>Effect:</dt>
2306             <dd>
2307               <p>Overrules the forward directives in the configuration
2308               file.</p>
2309             </dd>
2310             <dt>Type:</dt>
2311             <dd>
2312               <p>Parameterized.</p>
2313             </dd>
2314             <dt>Parameter:</dt>
2315             <dd>
2316               <ul>
2317                 <li>
2318                   <p><span class="QUOTE">"forward ."</span> to use a direct
2319                   connection without any additional proxies.</p>
2320                 </li>
2321                 <li>
2322                   <p><span class="QUOTE">"forward 127.0.0.1:8123"</span> to
2323                   use the HTTP proxy listening at 127.0.0.1 port 8123.</p>
2324                 </li>
2325                 <li>
2326                   <p><span class="QUOTE">"forward-socks4a 127.0.0.1:9050
2327                   ."</span> to use the socks4a proxy listening at 127.0.0.1
2328                   port 9050. Replace <span class=
2329                   "QUOTE">"forward-socks4a"</span> with <span class=
2330                   "QUOTE">"forward-socks4"</span> to use a socks4 connection
2331                   (with local DNS resolution) instead, use <span class=
2332                   "QUOTE">"forward-socks5"</span> for socks5 connections
2333                   (with remote DNS resolution).</p>
2334                 </li>
2335                 <li>
2336                   <p><span class="QUOTE">"forward-socks4a 127.0.0.1:9050
2337                   proxy.example.org:8000"</span> to use the socks4a proxy
2338                   listening at 127.0.0.1 port 9050 to reach the HTTP proxy
2339                   listening at proxy.example.org port 8000. Replace
2340                   <span class="QUOTE">"forward-socks4a"</span> with
2341                   <span class="QUOTE">"forward-socks4"</span> to use a socks4
2342                   connection (with local DNS resolution) instead, use
2343                   <span class="QUOTE">"forward-socks5"</span> for socks5
2344                   connections (with remote DNS resolution).</p>
2345                 </li>
2346                 <li>
2347                   <p><span class="QUOTE">"forward-webserver
2348                   127.0.0.1:80"</span> to use the HTTP server listening at
2349                   127.0.0.1 port 80 without adjusting the request
2350                   headers.</p>
2351                   <p>This makes it more convenient to use Privoxy to make
2352                   existing websites available as onion services as well.</p>
2353                   <p>Many websites serve content with hardcoded URLs and
2354                   can't be easily adjusted to change the domain based on the
2355                   one used by the client.</p>
2356                   <p>Putting Privoxy between Tor and the webserver (or an
2357                   stunnel that forwards to the webserver) allows to rewrite
2358                   headers and content to make client and server happy at the
2359                   same time.</p>
2360                   <p>Using Privoxy for webservers that are only reachable
2361                   through onion addresses and whose location is supposed to
2362                   be secret is not recommended and should not be necessary
2363                   anyway.</p>
2364                 </li>
2365               </ul>
2366             </dd>
2367             <dt>Notes:</dt>
2368             <dd>
2369               <p>This action takes parameters similar to the <a href=
2370               "config.html#FORWARDING">forward</a> directives in the
2371               configuration file, but without the URL pattern. It can be used
2372               as replacement, but normally it's only used in cases where
2373               matching based on the request URL isn't sufficient.</p>
2374               <div class="WARNING">
2375                 <table class="WARNING" border="1" width="90%">
2376                   <tr>
2377                     <td align="center"><b>Warning</b></td>
2378                   </tr>
2379                   <tr>
2380                     <td align="left">
2381                       <p>Please read the description for the <a href=
2382                       "config.html#FORWARDING">forward</a> directives before
2383                       using this action. Forwarding to the wrong people will
2384                       reduce your privacy and increase the chances of
2385                       man-in-the-middle attacks.</p>
2386                       <p>If the ports are missing or invalid, default values
2387                       will be used. This might change in the future and you
2388                       shouldn't rely on it. Otherwise incorrect syntax causes
2389                       Privoxy to exit. Due to design limitations, invalid
2390                       parameter syntax isn't detected until the action is
2391                       used the first time.</p>
2392                       <p>Use the <a href=
2393                       "http://config.privoxy.org/show-url-info" target=
2394                       "_top">show-url-info CGI page</a> to verify that your
2395                       forward settings do what you thought the do.</p>
2396                     </td>
2397                   </tr>
2398                 </table>
2399               </div>
2400             </dd>
2401             <dt>Example usage:</dt>
2402             <dd>
2403               <table border="0" bgcolor="#E0E0E0" width="90%">
2404                 <tr>
2405                   <td>
2406                     <pre class="SCREEN">
2407                     # Use an ssh tunnel for requests previously tagged as
2408 # <span class="QUOTE">"User-Agent: fetch libfetch/2.0"</span> and make sure
2409 # resuming downloads continues to work.
2410 #
2411 # This way you can continue to use Tor for your normal browsing,
2412 # without overloading the Tor network with your FreeBSD ports updates
2413 # or downloads of bigger files like ISOs.
2414 #
2415 # Note that HTTP headers are easy to fake and therefore their
2416 # values are as (un)trustworthy as your clients and users.
2417 {+forward-override{forward-socks5 10.0.0.2:2222 .} \
2418  -hide-if-modified-since      \
2419  -overwrite-last-modified     \
2420 }
2421 TAG:^User-Agent: fetch libfetch/2\.0$
2422      </pre>
2423                   </td>
2424                 </tr>
2425               </table>
2426             </dd>
2427           </dl>
2428         </div>
2429       </div>
2430       <div class="SECT3">
2431         <h4 class="SECT3"><a name="HANDLE-AS-EMPTY-DOCUMENT" id=
2432         "HANDLE-AS-EMPTY-DOCUMENT">8.5.19. handle-as-empty-document</a></h4>
2433         <div class="VARIABLELIST">
2434           <dl>
2435             <dt>Typical use:</dt>
2436             <dd>
2437               <p>Mark URLs that should be replaced by empty documents
2438               <span class="emphasis"><i class="EMPHASIS">if they get
2439               blocked</i></span></p>
2440             </dd>
2441             <dt>Effect:</dt>
2442             <dd>
2443               <p>This action alone doesn't do anything noticeable. It just
2444               marks URLs. If the <tt class="LITERAL"><a href=
2445               "actions-file.html#BLOCK">block</a></tt> action <span class=
2446               "emphasis"><i class="EMPHASIS">also applies</i></span>, the
2447               presence or absence of this mark decides whether an HTML
2448               <span class="QUOTE">"BLOCKED"</span> page, or an empty document
2449               will be sent to the client as a substitute for the blocked
2450               content. The <span class="emphasis"><i class=
2451               "EMPHASIS">empty</i></span> document isn't literally empty, but
2452               actually contains a single space.</p>
2453             </dd>
2454             <dt>Type:</dt>
2455             <dd>
2456               <p>Boolean.</p>
2457             </dd>
2458             <dt>Parameter:</dt>
2459             <dd>
2460               <p>N/A</p>
2461             </dd>
2462             <dt>Notes:</dt>
2463             <dd>
2464               <p>Some browsers complain about syntax errors if JavaScript
2465               documents are blocked with <span class=
2466               "APPLICATION">Privoxy's</span> default HTML page; this option
2467               can be used to silence them. And of course this action can also
2468               be used to eliminate the <span class=
2469               "APPLICATION">Privoxy</span> BLOCKED message in frames.</p>
2470               <p>The content type for the empty document can be specified
2471               with <tt class="LITERAL"><a href=
2472               "actions-file.html#CONTENT-TYPE-OVERWRITE">content-type-overwrite{}</a></tt>,
2473               but usually this isn't necessary.</p>
2474             </dd>
2475             <dt>Example usage:</dt>
2476             <dd>
2477               <table border="0" bgcolor="#E0E0E0" width="90%">
2478                 <tr>
2479                   <td>
2480                     <pre class="SCREEN">
2481                     # Block all documents on example.org that end with ".js",
2482 # but send an empty document instead of the usual HTML message.
2483 {+block{Blocked JavaScript} +handle-as-empty-document}
2484 example.org/.*\.js$
2485      </pre>
2486                   </td>
2487                 </tr>
2488               </table>
2489             </dd>
2490           </dl>
2491         </div>
2492       </div>
2493       <div class="SECT3">
2494         <h4 class="SECT3"><a name="HANDLE-AS-IMAGE" id=
2495         "HANDLE-AS-IMAGE">8.5.20. handle-as-image</a></h4>
2496         <div class="VARIABLELIST">
2497           <dl>
2498             <dt>Typical use:</dt>
2499             <dd>
2500               <p>Mark URLs as belonging to images (so they'll be replaced by
2501               images <span class="emphasis"><i class="EMPHASIS">if they do
2502               get blocked</i></span>, rather than HTML pages)</p>
2503             </dd>
2504             <dt>Effect:</dt>
2505             <dd>
2506               <p>This action alone doesn't do anything noticeable. It just
2507               marks URLs as images. If the <tt class="LITERAL"><a href=
2508               "actions-file.html#BLOCK">block</a></tt> action <span class=
2509               "emphasis"><i class="EMPHASIS">also applies</i></span>, the
2510               presence or absence of this mark decides whether an HTML
2511               <span class="QUOTE">"blocked"</span> page, or a replacement
2512               image (as determined by the <tt class="LITERAL"><a href=
2513               "actions-file.html#SET-IMAGE-BLOCKER">set-image-blocker</a></tt>
2514               action) will be sent to the client as a substitute for the
2515               blocked content.</p>
2516             </dd>
2517             <dt>Type:</dt>
2518             <dd>
2519               <p>Boolean.</p>
2520             </dd>
2521             <dt>Parameter:</dt>
2522             <dd>
2523               <p>N/A</p>
2524             </dd>
2525             <dt>Notes:</dt>
2526             <dd>
2527               <p>The below generic example section is actually part of
2528               <tt class="FILENAME">default.action</tt>. It marks all URLs
2529               with well-known image file name extensions as images and should
2530               be left intact.</p>
2531               <p>Users will probably only want to use the handle-as-image
2532               action in conjunction with <tt class="LITERAL"><a href=
2533               "actions-file.html#BLOCK">block</a></tt>, to block sources of
2534               banners, whose URLs don't reflect the file type, like in the
2535               second example section.</p>
2536               <p>Note that you cannot treat HTML pages as images in most
2537               cases. For instance, (in-line) ad frames require an HTML page
2538               to be sent, or they won't display properly. Forcing <tt class=
2539               "LITERAL">handle-as-image</tt> in this situation will not
2540               replace the ad frame with an image, but lead to error
2541               messages.</p>
2542             </dd>
2543             <dt>Example usage (sections):</dt>
2544             <dd>
2545               <table border="0" bgcolor="#E0E0E0" width="90%">
2546                 <tr>
2547                   <td>
2548                     <pre class="SCREEN"># Generic image extensions:
2549 #
2550 {+handle-as-image}
2551 /.*\.(gif|jpg|jpeg|png|bmp|ico)$
2552
2553 # These don't look like images, but they're banners and should be
2554 # blocked as images:
2555 #
2556 {+block{Nasty banners.} +handle-as-image}
2557 nasty-banner-server.example.com/junk.cgi\?output=trash</pre>
2558                   </td>
2559                 </tr>
2560               </table>
2561             </dd>
2562           </dl>
2563         </div>
2564       </div>
2565       <div class="SECT3">
2566         <h4 class="SECT3"><a name="HIDE-ACCEPT-LANGUAGE" id=
2567         "HIDE-ACCEPT-LANGUAGE">8.5.21. hide-accept-language</a></h4>
2568         <div class="VARIABLELIST">
2569           <dl>
2570             <dt>Typical use:</dt>
2571             <dd>
2572               <p>Pretend to use different language settings.</p>
2573             </dd>
2574             <dt>Effect:</dt>
2575             <dd>
2576               <p>Deletes or replaces the <span class=
2577               "QUOTE">"Accept-Language:"</span> HTTP header in client
2578               requests.</p>
2579             </dd>
2580             <dt>Type:</dt>
2581             <dd>
2582               <p>Parameterized.</p>
2583             </dd>
2584             <dt>Parameter:</dt>
2585             <dd>
2586               <p>Keyword: <span class="QUOTE">"block"</span>, or any user
2587               defined value.</p>
2588             </dd>
2589             <dt>Notes:</dt>
2590             <dd>
2591               <p>Faking the browser's language settings can be useful to make
2592               a foreign User-Agent set with <tt class="LITERAL"><a href=
2593               "actions-file.html#HIDE-USER-AGENT">hide-user-agent</a></tt>
2594               more believable.</p>
2595               <p>However some sites with content in different languages check
2596               the <span class="QUOTE">"Accept-Language:"</span> to decide
2597               which one to take by default. Sometimes it isn't possible to
2598               later switch to another language without changing the
2599               <span class="QUOTE">"Accept-Language:"</span> header first.</p>
2600               <p>Therefore it's a good idea to either only change the
2601               <span class="QUOTE">"Accept-Language:"</span> header to
2602               languages you understand, or to languages that aren't wide
2603               spread.</p>
2604               <p>Before setting the <span class=
2605               "QUOTE">"Accept-Language:"</span> header to a rare language,
2606               you should consider that it helps to make your requests unique
2607               and thus easier to trace. If you don't plan to change this
2608               header frequently, you should stick to a common language.</p>
2609             </dd>
2610             <dt>Example usage (section):</dt>
2611             <dd>
2612               <table border="0" bgcolor="#E0E0E0" width="90%">
2613                 <tr>
2614                   <td>
2615                     <pre class="SCREEN">
2616                     # Pretend to use Canadian language settings.
2617 {+hide-accept-language{en-ca} \
2618 +hide-user-agent{Mozilla/5.0 (X11; U; OpenBSD i386; en-CA; rv:1.8.0.4) Gecko/20060628 Firefox/1.5.0.4} \
2619 }
2620 /   </pre>
2621                   </td>
2622                 </tr>
2623               </table>
2624             </dd>
2625           </dl>
2626         </div>
2627       </div>
2628       <div class="SECT3">
2629         <h4 class="SECT3"><a name="HIDE-CONTENT-DISPOSITION" id=
2630         "HIDE-CONTENT-DISPOSITION">8.5.22. hide-content-disposition</a></h4>
2631         <div class="VARIABLELIST">
2632           <dl>
2633             <dt>Typical use:</dt>
2634             <dd>
2635               <p>Prevent download menus for content you prefer to view inside
2636               the browser.</p>
2637             </dd>
2638             <dt>Effect:</dt>
2639             <dd>
2640               <p>Deletes or replaces the <span class=
2641               "QUOTE">"Content-Disposition:"</span> HTTP header set by some
2642               servers.</p>
2643             </dd>
2644             <dt>Type:</dt>
2645             <dd>
2646               <p>Parameterized.</p>
2647             </dd>
2648             <dt>Parameter:</dt>
2649             <dd>
2650               <p>Keyword: <span class="QUOTE">"block"</span>, or any user
2651               defined value.</p>
2652             </dd>
2653             <dt>Notes:</dt>
2654             <dd>
2655               <p>Some servers set the <span class=
2656               "QUOTE">"Content-Disposition:"</span> HTTP header for documents
2657               they assume you want to save locally before viewing them. The
2658               <span class="QUOTE">"Content-Disposition:"</span> header
2659               contains the file name the browser is supposed to use by
2660               default.</p>
2661               <p>In most browsers that understand this header, it makes it
2662               impossible to <span class="emphasis"><i class="EMPHASIS">just
2663               view</i></span> the document, without downloading it first,
2664               even if it's just a simple text file or an image.</p>
2665               <p>Removing the <span class=
2666               "QUOTE">"Content-Disposition:"</span> header helps to prevent
2667               this annoyance, but some browsers additionally check the
2668               <span class="QUOTE">"Content-Type:"</span> header, before they
2669               decide if they can display a document without saving it first.
2670               In these cases, you have to change this header as well, before
2671               the browser stops displaying download menus.</p>
2672               <p>It is also possible to change the server's file name
2673               suggestion to another one, but in most cases it isn't worth the
2674               time to set it up.</p>
2675               <p>This action will probably be removed in the future, use
2676               server-header filters instead.</p>
2677             </dd>
2678             <dt>Example usage:</dt>
2679             <dd>
2680               <table border="0" bgcolor="#E0E0E0" width="90%">
2681                 <tr>
2682                   <td>
2683                     <pre class="SCREEN">
2684                     # Disarm the download link in Sourceforge's patch tracker
2685 { -filter \
2686  +content-type-overwrite{text/plain}\
2687  +hide-content-disposition{block} }
2688  .sourceforge.net/tracker/download\.php</pre>
2689                   </td>
2690                 </tr>
2691               </table>
2692             </dd>
2693           </dl>
2694         </div>
2695       </div>
2696       <div class="SECT3">
2697         <h4 class="SECT3"><a name="HIDE-IF-MODIFIED-SINCE" id=
2698         "HIDE-IF-MODIFIED-SINCE">8.5.23. hide-if-modified-since</a></h4>
2699         <div class="VARIABLELIST">
2700           <dl>
2701             <dt>Typical use:</dt>
2702             <dd>
2703               <p>Prevent yet another way to track the user's steps between
2704               sessions.</p>
2705             </dd>
2706             <dt>Effect:</dt>
2707             <dd>
2708               <p>Deletes the <span class="QUOTE">"If-Modified-Since:"</span>
2709               HTTP client header or modifies its value.</p>
2710             </dd>
2711             <dt>Type:</dt>
2712             <dd>
2713               <p>Parameterized.</p>
2714             </dd>
2715             <dt>Parameter:</dt>
2716             <dd>
2717               <p>Keyword: <span class="QUOTE">"block"</span>, or a user
2718               defined value that specifies a range of hours.</p>
2719             </dd>
2720             <dt>Notes:</dt>
2721             <dd>
2722               <p>Removing this header is useful for filter testing, where you
2723               want to force a real reload instead of getting status code
2724               <span class="QUOTE">"304"</span>, which would cause the browser
2725               to use a cached copy of the page.</p>
2726               <p>Instead of removing the header, <tt class=
2727               "LITERAL">hide-if-modified-since</tt> can also add or subtract
2728               a random amount of time to/from the header's value. You specify
2729               a range of minutes where the random factor should be chosen
2730               from and <span class="APPLICATION">Privoxy</span> does the
2731               rest. A negative value means subtracting, a positive value
2732               adding.</p>
2733               <p>Randomizing the value of the <span class=
2734               "QUOTE">"If-Modified-Since:"</span> makes it less likely that
2735               the server can use the time as a cookie replacement, but you
2736               will run into caching problems if the random range is too
2737               high.</p>
2738               <p>It is a good idea to only use a small negative value and let
2739               <tt class="LITERAL"><a href=
2740               "actions-file.html#OVERWRITE-LAST-MODIFIED">overwrite-last-modified</a></tt>
2741               handle the greater changes.</p>
2742               <p>It is also recommended to use this action together with
2743               <tt class="LITERAL"><a href=
2744               "actions-file.html#CRUNCH-IF-NONE-MATCH">crunch-if-none-match</a></tt>,
2745               otherwise it's more or less pointless.</p>
2746             </dd>
2747             <dt>Example usage (section):</dt>
2748             <dd>
2749               <table border="0" bgcolor="#E0E0E0" width="90%">
2750                 <tr>
2751                   <td>
2752                     <pre class="SCREEN">
2753                     # Let the browser revalidate but make tracking based on the time less likely.
2754 {+hide-if-modified-since{-60} \
2755  +overwrite-last-modified{randomize} \
2756  +crunch-if-none-match}
2757 /</pre>
2758                   </td>
2759                 </tr>
2760               </table>
2761             </dd>
2762           </dl>
2763         </div>
2764       </div>
2765       <div class="SECT3">
2766         <h4 class="SECT3"><a name="HIDE-FROM-HEADER" id=
2767         "HIDE-FROM-HEADER">8.5.24. hide-from-header</a></h4>
2768         <div class="VARIABLELIST">
2769           <dl>
2770             <dt>Typical use:</dt>
2771             <dd>
2772               <p>Keep your (old and ill) browser from telling web servers
2773               your email address</p>
2774             </dd>
2775             <dt>Effect:</dt>
2776             <dd>
2777               <p>Deletes any existing <span class="QUOTE">"From:"</span> HTTP
2778               header, or replaces it with the specified string.</p>
2779             </dd>
2780             <dt>Type:</dt>
2781             <dd>
2782               <p>Parameterized.</p>
2783             </dd>
2784             <dt>Parameter:</dt>
2785             <dd>
2786               <p>Keyword: <span class="QUOTE">"block"</span>, or any user
2787               defined value.</p>
2788             </dd>
2789             <dt>Notes:</dt>
2790             <dd>
2791               <p>The keyword <span class="QUOTE">"block"</span> will
2792               completely remove the header (not to be confused with the
2793               <tt class="LITERAL"><a href=
2794               "actions-file.html#BLOCK">block</a></tt> action).</p>
2795               <p>Alternately, you can specify any value you prefer to be sent
2796               to the web server. If you do, it is a matter of fairness not to
2797               use any address that is actually used by a real person.</p>
2798               <p>This action is rarely needed, as modern web browsers don't
2799               send <span class="QUOTE">"From:"</span> headers anymore.</p>
2800             </dd>
2801             <dt>Example usage:</dt>
2802             <dd>
2803               <table border="0" bgcolor="#E0E0E0" width="90%">
2804                 <tr>
2805                   <td>
2806                     <pre class="SCREEN">+hide-from-header{block}</pre>
2807                   </td>
2808                 </tr>
2809               </table>or
2810               <table border="0" bgcolor="#E0E0E0" width="90%">
2811                 <tr>
2812                   <td>
2813                     <pre class="SCREEN">
2814                     +hide-from-header{spam-me-senseless@sittingduck.example.com}</pre>
2815                   </td>
2816                 </tr>
2817               </table>
2818             </dd>
2819           </dl>
2820         </div>
2821       </div>
2822       <div class="SECT3">
2823         <h4 class="SECT3"><a name="HIDE-REFERRER" id="HIDE-REFERRER">8.5.25.
2824         hide-referrer</a></h4><a name="HIDE-REFERER" id="HIDE-REFERER"></a>
2825         <div class="VARIABLELIST">
2826           <dl>
2827             <dt>Typical use:</dt>
2828             <dd>
2829               <p>Conceal which link you followed to get to a particular
2830               site</p>
2831             </dd>
2832             <dt>Effect:</dt>
2833             <dd>
2834               <p>Deletes the <span class="QUOTE">"Referer:"</span> (sic) HTTP
2835               header from the client request, or replaces it with a forged
2836               one.</p>
2837             </dd>
2838             <dt>Type:</dt>
2839             <dd>
2840               <p>Parameterized.</p>
2841             </dd>
2842             <dt>Parameter:</dt>
2843             <dd>
2844               <ul>
2845                 <li>
2846                   <p><span class="QUOTE">"conditional-block"</span> to delete
2847                   the header completely if the host has changed.</p>
2848                 </li>
2849                 <li>
2850                   <p><span class="QUOTE">"conditional-forge"</span> to forge
2851                   the header if the host has changed.</p>
2852                 </li>
2853                 <li>
2854                   <p><span class="QUOTE">"block"</span> to delete the header
2855                   unconditionally.</p>
2856                 </li>
2857                 <li>
2858                   <p><span class="QUOTE">"forge"</span> to pretend to be
2859                   coming from the homepage of the server we are talking
2860                   to.</p>
2861                 </li>
2862                 <li>
2863                   <p>Any other string to set a user defined referrer.</p>
2864                 </li>
2865               </ul>
2866             </dd>
2867             <dt>Notes:</dt>
2868             <dd>
2869               <p><tt class="LITERAL">conditional-block</tt> is the only
2870               parameter, that isn't easily detected in the server's log file.
2871               If it blocks the referrer, the request will look like the
2872               visitor used a bookmark or typed in the address directly.</p>
2873               <p>Leaving the referrer unmodified for requests on the same
2874               host allows the server owner to see the visitor's <span class=
2875               "QUOTE">"click path"</span>, but in most cases she could also
2876               get that information by comparing other parts of the log file:
2877               for example the User-Agent if it isn't a very common one, or
2878               the user's IP address if it doesn't change between different
2879               requests.</p>
2880               <p>Always blocking the referrer, or using a custom one, can
2881               lead to failures on servers that check the referrer before they
2882               answer any requests, in an attempt to prevent their content
2883               from being embedded or linked to elsewhere.</p>
2884               <p>Both <tt class="LITERAL">conditional-block</tt> and
2885               <tt class="LITERAL">forge</tt> will work with referrer checks,
2886               as long as content and valid referring page are on the same
2887               host. Most of the time that's the case.</p>
2888               <p><tt class="LITERAL">hide-referer</tt> is an alternate
2889               spelling of <tt class="LITERAL">hide-referrer</tt> and the two
2890               can be can be freely substituted with each other. (<span class=
2891               "QUOTE">"referrer"</span> is the correct English spelling,
2892               however the HTTP specification has a bug - it requires it to be
2893               spelled as <span class="QUOTE">"referer"</span>.)</p>
2894             </dd>
2895             <dt>Example usage:</dt>
2896             <dd>
2897               <table border="0" bgcolor="#E0E0E0" width="90%">
2898                 <tr>
2899                   <td>
2900                     <pre class="SCREEN">+hide-referrer{forge}</pre>
2901                   </td>
2902                 </tr>
2903               </table>or
2904               <table border="0" bgcolor="#E0E0E0" width="90%">
2905                 <tr>
2906                   <td>
2907                     <pre class="SCREEN">
2908                     +hide-referrer{http://www.yahoo.com/}</pre>
2909                   </td>
2910                 </tr>
2911               </table>
2912             </dd>
2913           </dl>
2914         </div>
2915       </div>
2916       <div class="SECT3">
2917         <h4 class="SECT3"><a name="HIDE-USER-AGENT" id=
2918         "HIDE-USER-AGENT">8.5.26. hide-user-agent</a></h4>
2919         <div class="VARIABLELIST">
2920           <dl>
2921             <dt>Typical use:</dt>
2922             <dd>
2923               <p>Try to conceal your type of browser and client operating
2924               system</p>
2925             </dd>
2926             <dt>Effect:</dt>
2927             <dd>
2928               <p>Replaces the value of the <span class=
2929               "QUOTE">"User-Agent:"</span> HTTP header in client requests
2930               with the specified value.</p>
2931             </dd>
2932             <dt>Type:</dt>
2933             <dd>
2934               <p>Parameterized.</p>
2935             </dd>
2936             <dt>Parameter:</dt>
2937             <dd>
2938               <p>Any user-defined string.</p>
2939             </dd>
2940             <dt>Notes:</dt>
2941             <dd>
2942               <div class="WARNING">
2943                 <table class="WARNING" border="1" width="90%">
2944                   <tr>
2945                     <td align="center"><b>Warning</b></td>
2946                   </tr>
2947                   <tr>
2948                     <td align="left">
2949                       <p>This can lead to problems on web sites that depend
2950                       on looking at this header in order to customize their
2951                       content for different browsers (which, by the way, is
2952                       <span class="emphasis"><i class=
2953                       "EMPHASIS">NOT</i></span> the right thing to do: good
2954                       web sites work browser-independently).</p>
2955                     </td>
2956                   </tr>
2957                 </table>
2958               </div>
2959               <p>Using this action in multi-user setups or wherever different
2960               types of browsers will access the same <span class=
2961               "APPLICATION">Privoxy</span> is <span class=
2962               "emphasis"><i class="EMPHASIS">not recommended</i></span>. In
2963               single-user, single-browser setups, you might use it to delete
2964               your OS version information from the headers, because it is an
2965               invitation to exploit known bugs for your OS. It is also
2966               occasionally useful to forge this in order to access sites that
2967               won't let you in otherwise (though there may be a good reason
2968               in some cases).</p>
2969               <p>More information on known user-agent strings can be found at
2970               <a href="http://www.user-agents.org/" target=
2971               "_top">http://www.user-agents.org/</a> and <a href=
2972               "http://en.wikipedia.org/wiki/User_agent" target=
2973               "_top">http://en.wikipedia.org/wiki/User_agent</a>.</p>
2974             </dd>
2975             <dt>Example usage:</dt>
2976             <dd>
2977               <table border="0" bgcolor="#E0E0E0" width="90%">
2978                 <tr>
2979                   <td>
2980                     <pre class="SCREEN">
2981                     +hide-user-agent{Netscape 6.1 (X11; I; Linux 2.4.18 i686)}</pre>
2982                   </td>
2983                 </tr>
2984               </table>
2985             </dd>
2986           </dl>
2987         </div>
2988       </div>
2989       <div class="SECT3">
2990         <h4 class="SECT3"><a name="LIMIT-CONNECT" id="LIMIT-CONNECT">8.5.27.
2991         limit-connect</a></h4>
2992         <div class="VARIABLELIST">
2993           <dl>
2994             <dt>Typical use:</dt>
2995             <dd>
2996               <p>Prevent abuse of <span class="APPLICATION">Privoxy</span> as
2997               a TCP proxy relay or disable SSL for untrusted sites</p>
2998             </dd>
2999             <dt>Effect:</dt>
3000             <dd>
3001               <p>Specifies to which ports HTTP CONNECT requests are
3002               allowable.</p>
3003             </dd>
3004             <dt>Type:</dt>
3005             <dd>
3006               <p>Parameterized.</p>
3007             </dd>
3008             <dt>Parameter:</dt>
3009             <dd>
3010               <p>A comma-separated list of ports or port ranges (the latter
3011               using dashes, with the minimum defaulting to 0 and the maximum
3012               to 65K).</p>
3013             </dd>
3014             <dt>Notes:</dt>
3015             <dd>
3016               <p>By default, i.e. if no <tt class=
3017               "LITERAL">limit-connect</tt> action applies, <span class=
3018               "APPLICATION">Privoxy</span> allows HTTP CONNECT requests to
3019               all ports. Use <tt class="LITERAL">limit-connect</tt> if
3020               fine-grained control is desired for some or all
3021               destinations.</p>
3022               <p>The CONNECT methods exists in HTTP to allow access to secure
3023               websites (<span class="QUOTE">"https://"</span> URLs) through
3024               proxies. It works very simply: the proxy connects to the server
3025               on the specified port, and then short-circuits its connections
3026               to the client and to the remote server. This means
3027               CONNECT-enabled proxies can be used as TCP relays very
3028               easily.</p>
3029               <p><span class="APPLICATION">Privoxy</span> relays HTTPS
3030               traffic without seeing the decoded content. Websites can
3031               leverage this limitation to circumvent <span class=
3032               "APPLICATION">Privoxy</span>'s filters. By specifying an
3033               invalid port range you can disable HTTPS entirely.</p>
3034             </dd>
3035             <dt>Example usages:</dt>
3036             <dd>
3037               <table border="0" bgcolor="#E0E0E0" width="90%">
3038                 <tr>
3039                   <td>
3040                     <pre class="SCREEN">
3041                     +limit-connect{443}                   # Port 443 is OK.
3042 +limit-connect{80,443}                # Ports 80 and 443 are OK.
3043 +limit-connect{-3, 7, 20-100, 500-}   # Ports less than 3, 7, 20 to 100 and above 500 are OK.
3044 +limit-connect{-}                     # All ports are OK
3045 +limit-connect{,}                     # No HTTPS/SSL traffic is allowed</pre>
3046                   </td>
3047                 </tr>
3048               </table>
3049             </dd>
3050           </dl>
3051         </div>
3052       </div>
3053       <div class="SECT3">
3054         <h4 class="SECT3"><a name="LIMIT-COOKIE-LIFETIME" id=
3055         "LIMIT-COOKIE-LIFETIME">8.5.28. limit-cookie-lifetime</a></h4>
3056         <div class="VARIABLELIST">
3057           <dl>
3058             <dt>Typical use:</dt>
3059             <dd>
3060               <p>Limit the lifetime of HTTP cookies to a couple of minutes or
3061               hours.</p>
3062             </dd>
3063             <dt>Effect:</dt>
3064             <dd>
3065               <p>Overwrites the expires field in Set-Cookie server headers if
3066               it's above the specified limit.</p>
3067             </dd>
3068             <dt>Type:</dt>
3069             <dd>
3070               <p>Parameterized.</p>
3071             </dd>
3072             <dt>Parameter:</dt>
3073             <dd>
3074               <p>The lifetime limit in minutes, or 0.</p>
3075             </dd>
3076             <dt>Notes:</dt>
3077             <dd>
3078               <p>This action reduces the lifetime of HTTP cookies coming from
3079               the server to the specified number of minutes, starting from
3080               the time the cookie passes Privoxy.</p>
3081               <p>Cookies with a lifetime below the limit are not modified.
3082               The lifetime of session cookies is set to the specified
3083               limit.</p>
3084               <p>The effect of this action depends on the server.</p>
3085               <p>In case of servers which refresh their cookies with each
3086               response (or at least frequently), the lifetime limit set by
3087               this action is updated as well. Thus, a session associated with
3088               the cookie continues to work with this action enabled, as long
3089               as a new request is made before the last limit set is
3090               reached.</p>
3091               <p>However, some servers send their cookies once, with a
3092               lifetime of several years (the year 2037 is a popular choice),
3093               and do not refresh them until a certain event in the future,
3094               for example the user logging out. In this case this action may
3095               limit the absolute lifetime of the session, even if requests
3096               are made frequently.</p>
3097               <p>If the parameter is <span class="QUOTE">"0"</span>, this
3098               action behaves like <tt class="LITERAL"><a href=
3099               "actions-file.html#SESSION-COOKIES-ONLY">session-cookies-only</a></tt>.</p>
3100             </dd>
3101             <dt>Example usages:</dt>
3102             <dd>
3103               <table border="0" bgcolor="#E0E0E0" width="90%">
3104                 <tr>
3105                   <td>
3106                     <pre class="SCREEN">+limit-cookie-lifetime{60}
3107        </pre>
3108                   </td>
3109                 </tr>
3110               </table>
3111             </dd>
3112           </dl>
3113         </div>
3114       </div>
3115       <div class="SECT3">
3116         <h4 class="SECT3"><a name="PREVENT-COMPRESSION" id=
3117         "PREVENT-COMPRESSION">8.5.29. prevent-compression</a></h4>
3118         <div class="VARIABLELIST">
3119           <dl>
3120             <dt>Typical use:</dt>
3121             <dd>
3122               <p>Ensure that servers send the content uncompressed, so it can
3123               be passed through <tt class="LITERAL"><a href=
3124               "actions-file.html#FILTER">filter</a></tt>s.</p>
3125             </dd>
3126             <dt>Effect:</dt>
3127             <dd>
3128               <p>Removes the Accept-Encoding header which can be used to ask
3129               for compressed transfer.</p>
3130             </dd>
3131             <dt>Type:</dt>
3132             <dd>
3133               <p>Boolean.</p>
3134             </dd>
3135             <dt>Parameter:</dt>
3136             <dd>
3137               <p>N/A</p>
3138             </dd>
3139             <dt>Notes:</dt>
3140             <dd>
3141               <p>More and more websites send their content compressed by
3142               default, which is generally a good idea and saves bandwidth.
3143               But the <tt class="LITERAL"><a href=
3144               "actions-file.html#FILTER">filter</a></tt> and <tt class=
3145               "LITERAL"><a href=
3146               "actions-file.html#DEANIMATE-GIFS">deanimate-gifs</a></tt>
3147               actions need access to the uncompressed data.</p>
3148               <p>When compiled with zlib support (available since
3149               <span class="APPLICATION">Privoxy</span> 3.0.7), content that
3150               should be filtered is decompressed on-the-fly and you don't
3151               have to worry about this action. If you are using an older
3152               <span class="APPLICATION">Privoxy</span> version, or one that
3153               hasn't been compiled with zlib support, this action can be used
3154               to convince the server to send the content uncompressed.</p>
3155               <p>Most text-based instances compress very well, the size is
3156               seldom decreased by less than 50%, for markup-heavy instances
3157               like news feeds saving more than 90% of the original size isn't
3158               unusual.</p>
3159               <p>Not using compression will therefore slow down the transfer,
3160               and you should only enable this action if you really need it.
3161               As of <span class="APPLICATION">Privoxy</span> 3.0.7 it's
3162               disabled in all predefined action settings.</p>
3163               <p>Note that some (rare) ill-configured sites don't handle
3164               requests for uncompressed documents correctly. Broken PHP
3165               applications tend to send an empty document body, some IIS
3166               versions only send the beginning of the content. If you enable
3167               <tt class="LITERAL">prevent-compression</tt> per default, you
3168               might want to add exceptions for those sites. See the example
3169               for how to do that.</p>
3170             </dd>
3171             <dt>Example usage (sections):</dt>
3172             <dd>
3173               <table border="0" bgcolor="#E0E0E0" width="90%">
3174                 <tr>
3175                   <td>
3176                     <pre class="SCREEN">
3177                     # Selectively turn off compression, and enable a filter
3178 #
3179 { +filter{tiny-textforms} +prevent-compression }
3180 # Match only these sites
3181  .google.
3182  sourceforge.net
3183  sf.net
3184
3185 # Or instead, we could set a universal default:
3186 #
3187 { +prevent-compression }
3188  / # Match all sites
3189
3190 # Then maybe make exceptions for broken sites:
3191 #
3192 { -prevent-compression }
3193 .compusa.com/</pre>
3194                   </td>
3195                 </tr>
3196               </table>
3197             </dd>
3198           </dl>
3199         </div>
3200       </div>
3201       <div class="SECT3">
3202         <h4 class="SECT3"><a name="OVERWRITE-LAST-MODIFIED" id=
3203         "OVERWRITE-LAST-MODIFIED">8.5.30. overwrite-last-modified</a></h4>
3204         <div class="VARIABLELIST">
3205           <dl>
3206             <dt>Typical use:</dt>
3207             <dd>
3208               <p>Prevent yet another way to track the user's steps between
3209               sessions.</p>
3210             </dd>
3211             <dt>Effect:</dt>
3212             <dd>
3213               <p>Deletes the <span class="QUOTE">"Last-Modified:"</span> HTTP
3214               server header or modifies its value.</p>
3215             </dd>
3216             <dt>Type:</dt>
3217             <dd>
3218               <p>Parameterized.</p>
3219             </dd>
3220             <dt>Parameter:</dt>
3221             <dd>
3222               <p>One of the keywords: <span class="QUOTE">"block"</span>,
3223               <span class="QUOTE">"reset-to-request-time"</span> and
3224               <span class="QUOTE">"randomize"</span></p>
3225             </dd>
3226             <dt>Notes:</dt>
3227             <dd>
3228               <p>Removing the <span class="QUOTE">"Last-Modified:"</span>
3229               header is useful for filter testing, where you want to force a
3230               real reload instead of getting status code <span class=
3231               "QUOTE">"304"</span>, which would cause the browser to reuse
3232               the old version of the page.</p>
3233               <p>The <span class="QUOTE">"randomize"</span> option overwrites
3234               the value of the <span class="QUOTE">"Last-Modified:"</span>
3235               header with a randomly chosen time between the original value
3236               and the current time. In theory the server could send each
3237               document with a different <span class=
3238               "QUOTE">"Last-Modified:"</span> header to track visits without
3239               using cookies. <span class="QUOTE">"Randomize"</span> makes it
3240               impossible and the browser can still revalidate cached
3241               documents.</p>
3242               <p><span class="QUOTE">"reset-to-request-time"</span>
3243               overwrites the value of the <span class=
3244               "QUOTE">"Last-Modified:"</span> header with the current time.
3245               You could use this option together with <tt class=
3246               "LITERAL"><a href=
3247               "actions-file.html#HIDE-IF-MODIFIED-SINCE">hide-if-modified-since</a></tt>
3248               to further customize your random range.</p>
3249               <p>The preferred parameter here is <span class=
3250               "QUOTE">"randomize"</span>. It is safe to use, as long as the
3251               time settings are more or less correct. If the server sets the
3252               <span class="QUOTE">"Last-Modified:"</span> header to the time
3253               of the request, the random range becomes zero and the value
3254               stays the same. Therefore you should later randomize it a
3255               second time with <tt class="LITERAL"><a href=
3256               "actions-file.html#HIDE-IF-MODIFIED-SINCE">hided-if-modified-since</a></tt>,
3257               just to be sure.</p>
3258               <p>It is also recommended to use this action together with
3259               <tt class="LITERAL"><a href=
3260               "actions-file.html#CRUNCH-IF-NONE-MATCH">crunch-if-none-match</a></tt>.</p>
3261             </dd>
3262             <dt>Example usage:</dt>
3263             <dd>
3264               <table border="0" bgcolor="#E0E0E0" width="90%">
3265                 <tr>
3266                   <td>
3267                     <pre class="SCREEN">
3268                     # Let the browser revalidate without being tracked across sessions
3269 { +hide-if-modified-since{-60} \
3270  +overwrite-last-modified{randomize} \
3271  +crunch-if-none-match}
3272 /</pre>
3273                   </td>
3274                 </tr>
3275               </table>
3276             </dd>
3277           </dl>
3278         </div>
3279       </div>
3280       <div class="SECT3">
3281         <h4 class="SECT3"><a name="REDIRECT" id="REDIRECT">8.5.31.
3282         redirect</a></h4>
3283         <div class="VARIABLELIST">
3284           <dl>
3285             <dt>Typical use:</dt>
3286             <dd>
3287               <p>Redirect requests to other sites.</p>
3288             </dd>
3289             <dt>Effect:</dt>
3290             <dd>
3291               <p>Convinces the browser that the requested document has been
3292               moved to another location and the browser should get it from
3293               there.</p>
3294             </dd>
3295             <dt>Type:</dt>
3296             <dd>
3297               <p>Parameterized</p>
3298             </dd>
3299             <dt>Parameter:</dt>
3300             <dd>
3301               <p>An absolute URL or a single pcrs command.</p>
3302             </dd>
3303             <dt>Notes:</dt>
3304             <dd>
3305               <p>Requests to which this action applies are answered with a
3306               HTTP redirect to URLs of your choosing. The new URL is either
3307               provided as parameter, or derived by applying a single pcrs
3308               command to the original URL.</p>
3309               <p>The syntax for pcrs commands is documented in the <a href=
3310               "filter-file.html">filter file</a> section.</p>
3311               <p>Requests can't be blocked and redirected at the same time,
3312               applying this action together with <tt class="LITERAL"><a href=
3313               "actions-file.html#BLOCK">block</a></tt> is a configuration
3314               error. Currently the request is blocked and an error message
3315               logged, the behavior may change in the future and result in
3316               Privoxy rejecting the action file.</p>
3317               <p>This action can be combined with <tt class=
3318               "LITERAL"><a href="actions-file.html#FAST-REDIRECTS">fast-redirects{check-decoded-url}</a></tt>
3319               to redirect to a decoded version of a rewritten URL.</p>
3320               <p>Use this action carefully, make sure not to create
3321               redirection loops and be aware that using your own redirects
3322               might make it possible to fingerprint your requests.</p>
3323               <p>In case of problems with your redirects, or simply to watch
3324               them working, enable <a href="config.html#DEBUG">debug
3325               128</a>.</p>
3326             </dd>
3327             <dt>Example usages:</dt>
3328             <dd>
3329               <table border="0" bgcolor="#E0E0E0" width="90%">
3330                 <tr>
3331                   <td>
3332                     <pre class="SCREEN">
3333                     # Replace example.com's style sheet with another one
3334 { +redirect{http://localhost/css-replacements/example.com.css} }
3335  example.com/stylesheet\.css
3336
3337 # Create a short, easy to remember nickname for a favorite site
3338 # (relies on the browser to accept and forward invalid URLs to <span class=
3339 "APPLICATION">Privoxy</span>)
3340 { +redirect{https://www.privoxy.org/user-manual/actions-file.html} }
3341  a
3342
3343 # Always use the expanded view for Undeadly.org articles
3344 # (Note the $ at the end of the URL pattern to make sure
3345 # the request for the rewritten URL isn't redirected as well)
3346 {+redirect{s@$@&amp;mode=expanded@}}
3347 undeadly.org/cgi\?action=article&amp;sid=\d*$
3348
3349 # Redirect Google search requests to MSN
3350 {+redirect{s@^http://[^/]*/search\?q=([^&amp;]*).*@http://search.msn.com/results.aspx?q=$1@}}
3351 .google.com/search
3352
3353 # Redirect MSN search requests to Yahoo
3354 {+redirect{s@^http://[^/]*/results\.aspx\?q=([^&amp;]*).*@http://search.yahoo.com/search?p=$1@}}
3355 search.msn.com//results\.aspx\?q=
3356
3357 # Redirect http://example.com/&amp;bla=fasel&amp;toChange=foo (and any other value but "bar")
3358 # to       http://example.com/&amp;bla=fasel&amp;toChange=bar
3359 #
3360 # The URL pattern makes sure that the following request isn't redirected again.
3361 {+redirect{s@toChange=[^&amp;]+@toChange=bar@}}
3362 example.com/.*toChange=(?!bar)
3363
3364 # Add a shortcut to look up illumos bugs
3365 {+redirect{s@^http://i([0-9]+)/.*@https://www.illumos.org/issues/$1@}}
3366 # Redirected URL = http://i4974/
3367 # Redirect Destination = https://www.illumos.org/issues/4974
3368 i[0-9][0-9][0-9][0-9]*/
3369
3370 # Redirect remote requests for this manual
3371 # to the local version delivered by Privoxy
3372 {+redirect{s@^http://www@http://config@}}
3373 www.privoxy.org/user-manual/</pre>
3374                   </td>
3375                 </tr>
3376               </table>
3377             </dd>
3378           </dl>
3379         </div>
3380       </div>
3381       <div class="SECT3">
3382         <h4 class="SECT3"><a name="SERVER-HEADER-FILTER" id=
3383         "SERVER-HEADER-FILTER">8.5.32. server-header-filter</a></h4>
3384         <div class="VARIABLELIST">
3385           <dl>
3386             <dt>Typical use:</dt>
3387             <dd>
3388               <p>Rewrite or remove single server headers.</p>
3389             </dd>
3390             <dt>Effect:</dt>
3391             <dd>
3392               <p>All server headers to which this action applies are filtered
3393               on-the-fly through the specified regular expression based
3394               substitutions.</p>
3395             </dd>
3396             <dt>Type:</dt>
3397             <dd>
3398               <p>Multi-value.</p>
3399             </dd>
3400             <dt>Parameter:</dt>
3401             <dd>
3402               <p>The name of a server-header filter, as defined in one of the
3403               <a href="filter-file.html">filter files</a>.</p>
3404             </dd>
3405             <dt>Notes:</dt>
3406             <dd>
3407               <p>Server-header filters are applied to each header on its own,
3408               not to all at once. This makes it easier to diagnose problems,
3409               but on the downside you can't write filters that only change
3410               header x if header y's value is z. You can do that by using
3411               tags though.</p>
3412               <p>Server-header filters are executed after the other header
3413               actions have finished and use their output as input.</p>
3414               <p>Please refer to the <a href="filter-file.html">filter file
3415               chapter</a> to learn which server-header filters are available
3416               by default, and how to create your own.</p>
3417             </dd>
3418             <dt>Example usage (section):</dt>
3419             <dd>
3420               <table border="0" bgcolor="#E0E0E0" width="90%">
3421                 <tr>
3422                   <td>
3423                     <pre class="SCREEN">{+server-header-filter{html-to-xml}}
3424 example.org/xml-instance-that-is-delivered-as-html
3425
3426 {+server-header-filter{xml-to-html}}
3427 example.org/instance-that-is-delivered-as-xml-but-is-not
3428     </pre>
3429                   </td>
3430                 </tr>
3431               </table>
3432             </dd>
3433           </dl>
3434         </div>
3435       </div>
3436       <div class="SECT3">
3437         <h4 class="SECT3"><a name="SERVER-HEADER-TAGGER" id=
3438         "SERVER-HEADER-TAGGER">8.5.33. server-header-tagger</a></h4>
3439         <div class="VARIABLELIST">
3440           <dl>
3441             <dt>Typical use:</dt>
3442             <dd>
3443               <p>Enable or disable filters based on the Content-Type
3444               header.</p>
3445             </dd>
3446             <dt>Effect:</dt>
3447             <dd>
3448               <p>Server headers to which this action applies are filtered
3449               on-the-fly through the specified regular expression based
3450               substitutions, the result is used as tag.</p>
3451             </dd>
3452             <dt>Type:</dt>
3453             <dd>
3454               <p>Multi-value.</p>
3455             </dd>
3456             <dt>Parameter:</dt>
3457             <dd>
3458               <p>The name of a server-header tagger, as defined in one of the
3459               <a href="filter-file.html">filter files</a>.</p>
3460             </dd>
3461             <dt>Notes:</dt>
3462             <dd>
3463               <p>Server-header taggers are applied to each header on its own,
3464               and as the header isn't modified, each tagger <span class=
3465               "QUOTE">"sees"</span> the original.</p>
3466               <p>Server-header taggers are executed before all other header
3467               actions that modify server headers. Their tags can be used to
3468               control all of the other server-header actions, the content
3469               filters and the crunch actions (<a href=
3470               "actions-file.html#REDIRECT">redirect</a> and <a href=
3471               "actions-file.html#BLOCK">block</a>).</p>
3472               <p>Obviously crunching based on tags created by server-header
3473               taggers doesn't prevent the request from showing up in the
3474               server's log file.</p>
3475             </dd>
3476             <dt>Example usage (section):</dt>
3477             <dd>
3478               <table border="0" bgcolor="#E0E0E0" width="90%">
3479                 <tr>
3480                   <td>
3481                     <pre class="SCREEN">
3482                     # Tag every request with the content type declared by the server
3483 {+server-header-tagger{content-type}}
3484 /
3485
3486 # If the response has a tag starting with 'image/' enable an external
3487 # filter that only applies to images.
3488 #
3489 # Note that the filter is not available by default, it's just a
3490 # <tt class="LITERAL"><a href=
3491 "filter-file.html#EXTERNAL-FILTER-SYNTAX">silly example</a></tt>.
3492 {+external-filter{rotate-image} +force-text-mode}
3493 TAG:^image/
3494     </pre>
3495                   </td>
3496                 </tr>
3497               </table>
3498             </dd>
3499           </dl>
3500         </div>
3501       </div>
3502       <div class="SECT3">
3503         <h4 class="SECT3"><a name="SESSION-COOKIES-ONLY" id=
3504         "SESSION-COOKIES-ONLY">8.5.34. session-cookies-only</a></h4>
3505         <div class="VARIABLELIST">
3506           <dl>
3507             <dt>Typical use:</dt>
3508             <dd>
3509               <p>Allow only temporary <span class="QUOTE">"session"</span>
3510               cookies (for the current browser session <span class=
3511               "emphasis"><i class="EMPHASIS">only</i></span>).</p>
3512             </dd>
3513             <dt>Effect:</dt>
3514             <dd>
3515               <p>Deletes the <span class="QUOTE">"expires"</span> field from
3516               <span class="QUOTE">"Set-Cookie:"</span> server headers. Most
3517               browsers will not store such cookies permanently and forget
3518               them in between sessions.</p>
3519             </dd>
3520             <dt>Type:</dt>
3521             <dd>
3522               <p>Boolean.</p>
3523             </dd>
3524             <dt>Parameter:</dt>
3525             <dd>
3526               <p>N/A</p>
3527             </dd>
3528             <dt>Notes:</dt>
3529             <dd>
3530               <p>This is less strict than <tt class="LITERAL"><a href=
3531               "actions-file.html#CRUNCH-INCOMING-COOKIES">crunch-incoming-cookies</a></tt>
3532               / <tt class="LITERAL"><a href=
3533               "actions-file.html#CRUNCH-OUTGOING-COOKIES">crunch-outgoing-cookies</a></tt>
3534               and allows you to browse websites that insist or rely on
3535               setting cookies, without compromising your privacy too
3536               badly.</p>
3537               <p>Most browsers will not permanently store cookies that have
3538               been processed by <tt class="LITERAL">session-cookies-only</tt>
3539               and will forget about them between sessions. This makes
3540               profiling cookies useless, but won't break sites which require
3541               cookies so that you can log in for transactions. This is
3542               generally turned on for all sites, and is the recommended
3543               setting.</p>
3544               <p>It makes <span class="emphasis"><i class="EMPHASIS">no sense
3545               at all</i></span> to use <tt class=
3546               "LITERAL">session-cookies-only</tt> together with <tt class=
3547               "LITERAL"><a href=
3548               "actions-file.html#CRUNCH-INCOMING-COOKIES">crunch-incoming-cookies</a></tt>
3549               or <tt class="LITERAL"><a href=
3550               "actions-file.html#CRUNCH-OUTGOING-COOKIES">crunch-outgoing-cookies</a></tt>.
3551               If you do, cookies will be plainly killed.</p>
3552               <p>Note that it is up to the browser how it handles such
3553               cookies without an <span class="QUOTE">"expires"</span> field.
3554               If you use an exotic browser, you might want to try it out to
3555               be sure.</p>
3556               <p>This setting also has no effect on cookies that may have
3557               been stored previously by the browser before starting
3558               <span class="APPLICATION">Privoxy</span>. These would have to
3559               be removed manually.</p>
3560               <p><span class="APPLICATION">Privoxy</span> also uses the
3561               <a href=
3562               "actions-file.html#FILTER-CONTENT-COOKIES">content-cookies
3563               filter</a> to block some types of cookies. Content cookies are
3564               not effected by <tt class=
3565               "LITERAL">session-cookies-only</tt>.</p>
3566             </dd>
3567             <dt>Example usage:</dt>
3568             <dd>
3569               <table border="0" bgcolor="#E0E0E0" width="90%">
3570                 <tr>
3571                   <td>
3572                     <pre class="SCREEN">+session-cookies-only</pre>
3573                   </td>
3574                 </tr>
3575               </table>
3576             </dd>
3577           </dl>
3578         </div>
3579       </div>
3580       <div class="SECT3">
3581         <h4 class="SECT3"><a name="SET-IMAGE-BLOCKER" id=
3582         "SET-IMAGE-BLOCKER">8.5.35. set-image-blocker</a></h4>
3583         <div class="VARIABLELIST">
3584           <dl>
3585             <dt>Typical use:</dt>
3586             <dd>
3587               <p>Choose the replacement for blocked images</p>
3588             </dd>
3589             <dt>Effect:</dt>
3590             <dd>
3591               <p>This action alone doesn't do anything noticeable. If
3592               <span class="emphasis"><i class="EMPHASIS">both</i></span>
3593               <tt class="LITERAL"><a href=
3594               "actions-file.html#BLOCK">block</a></tt> <span class=
3595               "emphasis"><i class="EMPHASIS">and</i></span> <tt class=
3596               "LITERAL"><a href=
3597               "actions-file.html#HANDLE-AS-IMAGE">handle-as-image</a></tt>
3598               <span class="emphasis"><i class="EMPHASIS">also</i></span>
3599               apply, i.e. if the request is to be blocked as an image,
3600               <span class="emphasis"><i class="EMPHASIS">then</i></span> the
3601               parameter of this action decides what will be sent as a
3602               replacement.</p>
3603             </dd>
3604             <dt>Type:</dt>
3605             <dd>
3606               <p>Parameterized.</p>
3607             </dd>
3608             <dt>Parameter:</dt>
3609             <dd>
3610               <ul>
3611                 <li>
3612                   <p><span class="QUOTE">"pattern"</span> to send a built-in
3613                   checkerboard pattern image. The image is visually decent,
3614                   scales very well, and makes it obvious where banners were
3615                   busted.</p>
3616                 </li>
3617                 <li>
3618                   <p><span class="QUOTE">"blank"</span> to send a built-in
3619                   transparent image. This makes banners disappear completely,
3620                   but makes it hard to detect where <span class=
3621                   "APPLICATION">Privoxy</span> has blocked images on a given
3622                   page and complicates troubleshooting if <span class=
3623                   "APPLICATION">Privoxy</span> has blocked innocent images,
3624                   like navigation icons.</p>
3625                 </li>
3626                 <li>
3627                   <p><span class="QUOTE">"<tt class=
3628                   "REPLACEABLE"><i>target-url</i></tt>"</span> to send a
3629                   redirect to <tt class="REPLACEABLE"><i>target-url</i></tt>.
3630                   You can redirect to any image anywhere, even in your local
3631                   filesystem via <span class="QUOTE">"file:///"</span> URL.
3632                   (But note that not all browsers support redirecting to a
3633                   local file system).</p>
3634                   <p>A good application of redirects is to use special
3635                   <span class="APPLICATION">Privoxy</span>-built-in URLs,
3636                   which send the built-in images, as <tt class=
3637                   "REPLACEABLE"><i>target-url</i></tt>. This has the same
3638                   visual effect as specifying <span class=
3639                   "QUOTE">"blank"</span> or <span class=
3640                   "QUOTE">"pattern"</span> in the first place, but enables
3641                   your browser to cache the replacement image, instead of
3642                   requesting it over and over again.</p>
3643                 </li>
3644               </ul>
3645             </dd>
3646             <dt>Notes:</dt>
3647             <dd>
3648               <p>The URLs for the built-in images are <span class=
3649               "QUOTE">"http://config.privoxy.org/send-banner?type=<tt class=
3650               "REPLACEABLE"><i>type</i></tt>"</span>, where <tt class=
3651               "REPLACEABLE"><i>type</i></tt> is either <span class=
3652               "QUOTE">"blank"</span> or <span class=
3653               "QUOTE">"pattern"</span>.</p>
3654               <p>There is a third (advanced) type, called <span class=
3655               "QUOTE">"auto"</span>. It is <span class="emphasis"><i class=
3656               "EMPHASIS">NOT</i></span> to be used in <tt class=
3657               "LITERAL">set-image-blocker</tt>, but meant for use from
3658               <a href="filter-file.html">filters</a>. Auto will select the
3659               type of image that would have applied to the referring page,
3660               had it been an image.</p>
3661             </dd>
3662             <dt>Example usage:</dt>
3663             <dd>
3664               <p>Built-in pattern:</p>
3665               <table border="0" bgcolor="#E0E0E0" width="90%">
3666                 <tr>
3667                   <td>
3668                     <pre class="SCREEN">+set-image-blocker{pattern}</pre>
3669                   </td>
3670                 </tr>
3671               </table>
3672               <p>Redirect to the BSD daemon:</p>
3673               <table border="0" bgcolor="#E0E0E0" width="90%">
3674                 <tr>
3675                   <td>
3676                     <pre class="SCREEN">
3677                     +set-image-blocker{http://www.freebsd.org/gifs/dae_up3.gif}</pre>
3678                   </td>
3679                 </tr>
3680               </table>
3681               <p>Redirect to the built-in pattern for better caching:</p>
3682               <table border="0" bgcolor="#E0E0E0" width="90%">
3683                 <tr>
3684                   <td>
3685                     <pre class="SCREEN">
3686                     +set-image-blocker{http://config.privoxy.org/send-banner?type=pattern}</pre>
3687                   </td>
3688                 </tr>
3689               </table>
3690             </dd>
3691           </dl>
3692         </div>
3693       </div>
3694       <div class="SECT3">
3695         <h3 class="SECT3"><a name="SUMMARY" id="SUMMARY">8.5.36.
3696         Summary</a></h3>
3697         <p>Note that many of these actions have the potential to cause a page
3698         to misbehave, possibly even not to display at all. There are many
3699         ways a site designer may choose to design his site, and what HTTP
3700         header content, and other criteria, he may depend on. There is no way
3701         to have hard and fast rules for all sites. See the <a href=
3702         "appendix.html#ACTIONSANAT">Appendix</a> for a brief example on
3703         troubleshooting actions.</p>
3704       </div>
3705     </div>
3706     <div class="SECT2">
3707       <h2 class="SECT2"><a name="ALIASES" id="ALIASES">8.6. Aliases</a></h2>
3708       <p>Custom <span class="QUOTE">"actions"</span>, known to <span class=
3709       "APPLICATION">Privoxy</span> as <span class="QUOTE">"aliases"</span>,
3710       can be defined by combining other actions. These can in turn be invoked
3711       just like the built-in actions. Currently, an alias name can contain
3712       any character except space, tab, <span class="QUOTE">"="</span>,
3713       <span class="QUOTE">"{"</span> and <span class="QUOTE">"}"</span>, but
3714       we <span class="emphasis"><i class="EMPHASIS">strongly
3715       recommend</i></span> that you only use <span class="QUOTE">"a"</span>
3716       to <span class="QUOTE">"z"</span>, <span class="QUOTE">"0"</span> to
3717       <span class="QUOTE">"9"</span>, <span class="QUOTE">"+"</span>, and
3718       <span class="QUOTE">"-"</span>. Alias names are not case sensitive, and
3719       are not required to start with a <span class="QUOTE">"+"</span> or
3720       <span class="QUOTE">"-"</span> sign, since they are merely textually
3721       expanded.</p>
3722       <p>Aliases can be used throughout the actions file, but they
3723       <span class="emphasis"><i class="EMPHASIS">must be defined in a special
3724       section at the top of the file!</i></span> And there can only be one
3725       such section per actions file. Each actions file may have its own alias
3726       section, and the aliases defined in it are only visible within that
3727       file.</p>
3728       <p>There are two main reasons to use aliases: One is to save typing for
3729       frequently used combinations of actions, the other one is a gain in
3730       flexibility: If you decide once how you want to handle shops by
3731       defining an alias called <span class="QUOTE">"shop"</span>, you can
3732       later change your policy on shops in <span class="emphasis"><i class=
3733       "EMPHASIS">one</i></span> place, and your changes will take effect
3734       everywhere in the actions file where the <span class=
3735       "QUOTE">"shop"</span> alias is used. Calling aliases by their purpose
3736       also makes your actions files more readable.</p>
3737       <p>Currently, there is one big drawback to using aliases, though:
3738       <span class="APPLICATION">Privoxy</span>'s built-in web-based action
3739       file editor honors aliases when reading the actions files, but it
3740       expands them before writing. So the effects of your aliases are of
3741       course preserved, but the aliases themselves are lost when you edit
3742       sections that use aliases with it.</p>
3743       <p>Now let's define some aliases...</p>
3744       <table border="0" bgcolor="#E0E0E0" width="100%">
3745         <tr>
3746           <td>
3747             <pre class="SCREEN"> # Useful custom aliases we can use later.
3748  #
3749  # Note the (required!) section header line and that this section
3750  # must be at the top of the actions file!
3751  #
3752  {{alias}}
3753
3754  # These aliases just save typing later:
3755  # (Note that some already use other aliases!)
3756  #
3757  +crunch-all-cookies = +<a href=
3758 "actions-file.html#CRUNCH-INCOMING-COOKIES">crunch-incoming-cookies</a> +<a href="actions-file.html#CRUNCH-OUTGOING-COOKIES">crunch-outgoing-cookies</a>
3759  -crunch-all-cookies = -<a href=
3760 "actions-file.html#CRUNCH-INCOMING-COOKIES">crunch-incoming-cookies</a> -<a href="actions-file.html#CRUNCH-OUTGOING-COOKIES">crunch-outgoing-cookies</a>
3761  +block-as-image      = +block{Blocked image.} +handle-as-image
3762  allow-all-cookies   = -crunch-all-cookies -<a href=
3763 "actions-file.html#SESSION-COOKIES-ONLY">session-cookies-only</a> -<a href=
3764 "actions-file.html#FILTER-CONTENT-COOKIES">filter{content-cookies}</a>
3765
3766  # These aliases define combinations of actions
3767  # that are useful for certain types of sites:
3768  #
3769  fragile     = -<a href="actions-file.html#BLOCK">block</a> -<a href=
3770 "actions-file.html#FILTER">filter</a> -crunch-all-cookies -<a href=
3771 "actions-file.html#FAST-REDIRECTS">fast-redirects</a> -<a href=
3772 "actions-file.html#HIDE-REFERER">hide-referrer</a> -<a href=
3773 "actions-file.html#PREVENT-COMPRESSION">prevent-compression</a>
3774
3775  shop        = -crunch-all-cookies -<a href=
3776 "actions-file.html#FILTER-ALL-POPUPS">filter{all-popups}</a>
3777
3778  # Short names for other aliases, for really lazy people ;-)
3779  #
3780  c0 = +crunch-all-cookies
3781  c1 = -crunch-all-cookies</pre>
3782           </td>
3783         </tr>
3784       </table>
3785       <p>...and put them to use. These sections would appear in the lower
3786       part of an actions file and define exceptions to the default actions
3787       (as specified further up for the <span class="QUOTE">"/"</span>
3788       pattern):</p>
3789       <table border="0" bgcolor="#E0E0E0" width="100%">
3790         <tr>
3791           <td>
3792             <pre class="SCREEN">
3793             # These sites are either very complex or very keen on
3794  # user data and require minimal interference to work:
3795  #
3796  {fragile}
3797  .office.microsoft.com
3798  .windowsupdate.microsoft.com
3799  # Gmail is really mail.google.com, not gmail.com
3800  mail.google.com
3801
3802  # Shopping sites:
3803  # Allow cookies (for setting and retrieving your customer data)
3804  #
3805  {shop}
3806  .quietpc.com
3807  .worldpay.com   # for quietpc.com
3808  mybank.example.com
3809
3810  # These shops require pop-ups:
3811  #
3812  {-filter{all-popups} -filter{unsolicited-popups}}
3813   .dabs.com
3814   .overclockers.co.uk</pre>
3815           </td>
3816         </tr>
3817       </table>
3818       <p>Aliases like <span class="QUOTE">"shop"</span> and <span class=
3819       "QUOTE">"fragile"</span> are typically used for <span class=
3820       "QUOTE">"problem"</span> sites that require more than one action to be
3821       disabled in order to function properly.</p>
3822     </div>
3823     <div class="SECT2">
3824       <h2 class="SECT2"><a name="ACT-EXAMPLES" id="ACT-EXAMPLES">8.7. Actions
3825       Files Tutorial</a></h2>
3826       <p>The above chapters have shown <a href="actions-file.html">which
3827       actions files there are and how they are organized</a>, how actions are
3828       <a href="actions-file.html#ACTIONS">specified</a> and <a href=
3829       "actions-file.html#ACTIONS-APPLY">applied to URLs</a>, how <a href=
3830       "actions-file.html#AF-PATTERNS">patterns</a> work, and how to define
3831       and use <a href="actions-file.html#ALIASES">aliases</a>. Now, let's
3832       look at an example <tt class="FILENAME">match-all.action</tt>,
3833       <tt class="FILENAME">default.action</tt> and <tt class=
3834       "FILENAME">user.action</tt> file and see how all these pieces come
3835       together:</p>
3836       <div class="SECT3">
3837         <h3 class="SECT3"><a name="MATCH-ALL" id="MATCH-ALL">8.7.1.
3838         match-all.action</a></h3>
3839         <p>Remember <span class="emphasis"><i class="EMPHASIS">all actions
3840         are disabled when matching starts</i></span>, so we have to
3841         explicitly enable the ones we want.</p>
3842         <p>While the <tt class="FILENAME">match-all.action</tt> file only
3843         contains a single section, it is probably the most important one. It
3844         has only one pattern, <span class="QUOTE">"<tt class=
3845         "LITERAL">/</tt>"</span>, but this pattern <a href=
3846         "actions-file.html#AF-PATTERNS">matches all URLs</a>. Therefore, the
3847         set of actions used in this <span class="QUOTE">"default"</span>
3848         section <span class="emphasis"><i class="EMPHASIS">will be applied to
3849         all requests as a start</i></span>. It can be partly or wholly
3850         overridden by other actions files like <tt class=
3851         "FILENAME">default.action</tt> and <tt class=
3852         "FILENAME">user.action</tt>, but it will still be largely responsible
3853         for your overall browsing experience.</p>
3854         <p>Again, at the start of matching, all actions are disabled, so
3855         there is no need to disable any actions here. (Remember: a
3856         <span class="QUOTE">"+"</span> preceding the action name enables the
3857         action, a <span class="QUOTE">"-"</span> disables!). Also note how
3858         this long line has been made more readable by splitting it into
3859         multiple lines with line continuation.</p>
3860         <table border="0" bgcolor="#E0E0E0" width="100%">
3861           <tr>
3862             <td>
3863               <pre class="SCREEN">{ \
3864  +<a href=
3865 "actions-file.html#CHANGE-X-FORWARDED-FOR">change-x-forwarded-for{block}</a> \
3866  +<a href="actions-file.html#HIDE-FROM-HEADER">hide-from-header{block}</a> \
3867  +<a href=
3868 "actions-file.html#SET-IMAGE-BLOCKER">set-image-blocker{pattern}</a> \
3869 }
3870 / # Match all URLs
3871  </pre>
3872             </td>
3873           </tr>
3874         </table>
3875         <p>The default behavior is now set.</p>
3876       </div>
3877       <div class="SECT3">
3878         <h3 class="SECT3"><a name="DEFAULT-ACTION" id="DEFAULT-ACTION">8.7.2.
3879         default.action</a></h3>
3880         <p>If you aren't a developer, there's no need for you to edit the
3881         <tt class="FILENAME">default.action</tt> file. It is maintained by
3882         the <span class="APPLICATION">Privoxy</span> developers and if you
3883         disagree with some of the sections, you should overrule them in your
3884         <tt class="FILENAME">user.action</tt>.</p>
3885         <p>Understanding the <tt class="FILENAME">default.action</tt> file
3886         can help you with your <tt class="FILENAME">user.action</tt>,
3887         though.</p>
3888         <p>The first section in this file is a special section for internal
3889         use that prevents older <span class="APPLICATION">Privoxy</span>
3890         versions from reading the file:</p>
3891         <table border="0" bgcolor="#E0E0E0" width="100%">
3892           <tr>
3893             <td>
3894               <pre class="SCREEN">
3895               ##########################################################################
3896 # Settings -- Don't change! For internal Privoxy use ONLY.
3897 ##########################################################################
3898 {{settings}}
3899 for-privoxy-version=3.0.11</pre>
3900             </td>
3901           </tr>
3902         </table>
3903         <p>After that comes the (optional) alias section. We'll use the
3904         example section from the above <a href=
3905         "actions-file.html#ALIASES">chapter on aliases</a>, that also
3906         explains why and how aliases are used:</p>
3907         <table border="0" bgcolor="#E0E0E0" width="100%">
3908           <tr>
3909             <td>
3910               <pre class="SCREEN">
3911               ##########################################################################
3912 # Aliases
3913 ##########################################################################
3914 {{alias}}
3915
3916  # These aliases just save typing later:
3917  # (Note that some already use other aliases!)
3918  #
3919  +crunch-all-cookies = +<a href=
3920 "actions-file.html#CRUNCH-INCOMING-COOKIES">crunch-incoming-cookies</a> +<a href="actions-file.html#CRUNCH-OUTGOING-COOKIES">crunch-outgoing-cookies</a>
3921  -crunch-all-cookies = -<a href=
3922 "actions-file.html#CRUNCH-INCOMING-COOKIES">crunch-incoming-cookies</a> -<a href="actions-file.html#CRUNCH-OUTGOING-COOKIES">crunch-outgoing-cookies</a>
3923  +block-as-image      = +block{Blocked image.} +handle-as-image
3924  mercy-for-cookies   = -crunch-all-cookies -<a href=
3925 "actions-file.html#SESSION-COOKIES-ONLY">session-cookies-only</a> -<a href=
3926 "actions-file.html#FILTER-CONTENT-COOKIES">filter{content-cookies}</a>
3927
3928  # These aliases define combinations of actions
3929  # that are useful for certain types of sites:
3930  #
3931  fragile     = -<a href="actions-file.html#BLOCK">block</a> -<a href=
3932 "actions-file.html#FILTER">filter</a> -crunch-all-cookies -<a href=
3933 "actions-file.html#FAST-REDIRECTS">fast-redirects</a> -<a href=
3934 "actions-file.html#HIDE-REFERER">hide-referrer</a>
3935  shop        = -crunch-all-cookies -<a href=
3936 "actions-file.html#FILTER-ALL-POPUPS">filter{all-popups}</a></pre>
3937             </td>
3938           </tr>
3939         </table>
3940         <p>The first of our specialized sections is concerned with
3941         <span class="QUOTE">"fragile"</span> sites, i.e. sites that require
3942         minimum interference, because they are either very complex or very
3943         keen on tracking you (and have mechanisms in place that make them
3944         unusable for people who avoid being tracked). We will use our
3945         pre-defined <tt class="LITERAL">fragile</tt> alias instead of stating
3946         the list of actions explicitly:</p>
3947         <table border="0" bgcolor="#E0E0E0" width="100%">
3948           <tr>
3949             <td>
3950               <pre class="SCREEN">
3951               ##########################################################################
3952 # Exceptions for sites that'll break under the default action set:
3953 ##########################################################################
3954
3955 # "Fragile" Use a minimum set of actions for these sites (see alias above):
3956 #
3957 { fragile }
3958 .office.microsoft.com           # surprise, surprise!
3959 .windowsupdate.microsoft.com
3960 mail.google.com</pre>
3961             </td>
3962           </tr>
3963         </table>
3964         <p>Shopping sites are not as fragile, but they typically require
3965         cookies to log in, and pop-up windows for shopping carts or item
3966         details. Again, we'll use a pre-defined alias:</p>
3967         <table border="0" bgcolor="#E0E0E0" width="100%">
3968           <tr>
3969             <td>
3970               <pre class="SCREEN"># Shopping sites:
3971 #
3972 { shop }
3973 .quietpc.com
3974 .worldpay.com   # for quietpc.com
3975 .jungle.com
3976 .scan.co.uk</pre>
3977             </td>
3978           </tr>
3979         </table>
3980         <p>The <tt class="LITERAL"><a href=
3981         "actions-file.html#FAST-REDIRECTS">fast-redirects</a></tt> action,
3982         which may have been enabled in <tt class=
3983         "FILENAME">match-all.action</tt>, breaks some sites. So disable it
3984         for popular sites where we know it misbehaves:</p>
3985         <table border="0" bgcolor="#E0E0E0" width="100%">
3986           <tr>
3987             <td>
3988               <pre class="SCREEN">{ -<a href=
3989               "actions-file.html#FAST-REDIRECTS">fast-redirects</a> }
3990 login.yahoo.com
3991 edit.*.yahoo.com
3992 .google.com
3993 .altavista.com/.*(like|url|link):http
3994 .altavista.com/trans.*urltext=http
3995 .nytimes.com</pre>
3996             </td>
3997           </tr>
3998         </table>
3999         <p>It is important that <span class="APPLICATION">Privoxy</span>
4000         knows which URLs belong to images, so that <span class=
4001         "emphasis"><i class="EMPHASIS">if</i></span> they are to be blocked,
4002         a substitute image can be sent, rather than an HTML page. Contacting
4003         the remote site to find out is not an option, since it would destroy
4004         the loading time advantage of banner blocking, and it would feed the
4005         advertisers information about you. We can mark any URL as an image
4006         with the <tt class="LITERAL"><a href=
4007         "actions-file.html#HANDLE-AS-IMAGE">handle-as-image</a></tt> action,
4008         and marking all URLs that end in a known image file extension is a
4009         good start:</p>
4010         <table border="0" bgcolor="#E0E0E0" width="100%">
4011           <tr>
4012             <td>
4013               <pre class="SCREEN">
4014               ##########################################################################
4015 # Images:
4016 ##########################################################################
4017
4018 # Define which file types will be treated as images, in case they get
4019 # blocked further down this file:
4020 #
4021 { +<a href="actions-file.html#HANDLE-AS-IMAGE">handle-as-image</a> }
4022 /.*\.(gif|jpe?g|png|bmp|ico)$</pre>
4023             </td>
4024           </tr>
4025         </table>
4026         <p>And then there are known banner sources. They often use scripts to
4027         generate the banners, so it won't be visible from the URL that the
4028         request is for an image. Hence we block them <span class=
4029         "emphasis"><i class="EMPHASIS">and</i></span> mark them as images in
4030         one go, with the help of our <tt class="LITERAL">+block-as-image</tt>
4031         alias defined above. (We could of course just as well use <tt class=
4032         "LITERAL">+<a href="actions-file.html#BLOCK">block</a> +<a href=
4033         "actions-file.html#HANDLE-AS-IMAGE">handle-as-image</a></tt> here.)
4034         Remember that the type of the replacement image is chosen by the
4035         <tt class="LITERAL"><a href=
4036         "actions-file.html#SET-IMAGE-BLOCKER">set-image-blocker</a></tt>
4037         action. Since all URLs have matched the default section with its
4038         <tt class="LITERAL">+<a href=
4039         "actions-file.html#SET-IMAGE-BLOCKER">set-image-blocker</a>{pattern}</tt>
4040         action before, it still applies and needn't be repeated:</p>
4041         <table border="0" bgcolor="#E0E0E0" width="100%">
4042           <tr>
4043             <td>
4044               <pre class="SCREEN"># Known ad generators:
4045 #
4046 { +block-as-image }
4047 ar.atwola.com
4048 .ad.doubleclick.net
4049 .ad.*.doubleclick.net
4050 .a.yimg.com/(?:(?!/i/).)*$
4051 .a[0-9].yimg.com/(?:(?!/i/).)*$
4052 bs*.gsanet.com
4053 .qkimg.net</pre>
4054             </td>
4055           </tr>
4056         </table>
4057         <p>One of the most important jobs of <span class=
4058         "APPLICATION">Privoxy</span> is to block banners. Many of these can
4059         be <span class="QUOTE">"blocked"</span> by the <tt class=
4060         "LITERAL"><a href=
4061         "actions-file.html#FILTER">filter</a>{banners-by-size}</tt> action,
4062         which we enabled above, and which deletes the references to banner
4063         images from the pages while they are loaded, so the browser doesn't
4064         request them anymore, and hence they don't need to be blocked here.
4065         But this naturally doesn't catch all banners, and some people choose
4066         not to use filters, so we need a comprehensive list of patterns for
4067         banner URLs here, and apply the <tt class="LITERAL"><a href=
4068         "actions-file.html#BLOCK">block</a></tt> action to them.</p>
4069         <p>First comes many generic patterns, which do most of the work, by
4070         matching typical domain and path name components of banners. Then
4071         comes a list of individual patterns for specific sites, which is
4072         omitted here to keep the example short:</p>
4073         <table border="0" bgcolor="#E0E0E0" width="100%">
4074           <tr>
4075             <td>
4076               <pre class="SCREEN">
4077               ##########################################################################
4078 # Block these fine banners:
4079 ##########################################################################
4080 { <a href="actions-file.html#BLOCK">+block{Banner ads.}</a> }
4081
4082 # Generic patterns:
4083 #
4084 ad*.
4085 .*ads.
4086 banner?.
4087 count*.
4088 /.*count(er)?\.(pl|cgi|exe|dll|asp|php[34]?)
4089 /(?:.*/)?(publicite|werbung|rekla(ma|me|am)|annonse|maino(kset|nta|s)?)/
4090
4091 # Site-specific patterns (abbreviated):
4092 #
4093 .hitbox.com</pre>
4094             </td>
4095           </tr>
4096         </table>
4097         <p>It's quite remarkable how many advertisers actually call their
4098         banner servers ads.<tt class="REPLACEABLE"><i>company</i></tt>.com,
4099         or call the directory in which the banners are stored literally
4100         <span class="QUOTE">"banners"</span>. So the above generic patterns
4101         are surprisingly effective.</p>
4102         <p>But being very generic, they necessarily also catch URLs that we
4103         don't want to block. The pattern <tt class="LITERAL">.*ads.</tt> e.g.
4104         catches <span class="QUOTE">"nasty-<span class="emphasis"><i class=
4105         "EMPHASIS">ads</i></span>.nasty-corp.com"</span> as intended, but
4106         also <span class="QUOTE">"downlo<span class="emphasis"><i class=
4107         "EMPHASIS">ads</i></span>.sourcefroge.net"</span> or <span class=
4108         "QUOTE">"<span class="emphasis"><i class=
4109         "EMPHASIS">ads</i></span>l.some-provider.net."</span> So here come
4110         some well-known exceptions to the <tt class="LITERAL">+<a href=
4111         "actions-file.html#BLOCK">block</a></tt> section above.</p>
4112         <p>Note that these are exceptions to exceptions from the default!
4113         Consider the URL <span class=
4114         "QUOTE">"downloads.sourcefroge.net"</span>: Initially, all actions
4115         are deactivated, so it wouldn't get blocked. Then comes the defaults
4116         section, which matches the URL, but just deactivates the <tt class=
4117         "LITERAL"><a href="actions-file.html#BLOCK">block</a></tt> action
4118         once again. Then it matches <tt class="LITERAL">.*ads.</tt>, an
4119         exception to the general non-blocking policy, and suddenly <tt class=
4120         "LITERAL"><a href="actions-file.html#BLOCK">+block</a></tt> applies.
4121         And now, it'll match <tt class="LITERAL">.*loads.</tt>, where
4122         <tt class="LITERAL"><a href="actions-file.html#BLOCK">-block</a></tt>
4123         applies, so (unless it matches <span class="emphasis"><i class=
4124         "EMPHASIS">again</i></span> further down) it ends up with no
4125         <tt class="LITERAL"><a href="actions-file.html#BLOCK">block</a></tt>
4126         action applying.</p>
4127         <table border="0" bgcolor="#E0E0E0" width="100%">
4128           <tr>
4129             <td>
4130               <pre class="SCREEN">
4131               ##########################################################################
4132 # Save some innocent victims of the above generic block patterns:
4133 ##########################################################################
4134
4135 # By domain:
4136 #
4137 { -<a href="actions-file.html#BLOCK">block</a> }
4138 adv[io]*.  # (for advogato.org and advice.*)
4139 adsl.      # (has nothing to do with ads)
4140 adobe.     # (has nothing to do with ads either)
4141 ad[ud]*.   # (adult.* and add.*)
4142 .edu       # (universities don't host banners (yet!))
4143 .*loads.   # (downloads, uploads etc)
4144
4145 # By path:
4146 #
4147 /.*loads/
4148
4149 # Site-specific:
4150 #
4151 www.globalintersec.com/adv # (adv = advanced)
4152 www.ugu.com/sui/ugu/adv</pre>
4153             </td>
4154           </tr>
4155         </table>
4156         <p>Filtering source code can have nasty side effects, so make an
4157         exception for our friends at sourceforge.net, and all paths with
4158         <span class="QUOTE">"cvs"</span> in them. Note that <tt class=
4159         "LITERAL">-<a href="actions-file.html#FILTER">filter</a></tt>
4160         disables <span class="emphasis"><i class="EMPHASIS">all</i></span>
4161         filters in one fell swoop!</p>
4162         <table border="0" bgcolor="#E0E0E0" width="100%">
4163           <tr>
4164             <td>
4165               <pre class="SCREEN"># Don't filter code!
4166 #
4167 { -<a href="actions-file.html#FILTER">filter</a> }
4168 /(.*/)?cvs
4169 bugzilla.
4170 developer.
4171 wiki.
4172 .sourceforge.net</pre>
4173             </td>
4174           </tr>
4175         </table>
4176         <p>The actual <tt class="FILENAME">default.action</tt> is of course
4177         much more comprehensive, but we hope this example made clear how it
4178         works.</p>
4179       </div>
4180       <div class="SECT3">
4181         <h3 class="SECT3"><a name="USER-ACTION" id="USER-ACTION">8.7.3.
4182         user.action</a></h3>
4183         <p>So far we are painting with a broad brush by setting general
4184         policies, which would be a reasonable starting point for many people.
4185         Now, you might want to be more specific and have customized rules
4186         that are more suitable to your personal habits and preferences. These
4187         would be for narrowly defined situations like your ISP or your bank,
4188         and should be placed in <tt class="FILENAME">user.action</tt>, which
4189         is parsed after all other actions files and hence has the last word,
4190         over-riding any previously defined actions. <tt class=
4191         "FILENAME">user.action</tt> is also a <span class=
4192         "emphasis"><i class="EMPHASIS">safe</i></span> place for your
4193         personal settings, since <tt class="FILENAME">default.action</tt> is
4194         actively maintained by the <span class="APPLICATION">Privoxy</span>
4195         developers and you'll probably want to install updated versions from
4196         time to time.</p>
4197         <p>So let's look at a few examples of things that one might typically
4198         do in <tt class="FILENAME">user.action</tt>:</p>
4199         <table border="0" bgcolor="#E0E0E0" width="100%">
4200           <tr>
4201             <td>
4202               <pre class="SCREEN">
4203               # My user.action file. &lt;fred@example.com&gt;</pre>
4204             </td>
4205           </tr>
4206         </table>
4207         <p>As <a href="actions-file.html#ALIASES">aliases</a> are local to
4208         the actions file that they are defined in, you can't use the ones
4209         from <tt class="FILENAME">default.action</tt>, unless you repeat them
4210         here:</p>
4211         <table border="0" bgcolor="#E0E0E0" width="100%">
4212           <tr>
4213             <td>
4214               <pre class="SCREEN">
4215               # Aliases are local to the file they are defined in.
4216 # (Re-)define aliases for this file:
4217 #
4218 {{alias}}
4219 #
4220 # These aliases just save typing later, and the alias names should
4221 # be self explanatory.
4222 #
4223 +crunch-all-cookies = +crunch-incoming-cookies +crunch-outgoing-cookies
4224 -crunch-all-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies
4225  allow-all-cookies  = -crunch-all-cookies -session-cookies-only
4226  allow-popups       = -filter{all-popups}
4227 +block-as-image     = +block{Blocked as image.} +handle-as-image
4228 -block-as-image     = -block
4229
4230 # These aliases define combinations of actions that are useful for
4231 # certain types of sites:
4232 #
4233 fragile     = -block -crunch-all-cookies -filter -fast-redirects -hide-referrer
4234 shop        = -crunch-all-cookies allow-popups
4235
4236 # Allow ads for selected useful free sites:
4237 #
4238 allow-ads   = -block -filter{banners-by-size} -filter{banners-by-link}
4239
4240 # Alias for specific file types that are text, but might have conflicting
4241 # MIME types. We want the browser to force these to be text documents.
4242 handle-as-text = -<a href="actions-file.html#FILTER">filter</a> +-<a href=
4243 "actions-file.html#CONTENT-TYPE-OVERWRITE">content-type-overwrite{text/plain}</a> +-<a href="actions-file.html#FORCE-TEXT-MODE">force-text-mode</a> -<a href="actions-file.html#HIDE-CONTENT-DISPOSITION">hide-content-disposition</a></pre>
4244             </td>
4245           </tr>
4246         </table>
4247         <p>Say you have accounts on some sites that you visit regularly, and
4248         you don't want to have to log in manually each time. So you'd like to
4249         allow persistent cookies for these sites. The <tt class=
4250         "LITERAL">allow-all-cookies</tt> alias defined above does exactly
4251         that, i.e. it disables crunching of cookies in any direction, and the
4252         processing of cookies to make them only temporary.</p>
4253         <table border="0" bgcolor="#E0E0E0" width="100%">
4254           <tr>
4255             <td>
4256               <pre class="SCREEN">{ allow-all-cookies }
4257  sourceforge.net
4258  .yahoo.com
4259  .msdn.microsoft.com
4260  .redhat.com</pre>
4261             </td>
4262           </tr>
4263         </table>
4264         <p>Your bank is allergic to some filter, but you don't know which, so
4265         you disable them all:</p>
4266         <table border="0" bgcolor="#E0E0E0" width="100%">
4267           <tr>
4268             <td>
4269               <pre class="SCREEN">{ -<a href=
4270               "actions-file.html#FILTER">filter</a> }
4271  .your-home-banking-site.com</pre>
4272             </td>
4273           </tr>
4274         </table>
4275         <p>Some file types you may not want to filter for various
4276         reasons:</p>
4277         <table border="0" bgcolor="#E0E0E0" width="100%">
4278           <tr>
4279             <td>
4280               <pre class="SCREEN">
4281               # Technical documentation is likely to contain strings that might
4282 # erroneously get altered by the JavaScript-oriented filters:
4283 #
4284 .tldp.org
4285 /(.*/)?selfhtml/
4286
4287 # And this stupid host sends streaming video with a wrong MIME type,
4288 # so that Privoxy thinks it is getting HTML and starts filtering:
4289 #
4290 stupid-server.example.com/</pre>
4291             </td>
4292           </tr>
4293         </table>
4294         <p>Example of a simple <a href="actions-file.html#BLOCK">block</a>
4295         action. Say you've seen an ad on your favourite page on example.com
4296         that you want to get rid of. You have right-clicked the image,
4297         selected <span class="QUOTE">"copy image location"</span> and pasted
4298         the URL below while removing the leading http://, into a <tt class=
4299         "LITERAL">{ +block{} }</tt> section. Note that <tt class="LITERAL">{
4300         +handle-as-image }</tt> need not be specified, since all URLs ending
4301         in <tt class="LITERAL">.gif</tt> will be tagged as images by the
4302         general rules as set in default.action anyway:</p>
4303         <table border="0" bgcolor="#E0E0E0" width="100%">
4304           <tr>
4305             <td>
4306               <pre class="SCREEN">{ +<a href=
4307               "actions-file.html#BLOCK">block</a>{Nasty ads.} }
4308  www.example.com/nasty-ads/sponsor\.gif
4309  another.example.net/more/junk/here/</pre>
4310             </td>
4311           </tr>
4312         </table>
4313         <p>The URLs of dynamically generated banners, especially from large
4314         banner farms, often don't use the well-known image file name
4315         extensions, which makes it impossible for <span class=
4316         "APPLICATION">Privoxy</span> to guess the file type just by looking
4317         at the URL. You can use the <tt class="LITERAL">+block-as-image</tt>
4318         alias defined above for these cases. Note that objects which match
4319         this rule but then turn out NOT to be an image are typically rendered
4320         as a <span class="QUOTE">"broken image"</span> icon by the browser.
4321         Use cautiously.</p>
4322         <table border="0" bgcolor="#E0E0E0" width="100%">
4323           <tr>
4324             <td>
4325               <pre class="SCREEN">{ +block-as-image }
4326  .doubleclick.net
4327  .fastclick.net
4328  /Realmedia/ads/
4329  ar.atwola.com/</pre>
4330             </td>
4331           </tr>
4332         </table>
4333         <p>Now you noticed that the default configuration breaks Forbes
4334         Magazine, but you were too lazy to find out which action is the
4335         culprit, and you were again too lazy to give <a href=
4336         "contact.html">feedback</a>, so you just used the <tt class=
4337         "LITERAL">fragile</tt> alias on the site, and -- <span class=
4338         "emphasis"><i class="EMPHASIS">whoa!</i></span> -- it worked. The
4339         <tt class="LITERAL">fragile</tt> aliases disables those actions that
4340         are most likely to break a site. Also, good for testing purposes to
4341         see if it is <span class="APPLICATION">Privoxy</span> that is causing
4342         the problem or not. We later find other regular sites that misbehave,
4343         and add those to our personalized list of troublemakers:</p>
4344         <table border="0" bgcolor="#E0E0E0" width="100%">
4345           <tr>
4346             <td>
4347               <pre class="SCREEN">{ fragile }
4348  .forbes.com
4349  webmail.example.com
4350  .mybank.com</pre>
4351             </td>
4352           </tr>
4353         </table>
4354         <p>You like the <span class="QUOTE">"fun"</span> text replacements in
4355         <tt class="FILENAME">default.filter</tt>, but it is disabled in the
4356         distributed actions file. So you'd like to turn it on in your
4357         private, update-safe config, once and for all:</p>
4358         <table border="0" bgcolor="#E0E0E0" width="100%">
4359           <tr>
4360             <td>
4361               <pre class="SCREEN">{ +<a href=
4362               "actions-file.html#FILTER-FUN">filter{fun}</a> }
4363  / # For ALL sites!</pre>
4364             </td>
4365           </tr>
4366         </table>
4367         <p>Note that the above is not really a good idea: There are
4368         exceptions to the filters in <tt class="FILENAME">default.action</tt>
4369         for things that really shouldn't be filtered, like code on
4370         CVS-&gt;Web interfaces. Since <tt class="FILENAME">user.action</tt>
4371         has the last word, these exceptions won't be valid for the
4372         <span class="QUOTE">"fun"</span> filtering specified here.</p>
4373         <p>You might also worry about how your favourite free websites are
4374         funded, and find that they rely on displaying banner advertisements
4375         to survive. So you might want to specifically allow banners for those
4376         sites that you feel provide value to you:</p>
4377         <table border="0" bgcolor="#E0E0E0" width="100%">
4378           <tr>
4379             <td>
4380               <pre class="SCREEN">{ allow-ads }
4381  .sourceforge.net
4382  .slashdot.org
4383  .osdn.net</pre>
4384             </td>
4385           </tr>
4386         </table>
4387         <p>Note that <tt class="LITERAL">allow-ads</tt> has been aliased to
4388         <tt class="LITERAL">-<a href=
4389         "actions-file.html#BLOCK">block</a></tt>, <tt class=
4390         "LITERAL">-<a href=
4391         "actions-file.html#FILTER-BANNERS-BY-SIZE">filter{banners-by-size}</a></tt>,
4392         and <tt class="LITERAL">-<a href=
4393         "actions-file.html#FILTER-BANNERS-BY-LINK">filter{banners-by-link}</a></tt>
4394         above.</p>
4395         <p>Invoke another alias here to force an over-ride of the MIME type
4396         <tt class="LITERAL">application/x-sh</tt> which typically would open
4397         a download type dialog. In my case, I want to look at the shell
4398         script, and then I can save it should I choose to.</p>
4399         <table border="0" bgcolor="#E0E0E0" width="100%">
4400           <tr>
4401             <td>
4402               <pre class="SCREEN">{ handle-as-text }
4403  /.*\.sh$</pre>
4404             </td>
4405           </tr>
4406         </table>
4407         <p><tt class="FILENAME">user.action</tt> is generally the best place
4408         to define exceptions and additions to the default policies of
4409         <tt class="FILENAME">default.action</tt>. Some actions are safe to
4410         have their default policies set here though. So let's set a default
4411         policy to have a <span class="QUOTE">"blank"</span> image as opposed
4412         to the checkerboard pattern for <span class="emphasis"><i class=
4413         "EMPHASIS">ALL</i></span> sites. <span class="QUOTE">"/"</span> of
4414         course matches all URL paths and patterns:</p>
4415         <table border="0" bgcolor="#E0E0E0" width="100%">
4416           <tr>
4417             <td>
4418               <pre class="SCREEN">{ +<a href=
4419               "actions-file.html#SET-IMAGE-BLOCKER">set-image-blocker{blank}</a> }
4420 / # ALL sites</pre>
4421             </td>
4422           </tr>
4423         </table>
4424       </div>
4425     </div>
4426   </div>
4427   <div class="NAVFOOTER">
4428     <hr align="left" width="100%">
4429     <table summary="Footer navigation table" width="100%" border="0"
4430     cellpadding="0" cellspacing="0">
4431       <tr>
4432         <td width="33%" align="left" valign="top"><a href="config.html"
4433         accesskey="P">Prev</a></td>
4434         <td width="34%" align="center" valign="top"><a href="index.html"
4435         accesskey="H">Home</a></td>
4436         <td width="33%" align="right" valign="top"><a href="filter-file.html"
4437         accesskey="N">Next</a></td>
4438       </tr>
4439       <tr>
4440         <td width="33%" align="left" valign="top">The Main Configuration
4441         File</td>
4442         <td width="34%" align="center" valign="top">&nbsp;</td>
4443         <td width="33%" align="right" valign="top">Filter Files</td>
4444       </tr>
4445     </table>
4446   </div>
4447 </body>
4448 </html>