Just regenerating to get fresh version in place of very dated versions.
[privoxy.git] / doc / webserver / user-manual / actions-file.html
1 <HTML
2 ><HEAD
3 ><TITLE
4 >Actions Files</TITLE
5 ><META
6 NAME="GENERATOR"
7 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
8 "><LINK
9 REL="HOME"
10 TITLE="Privoxy 3.1.1 User Manual"
11 HREF="index.html"><LINK
12 REL="PREVIOUS"
13 TITLE="The Main Configuration File"
14 HREF="config.html"><LINK
15 REL="NEXT"
16 TITLE="The Filter File"
17 HREF="filter-file.html"><LINK
18 REL="STYLESHEET"
19 TYPE="text/css"
20 HREF="../p_doc.css"></HEAD
21 ><BODY
22 CLASS="SECT1"
23 BGCOLOR="#EEEEEE"
24 TEXT="#000000"
25 LINK="#0000FF"
26 VLINK="#840084"
27 ALINK="#0000FF"
28 ><DIV
29 CLASS="NAVHEADER"
30 ><TABLE
31 SUMMARY="Header navigation table"
32 WIDTH="100%"
33 BORDER="0"
34 CELLPADDING="0"
35 CELLSPACING="0"
36 ><TR
37 ><TH
38 COLSPAN="3"
39 ALIGN="center"
40 >Privoxy 3.1.1 User Manual</TH
41 ></TR
42 ><TR
43 ><TD
44 WIDTH="10%"
45 ALIGN="left"
46 VALIGN="bottom"
47 ><A
48 HREF="config.html"
49 ACCESSKEY="P"
50 >Prev</A
51 ></TD
52 ><TD
53 WIDTH="80%"
54 ALIGN="center"
55 VALIGN="bottom"
56 ></TD
57 ><TD
58 WIDTH="10%"
59 ALIGN="right"
60 VALIGN="bottom"
61 ><A
62 HREF="filter-file.html"
63 ACCESSKEY="N"
64 >Next</A
65 ></TD
66 ></TR
67 ></TABLE
68 ><HR
69 ALIGN="LEFT"
70 WIDTH="100%"></DIV
71 ><DIV
72 CLASS="SECT1"
73 ><H1
74 CLASS="SECT1"
75 ><A
76 NAME="ACTIONS-FILE">8. Actions Files</H1
77 ><P
78 > The actions files are used to define what actions
79  <SPAN
80 CLASS="APPLICATION"
81 >Privoxy</SPAN
82 > takes for which URLs, and thus determine
83  how ad images, cookies and various other aspects of HTTP content and
84  transactions are handled, and on which sites (or even parts thereof). There 
85  are three such files included with <SPAN
86 CLASS="APPLICATION"
87 >Privoxy</SPAN
88 > (as of 
89  version 2.9.15), with differing purposes:
90  </P
91 ><P
92 >  <P
93 ></P
94 ><UL
95 ><LI
96 ><P
97 >     <TT
98 CLASS="FILENAME"
99 >default.action</TT
100 > - is the primary action file 
101      that sets the initial values for all actions. It is intended to 
102      provide a base level of functionality for
103      <SPAN
104 CLASS="APPLICATION"
105 >Privoxy's</SPAN
106 > array of features. So it is 
107      a set of broad rules that should work reasonably well for users everywhere.
108      This is the file that the developers are keeping updated, and <A
109 HREF="installation.html#INSTALLATION-KEEPUPDATED"
110 >making available to users</A
111 >.
112     </P
113 ></LI
114 ><LI
115 ><P
116 >     <TT
117 CLASS="FILENAME"
118 >user.action</TT
119 > - is intended to be for local site 
120      preferences and exceptions. As an example, if your ISP or your bank
121      has specific requirements, and need special handling, this kind of 
122      thing should go here. This file will not be upgraded.
123     </P
124 ></LI
125 ><LI
126 ><P
127 >     <TT
128 CLASS="FILENAME"
129 >standard.action</TT
130 > - is used by the web based editor, 
131      to set various pre-defined sets of rules for the default actions section
132      in <TT
133 CLASS="FILENAME"
134 >default.action</TT
135 >. These have increasing levels of
136      aggressiveness <SPAN
137 CLASS="emphasis"
138 ><I
139 CLASS="EMPHASIS"
140 >and have no influence on your browsing unless
141      you select them explicitly in the editor</I
142 ></SPAN
143 >. It is not recommend
144      to edit this file.
145     </P
146 ></LI
147 ></UL
148 >
149  </P
150 ><P
151 > The list of actions files to be used are defined in the main configuration 
152  file, and are processed in the order they are defined. The content of these
153  can all be viewed and edited from <A
154 HREF="http://config.privoxy.org/show-status"
155 TARGET="_top"
156 >http://config.privoxy.org/show-status</A
157 >.</P
158 ><P
159 > An actions file typically has multiple sections. If you want to use
160  <SPAN
161 CLASS="QUOTE"
162 >"aliases"</SPAN
163 > in an actions file, you have to place the (optional)
164  <A
165 HREF="actions-file.html#ALIASES"
166 >alias section</A
167 > at the top of that file.
168  Then comes the default set of rules which will apply universally to all
169  sites and pages (be <SPAN
170 CLASS="emphasis"
171 ><I
172 CLASS="EMPHASIS"
173 >very careful</I
174 ></SPAN
175 > with using such a
176  universal set in <TT
177 CLASS="FILENAME"
178 >user.action</TT
179 > or any other actions file after 
180  <TT
181 CLASS="FILENAME"
182 >default.action</TT
183 >, because it will override the result
184  from consulting any previous file). And then below that,
185  exceptions to the defined universal policies. You can regard
186  <TT
187 CLASS="FILENAME"
188 >user.action</TT
189 > as an appendix to <TT
190 CLASS="FILENAME"
191 >default.action</TT
192 >,
193  with the advantage that is a separate file, which makes preserving your
194  personal settings across <SPAN
195 CLASS="APPLICATION"
196 >Privoxy</SPAN
197 > upgrades easier.</P
198 ><P
199
200  Actions can be used to block anything you want, including ads, banners, or
201  just some obnoxious URL that you would rather not see. Cookies can be accepted
202  or rejected, or accepted only during the current browser session (i.e. not
203  written to disk), content can be modified, JavaScripts tamed, user-tracking
204  fooled, and much more. See below for a <A
205 HREF="actions-file.html#ACTIONS"
206 >complete list
207  of actions</A
208 >.</P
209 ><DIV
210 CLASS="SECT2"
211 ><H2
212 CLASS="SECT2"
213 ><A
214 NAME="AEN1645">8.1. Finding the Right Mix</H2
215 ><P
216 > Note that some <A
217 HREF="actions-file.html#ACTIONS"
218 >actions</A
219 >, like cookie suppression
220  or script disabling, may render some sites unusable that rely on these
221  techniques to work properly. Finding the right mix of actions is not always easy and
222  certainly a matter of personal taste. In general, it can be said that the more
223  <SPAN
224 CLASS="QUOTE"
225 >"aggressive"</SPAN
226 > your default settings (in the top section of the
227  actions file) are, the more exceptions for <SPAN
228 CLASS="QUOTE"
229 >"trusted"</SPAN
230 > sites you
231  will have to make later. If, for example, you want to kill popup windows per
232  default, you'll have to make exceptions from that rule for sites that you
233  regularly use and that require popups for actually useful content, like maybe
234  your bank, favorite shop, or newspaper.</P
235 ><P
236 > We have tried to provide you with reasonable rules to start from in the
237  distribution actions files. But there is no general rule of thumb on these
238  things. There just are too many variables, and sites are constantly changing.
239  Sooner or later you will want to change the rules (and read this chapter again :).</P
240 ></DIV
241 ><DIV
242 CLASS="SECT2"
243 ><H2
244 CLASS="SECT2"
245 ><A
246 NAME="AEN1652">8.2. How to Edit</H2
247 ><P
248 > The easiest way to edit the actions files is with a browser by
249  using our browser-based editor, which can be reached from <A
250 HREF="http://config.privoxy.org/show-status"
251 TARGET="_top"
252 >http://config.privoxy.org/show-status</A
253 >.
254  The editor allows both fine-grained control over every single feature on a
255  per-URL basis, and easy choosing from wholesale sets of defaults like
256  <SPAN
257 CLASS="QUOTE"
258 >"Cautious"</SPAN
259 >, <SPAN
260 CLASS="QUOTE"
261 >"Medium"</SPAN
262 > or <SPAN
263 CLASS="QUOTE"
264 >"Advanced"</SPAN
265 >.</P
266 ><P
267 > If you prefer plain text editing to GUIs, you can of course also directly edit the
268  the actions files. Look at <TT
269 CLASS="FILENAME"
270 >default.action</TT
271 > which is richly
272  commented.</P
273 ></DIV
274 ><DIV
275 CLASS="SECT2"
276 ><H2
277 CLASS="SECT2"
278 ><A
279 NAME="ACTIONS-APPLY">8.3. How Actions are Applied to URLs</H2
280 ><P
281 > Actions files are divided into sections. There are special sections,
282  like the <SPAN
283 CLASS="QUOTE"
284 >"<A
285 HREF="actions-file.html#ALIASES"
286 >alias</A
287 >"</SPAN
288 > sections which will
289  be discussed later. For now let's concentrate on regular sections: They have a
290  heading line (often split up to multiple lines for readability) which consist
291  of a list of actions, separated by whitespace and enclosed in curly braces.
292  Below that, there is a list of URL patterns, each on a separate line.</P
293 ><P
294 > To determine which actions apply to a request, the URL of the request is
295  compared to all patterns in each action file file. Every time it matches, the list of
296  applicable actions for the URL is incrementally updated, using the heading
297  of the section in which the pattern is located. If multiple matches for
298  the same URL set the same action differently, the last match wins. If not, 
299  the effects are aggregated. E.g. a URL might match a regular section with 
300  a heading line of <TT
301 CLASS="LITERAL"
302 >{ 
303  +<A
304 HREF="actions-file.html#HANDLE-AS-IMAGE"
305 >handle-as-image</A
306 > }</TT
307 >,
308  then later another one with just <TT
309 CLASS="LITERAL"
310 >{
311  +<A
312 HREF="actions-file.html#BLOCK"
313 >block</A
314 > }</TT
315 >, resulting
316  in <SPAN
317 CLASS="emphasis"
318 ><I
319 CLASS="EMPHASIS"
320 >both</I
321 ></SPAN
322 > actions to apply.</P
323 ><P
324 > You can trace this process for any given URL by visiting <A
325 HREF="http://config.privoxy.org/show-url-info"
326 TARGET="_top"
327 >http://config.privoxy.org/show-url-info</A
328 >.</P
329 ><P
330 > More detail on this is provided in the Appendix, <A
331 HREF="appendix.html#ACTIONSANAT"
332 > Anatomy of an Action</A
333 >.</P
334 ></DIV
335 ><DIV
336 CLASS="SECT2"
337 ><H2
338 CLASS="SECT2"
339 ><A
340 NAME="AF-PATTERNS">8.4. Patterns</H2
341 ><P
342 > Generally, a pattern has the form <TT
343 CLASS="LITERAL"
344 >&#60;domain&#62;/&#60;path&#62;</TT
345 >,
346  where both the <TT
347 CLASS="LITERAL"
348 >&#60;domain&#62;</TT
349 > and <TT
350 CLASS="LITERAL"
351 >&#60;path&#62;</TT
352 >
353  are optional. (This is why the pattern <TT
354 CLASS="LITERAL"
355 >/</TT
356 > matches all URLs).</P
357 ><P
358 ></P
359 ><DIV
360 CLASS="VARIABLELIST"
361 ><DL
362 ><DT
363 ><TT
364 CLASS="LITERAL"
365 >www.example.com/</TT
366 ></DT
367 ><DD
368 ><P
369 >    is a domain-only pattern and will match any request to <TT
370 CLASS="LITERAL"
371 >www.example.com</TT
372 >,
373     regardless of which document on that server is requested.
374    </P
375 ></DD
376 ><DT
377 ><TT
378 CLASS="LITERAL"
379 >www.example.com</TT
380 ></DT
381 ><DD
382 ><P
383 >    means exactly the same. For domain-only patterns, the trailing <TT
384 CLASS="LITERAL"
385 >/</TT
386 > may
387     be omitted.
388    </P
389 ></DD
390 ><DT
391 ><TT
392 CLASS="LITERAL"
393 >www.example.com/index.html</TT
394 ></DT
395 ><DD
396 ><P
397 >    matches only the single document <TT
398 CLASS="LITERAL"
399 >/index.html</TT
400 >
401     on <TT
402 CLASS="LITERAL"
403 >www.example.com</TT
404 >.
405    </P
406 ></DD
407 ><DT
408 ><TT
409 CLASS="LITERAL"
410 >/index.html</TT
411 ></DT
412 ><DD
413 ><P
414 >    matches the document <TT
415 CLASS="LITERAL"
416 >/index.html</TT
417 >, regardless of the domain,
418     i.e. on <SPAN
419 CLASS="emphasis"
420 ><I
421 CLASS="EMPHASIS"
422 >any</I
423 ></SPAN
424 > web server.
425    </P
426 ></DD
427 ><DT
428 ><TT
429 CLASS="LITERAL"
430 >index.html</TT
431 ></DT
432 ><DD
433 ><P
434 >    matches nothing, since it would be  interpreted as a domain name and
435     there is no top-level domain called <TT
436 CLASS="LITERAL"
437 >.html</TT
438 >.
439    </P
440 ></DD
441 ></DL
442 ></DIV
443 ><DIV
444 CLASS="SECT3"
445 ><H3
446 CLASS="SECT3"
447 ><A
448 NAME="AEN1716">8.4.1. The Domain Pattern</H3
449 ><P
450 > The matching of the domain part offers some flexible options: if the
451  domain starts or ends with a dot, it becomes unanchored at that end. 
452  For example:</P
453 ><P
454 ></P
455 ><DIV
456 CLASS="VARIABLELIST"
457 ><DL
458 ><DT
459 ><TT
460 CLASS="LITERAL"
461 >.example.com</TT
462 ></DT
463 ><DD
464 ><P
465 >    matches any domain that <SPAN
466 CLASS="emphasis"
467 ><I
468 CLASS="EMPHASIS"
469 >ENDS</I
470 ></SPAN
471 > in
472     <TT
473 CLASS="LITERAL"
474 >.example.com</TT
475 >
476    </P
477 ></DD
478 ><DT
479 ><TT
480 CLASS="LITERAL"
481 >www.</TT
482 ></DT
483 ><DD
484 ><P
485 >    matches any domain that <SPAN
486 CLASS="emphasis"
487 ><I
488 CLASS="EMPHASIS"
489 >STARTS</I
490 ></SPAN
491 > with
492     <TT
493 CLASS="LITERAL"
494 >www.</TT
495 >
496    </P
497 ></DD
498 ><DT
499 ><TT
500 CLASS="LITERAL"
501 >.example.</TT
502 ></DT
503 ><DD
504 ><P
505 >    matches any domain that <SPAN
506 CLASS="emphasis"
507 ><I
508 CLASS="EMPHASIS"
509 >CONTAINS</I
510 ></SPAN
511 > <TT
512 CLASS="LITERAL"
513 >.example.</TT
514 >
515     (Correctly speaking: It matches any FQDN that contains <TT
516 CLASS="LITERAL"
517 >example</TT
518 > as a domain.)
519    </P
520 ></DD
521 ></DL
522 ></DIV
523 ><P
524 > Additionally, there are wild-cards that you can use in the domain names
525  themselves. They work pretty similar to shell wild-cards: <SPAN
526 CLASS="QUOTE"
527 >"*"</SPAN
528 >
529  stands for zero or more arbitrary characters, <SPAN
530 CLASS="QUOTE"
531 >"?"</SPAN
532 > stands for
533  any single character, you can define character classes in square
534  brackets and all of that can be freely mixed:</P
535 ><P
536 ></P
537 ><DIV
538 CLASS="VARIABLELIST"
539 ><DL
540 ><DT
541 ><TT
542 CLASS="LITERAL"
543 >ad*.example.com</TT
544 ></DT
545 ><DD
546 ><P
547 >    matches <SPAN
548 CLASS="QUOTE"
549 >"adserver.example.com"</SPAN
550 >, 
551     <SPAN
552 CLASS="QUOTE"
553 >"ads.example.com"</SPAN
554 >, etc but not <SPAN
555 CLASS="QUOTE"
556 >"sfads.example.com"</SPAN
557 >
558    </P
559 ></DD
560 ><DT
561 ><TT
562 CLASS="LITERAL"
563 >*ad*.example.com</TT
564 ></DT
565 ><DD
566 ><P
567 >    matches all of the above, and then some.
568    </P
569 ></DD
570 ><DT
571 ><TT
572 CLASS="LITERAL"
573 >.?pix.com</TT
574 ></DT
575 ><DD
576 ><P
577 >    matches <TT
578 CLASS="LITERAL"
579 >www.ipix.com</TT
580 >,
581     <TT
582 CLASS="LITERAL"
583 >pictures.epix.com</TT
584 >, <TT
585 CLASS="LITERAL"
586 >a.b.c.d.e.upix.com</TT
587 > etc. 
588    </P
589 ></DD
590 ><DT
591 ><TT
592 CLASS="LITERAL"
593 >www[1-9a-ez].example.c*</TT
594 ></DT
595 ><DD
596 ><P
597 >     matches <TT
598 CLASS="LITERAL"
599 >www1.example.com</TT
600 >, 
601      <TT
602 CLASS="LITERAL"
603 >www4.example.cc</TT
604 >, <TT
605 CLASS="LITERAL"
606 >wwwd.example.cy</TT
607 >, 
608      <TT
609 CLASS="LITERAL"
610 >wwwz.example.com</TT
611 > etc., but <SPAN
612 CLASS="emphasis"
613 ><I
614 CLASS="EMPHASIS"
615 >not</I
616 ></SPAN
617
618      <TT
619 CLASS="LITERAL"
620 >wwww.example.com</TT
621 >.
622    </P
623 ></DD
624 ></DL
625 ></DIV
626 ></DIV
627 ><DIV
628 CLASS="SECT3"
629 ><H3
630 CLASS="SECT3"
631 ><A
632 NAME="AEN1778">8.4.2. The Path Pattern</H3
633 ><P
634 > <SPAN
635 CLASS="APPLICATION"
636 >Privoxy</SPAN
637 > uses Perl compatible regular expressions
638  (through the <A
639 HREF="http://www.pcre.org/"
640 TARGET="_top"
641 >PCRE</A
642 > library) for
643  matching the path.</P
644 ><P
645 > There is an <A
646 HREF="appendix.html#REGEX"
647 >Appendix</A
648 > with a brief quick-start into regular
649  expressions, and full (very technical) documentation on PCRE regex syntax is available on-line
650  at <A
651 HREF="http://www.pcre.org/man.txt"
652 TARGET="_top"
653 >http://www.pcre.org/man.txt</A
654 >.
655  You might also find the Perl man page on regular expressions (<TT
656 CLASS="LITERAL"
657 >man perlre</TT
658 >)
659  useful, which is available on-line at <A
660 HREF="http://www.perldoc.com/perl5.6/pod/perlre.html"
661 TARGET="_top"
662 >http://www.perldoc.com/perl5.6/pod/perlre.html</A
663 >.</P
664 ><P
665 > Note that the path pattern is automatically left-anchored at the <SPAN
666 CLASS="QUOTE"
667 >"/"</SPAN
668 >,
669  i.e. it matches as if it would start with a <SPAN
670 CLASS="QUOTE"
671 >"^"</SPAN
672 > (regular expression speak 
673  for the beginning of a line).</P
674 ><P
675 > Please also note that matching in the path is <SPAN
676 CLASS="emphasis"
677 ><I
678 CLASS="EMPHASIS"
679 >CASE INSENSITIVE</I
680 ></SPAN
681 >
682  by default, but you can switch to case sensitive at any point in the pattern by using the 
683  <SPAN
684 CLASS="QUOTE"
685 >"(?-i)"</SPAN
686 > switch: <TT
687 CLASS="LITERAL"
688 >www.example.com/(?-i)PaTtErN.*</TT
689 > will match
690  only documents whose path starts with <TT
691 CLASS="LITERAL"
692 >PaTtErN</TT
693 > in
694  <SPAN
695 CLASS="emphasis"
696 ><I
697 CLASS="EMPHASIS"
698 >exactly</I
699 ></SPAN
700 > this capitalization.</P
701 ></DIV
702 ></DIV
703 ><DIV
704 CLASS="SECT2"
705 ><H2
706 CLASS="SECT2"
707 ><A
708 NAME="ACTIONS">8.5. Actions</H2
709 ><P
710 > All actions are disabled by default, until they are explicitly enabled
711  somewhere in an actions file. Actions are turned on if preceded with a
712  <SPAN
713 CLASS="QUOTE"
714 >"+"</SPAN
715 >, and turned off if preceded with a <SPAN
716 CLASS="QUOTE"
717 >"-"</SPAN
718 >. So a
719  <TT
720 CLASS="LITERAL"
721 >+action</TT
722 > means <SPAN
723 CLASS="QUOTE"
724 >"do that action"</SPAN
725 >, e.g.
726  <TT
727 CLASS="LITERAL"
728 >+block</TT
729 > means <SPAN
730 CLASS="QUOTE"
731 >"please block URLs that match the
732  following patterns"</SPAN
733 >, and <TT
734 CLASS="LITERAL"
735 >-block</TT
736 > means <SPAN
737 CLASS="QUOTE"
738 >"don't
739  block URLs that match the following patterns, even if <TT
740 CLASS="LITERAL"
741 >+block</TT
742 >
743  previously applied."</SPAN
744 >&#13;</P
745 ><P
746
747  Again, actions are invoked by placing them on a line, enclosed in curly braces and
748  separated by whitespace, like in 
749  <TT
750 CLASS="LITERAL"
751 >{+some-action -some-other-action{some-parameter}}</TT
752 >,
753  followed by a list of URL patterns, one per line, to which they apply.
754  Together, the actions line and the following pattern lines make up a section
755  of the actions file. </P
756 ><P
757
758  There are three classes of actions:</P
759 ><P
760 > <P
761 ></P
762 ><UL
763 ><LI
764 ><P
765 >  
766    Boolean, i.e the action can only be <SPAN
767 CLASS="QUOTE"
768 >"enabled"</SPAN
769 > or
770    <SPAN
771 CLASS="QUOTE"
772 >"disabled"</SPAN
773 >. Syntax:
774   </P
775 ><P
776 >   <TABLE
777 BORDER="0"
778 BGCOLOR="#E0E0E0"
779 WIDTH="90%"
780 ><TR
781 ><TD
782 ><PRE
783 CLASS="SCREEN"
784 >  +<TT
785 CLASS="REPLACEABLE"
786 ><I
787 >name</I
788 ></TT
789 >        # enable action <TT
790 CLASS="REPLACEABLE"
791 ><I
792 >name</I
793 ></TT
794 >
795   -<TT
796 CLASS="REPLACEABLE"
797 ><I
798 >name</I
799 ></TT
800 >        # disable action <TT
801 CLASS="REPLACEABLE"
802 ><I
803 >name</I
804 ></TT
805 ></PRE
806 ></TD
807 ></TR
808 ></TABLE
809 >
810   </P
811 ><P
812 >  
813    Example: <TT
814 CLASS="LITERAL"
815 >+block</TT
816 >
817   </P
818 ></LI
819 ><LI
820 ><P
821 >  
822    Parameterized, where some value is required in order to enable this type of action.
823    Syntax:
824   </P
825 ><P
826 >   <TABLE
827 BORDER="0"
828 BGCOLOR="#E0E0E0"
829 WIDTH="90%"
830 ><TR
831 ><TD
832 ><PRE
833 CLASS="SCREEN"
834 >  +<TT
835 CLASS="REPLACEABLE"
836 ><I
837 >name</I
838 ></TT
839 >{<TT
840 CLASS="REPLACEABLE"
841 ><I
842 >param</I
843 ></TT
844 >}  # enable action and set parameter to <TT
845 CLASS="REPLACEABLE"
846 ><I
847 >param</I
848 ></TT
849 >,
850                # overwriting parameter from previous match if necessary
851   -<TT
852 CLASS="REPLACEABLE"
853 ><I
854 >name</I
855 ></TT
856 >         # disable action. The parameter can be omitted</PRE
857 ></TD
858 ></TR
859 ></TABLE
860 >
861   </P
862 ><P
863 >   Note that if the URL matches multiple positive forms of a parameterized action,
864    the last match wins, i.e. the params from earlier matches are simply ignored.
865   </P
866 ><P
867 >  
868    Example: <TT
869 CLASS="LITERAL"
870 >+hide-user-agent{ Mozilla 1.0 }</TT
871 >
872   </P
873 ></LI
874 ><LI
875 ><P
876 >  
877    Multi-value. These look exactly like parameterized actions,
878    but they behave differently: If the action applies multiple times to the
879    same URL, but with different parameters, <SPAN
880 CLASS="emphasis"
881 ><I
882 CLASS="EMPHASIS"
883 >all</I
884 ></SPAN
885 > the parameters
886    from <SPAN
887 CLASS="emphasis"
888 ><I
889 CLASS="EMPHASIS"
890 >all</I
891 ></SPAN
892 > matches are remembered. This is used for actions
893    that can be executed for the same request repeatedly, like adding multiple
894    headers, or filtering through multiple filters. Syntax:
895   </P
896 ><P
897 >   <TABLE
898 BORDER="0"
899 BGCOLOR="#E0E0E0"
900 WIDTH="90%"
901 ><TR
902 ><TD
903 ><PRE
904 CLASS="SCREEN"
905 >  +<TT
906 CLASS="REPLACEABLE"
907 ><I
908 >name</I
909 ></TT
910 >{<TT
911 CLASS="REPLACEABLE"
912 ><I
913 >param</I
914 ></TT
915 >}   # enable action and add <TT
916 CLASS="REPLACEABLE"
917 ><I
918 >param</I
919 ></TT
920 > to the list of parameters
921   -<TT
922 CLASS="REPLACEABLE"
923 ><I
924 >name</I
925 ></TT
926 >{<TT
927 CLASS="REPLACEABLE"
928 ><I
929 >param</I
930 ></TT
931 >}   # remove the parameter <TT
932 CLASS="REPLACEABLE"
933 ><I
934 >param</I
935 ></TT
936 > from the list of parameters
937                 # If it was the last one left, disable the action.
938   <TT
939 CLASS="REPLACEABLE"
940 ><I
941 >-name</I
942 ></TT
943 >          # disable this action completely and remove all parameters from the list</PRE
944 ></TD
945 ></TR
946 ></TABLE
947 >
948   </P
949 ><P
950 >  
951    Examples: <TT
952 CLASS="LITERAL"
953 >+add-header{X-Fun-Header: Some text}</TT
954 > and
955    <TT
956 CLASS="LITERAL"
957 >+filter{html-annoyances}</TT
958 >
959   </P
960 ></LI
961 ></UL
962 ></P
963 ><P
964 > If nothing is specified in any actions file, no <SPAN
965 CLASS="QUOTE"
966 >"actions"</SPAN
967 > are
968  taken. So in this case <SPAN
969 CLASS="APPLICATION"
970 >Privoxy</SPAN
971 > would just be a
972  normal, non-blocking, non-anonymizing proxy. You must specifically enable the
973  privacy and blocking features you need (although the provided default actions
974  files will give a good starting point).</P
975 ><P
976 > Later defined actions always over-ride earlier ones.  So exceptions 
977  to any rules you make, should come in the latter part of the file (or 
978  in a file that is processed later when using multiple actions files). For
979  multi-valued actions, the actions are applied in the order they are specified.
980  Actions files are processed in the order they are defined in
981  <TT
982 CLASS="FILENAME"
983 >config</TT
984 > (the default installation has three actions
985  files). It also quite possible for any given URL pattern to match more than
986  one pattern and thus more than one set of actions!</P
987 ><P
988 > The list of valid <SPAN
989 CLASS="APPLICATION"
990 >Privoxy</SPAN
991 > actions are:</P
992 ><DIV
993 CLASS="SECT3"
994 ><H4
995 CLASS="SECT3"
996 ><A
997 NAME="ADD-HEADER">8.5.1. add-header</H4
998 ><P
999 ></P
1000 ><DIV
1001 CLASS="VARIABLELIST"
1002 ><DL
1003 ><DT
1004 >Typical use:</DT
1005 ><DD
1006 ><P
1007 >Confuse log analysis, custom applications</P
1008 ></DD
1009 ><DT
1010 >Effect:</DT
1011 ><DD
1012 ><P
1013 >    Sends a user defined HTTP header to the web server.
1014    </P
1015 ></DD
1016 ><DT
1017 >Type:</DT
1018 ><DD
1019 ><P
1020 >Multi-value.</P
1021 ></DD
1022 ><DT
1023 >Parameter:</DT
1024 ><DD
1025 ><P
1026 >    Any string value is possible. Validity of the defined HTTP headers is not checked.
1027     It is recommended that you use the <SPAN
1028 CLASS="QUOTE"
1029 >"<TT
1030 CLASS="LITERAL"
1031 >X-</TT
1032 >"</SPAN
1033 > prefix
1034     for custom headers.
1035    </P
1036 ></DD
1037 ><DT
1038 >Notes:</DT
1039 ><DD
1040 ><P
1041 >    This action may be specified multiple times, in order to define multiple 
1042     headers. This is rarely needed for the typical user. If you don't know what 
1043     <SPAN
1044 CLASS="QUOTE"
1045 >"HTTP headers"</SPAN
1046 > are, you definitely don't need to worry about this 
1047     one.
1048    </P
1049 ></DD
1050 ><DT
1051 >Example usage:</DT
1052 ><DD
1053 ><P
1054 >     <TABLE
1055 BORDER="0"
1056 BGCOLOR="#E0E0E0"
1057 WIDTH="90%"
1058 ><TR
1059 ><TD
1060 ><PRE
1061 CLASS="SCREEN"
1062 >+add-header{X-User-Tracking: sucks}</PRE
1063 ></TD
1064 ></TR
1065 ></TABLE
1066 >
1067    </P
1068 ></DD
1069 ></DL
1070 ></DIV
1071 ></DIV
1072 ><DIV
1073 CLASS="SECT3"
1074 ><H4
1075 CLASS="SECT3"
1076 ><A
1077 NAME="BLOCK">8.5.2. block</H4
1078 ><P
1079 ></P
1080 ><DIV
1081 CLASS="VARIABLELIST"
1082 ><DL
1083 ><DT
1084 >Typical use:</DT
1085 ><DD
1086 ><P
1087 >Block ads or other obnoxious content</P
1088 ></DD
1089 ><DT
1090 >Effect:</DT
1091 ><DD
1092 ><P
1093 >    Requests for URLs to which this action applies are blocked, i.e. the requests are not
1094     forwarded to the remote server, but answered locally with a substitute page or image,
1095     as determined by the <TT
1096 CLASS="LITERAL"
1097 ><A
1098 HREF="actions-file.html#HANDLE-AS-IMAGE"
1099 >handle-as-image</A
1100 ></TT
1101 >
1102     and <TT
1103 CLASS="LITERAL"
1104 ><A
1105 HREF="actions-file.html#SET-IMAGE-BLOCKER"
1106 >set-image-blocker</A
1107 ></TT
1108 > actions.
1109    </P
1110 ></DD
1111 ><DT
1112 >Type:</DT
1113 ><DD
1114 ><P
1115 >Boolean.</P
1116 ></DD
1117 ><DT
1118 >Parameter:</DT
1119 ><DD
1120 ><P
1121 >N/A</P
1122 ></DD
1123 ><DT
1124 >Notes:</DT
1125 ><DD
1126 ><P
1127 >    <SPAN
1128 CLASS="APPLICATION"
1129 >Privoxy</SPAN
1130 > sends a special <SPAN
1131 CLASS="QUOTE"
1132 >"BLOCKED"</SPAN
1133 > page
1134     for requests to blocked pages. This page contains links to find out why the request
1135     was blocked, and a click-through to the blocked content (the latter only if compiled with the
1136     force feature enabled). The <SPAN
1137 CLASS="QUOTE"
1138 >"BLOCKED"</SPAN
1139 > page adapts to the available
1140     screen space -- it displays full-blown if space allows, or miniaturized and text-only
1141     if loaded into a small frame or window. If you are using <SPAN
1142 CLASS="APPLICATION"
1143 >Privoxy</SPAN
1144 >
1145     right now, you can take a look at the 
1146     <A
1147 HREF="http://ads.bannerserver.example.com/nasty-ads/sponsor.html"
1148 TARGET="_top"
1149 ><SPAN
1150 CLASS="QUOTE"
1151 >"BLOCKED"</SPAN
1152 >
1153     page</A
1154 >.
1155    </P
1156 ><P
1157
1158     A very important exception occurs if <SPAN
1159 CLASS="emphasis"
1160 ><I
1161 CLASS="EMPHASIS"
1162 >both</I
1163 ></SPAN
1164
1165     <TT
1166 CLASS="LITERAL"
1167 >block</TT
1168 > and <TT
1169 CLASS="LITERAL"
1170 ><A
1171 HREF="actions-file.html#HANDLE-AS-IMAGE"
1172 >handle-as-image</A
1173 ></TT
1174 >,
1175     apply to the same request: it will then be replaced by an image. If 
1176     <TT
1177 CLASS="LITERAL"
1178 ><A
1179 HREF="actions-file.html#SET-IMAGE-BLOCKER"
1180 >set-image-blocker</A
1181 ></TT
1182 >
1183     (see below) also applies, the type of image will be determined by its parameter,
1184     if not, the standard checkerboard pattern is sent.
1185    </P
1186 ><P
1187 >    It is important to understand this process, in order 
1188     to understand how <SPAN
1189 CLASS="APPLICATION"
1190 >Privoxy</SPAN
1191 > deals with 
1192     ads and other unwanted content.
1193    </P
1194 ><P
1195 >    The <TT
1196 CLASS="LITERAL"
1197 ><A
1198 HREF="actions-file.html#FILTER"
1199 >filter</A
1200 ></TT
1201 >
1202     action can perform a very similar task, by <SPAN
1203 CLASS="QUOTE"
1204 >"blocking"</SPAN
1205 >
1206     banner images and other content through rewriting the relevant URLs in the
1207     document's HTML source, so they don't get requested in the first place.
1208     Note that this is a totally different technique, and it's easy to confuse the two.
1209    </P
1210 ></DD
1211 ><DT
1212 >Example usage (section):</DT
1213 ><DD
1214 ><P
1215 >     <TABLE
1216 BORDER="0"
1217 BGCOLOR="#E0E0E0"
1218 WIDTH="90%"
1219 ><TR
1220 ><TD
1221 ><PRE
1222 CLASS="SCREEN"
1223 >{+block}      # Block and replace with "blocked" page
1224 .nasty-stuff.example.com
1225
1226 {+block +handle-as-image} # Block and replace with image
1227 .ad.doubleclick.net
1228 .ads.r.us</PRE
1229 ></TD
1230 ></TR
1231 ></TABLE
1232 >
1233     </P
1234 ></DD
1235 ></DL
1236 ></DIV
1237 ></DIV
1238 ><DIV
1239 CLASS="SECT3"
1240 ><H4
1241 CLASS="SECT3"
1242 ><A
1243 NAME="CRUNCH-INCOMING-COOKIES">8.5.3. crunch-incoming-cookies</H4
1244 ><P
1245 ></P
1246 ><DIV
1247 CLASS="VARIABLELIST"
1248 ><DL
1249 ><DT
1250 >Typical use:</DT
1251 ><DD
1252 ><P
1253 >    Prevent the web server from setting any cookies on your system
1254    </P
1255 ></DD
1256 ><DT
1257 >Effect:</DT
1258 ><DD
1259 ><P
1260 >    Deletes any <SPAN
1261 CLASS="QUOTE"
1262 >"Set-Cookie:"</SPAN
1263 > HTTP headers from server replies.
1264    </P
1265 ></DD
1266 ><DT
1267 >Type:</DT
1268 ><DD
1269 ><P
1270 >Boolean.</P
1271 ></DD
1272 ><DT
1273 >Parameter:</DT
1274 ><DD
1275 ><P
1276 >    N/A
1277    </P
1278 ></DD
1279 ><DT
1280 >Notes:</DT
1281 ><DD
1282 ><P
1283 >    This action is only concerned with <SPAN
1284 CLASS="emphasis"
1285 ><I
1286 CLASS="EMPHASIS"
1287 >incoming</I
1288 ></SPAN
1289 > cookies. For
1290     <SPAN
1291 CLASS="emphasis"
1292 ><I
1293 CLASS="EMPHASIS"
1294 >outgoing</I
1295 ></SPAN
1296 > cookies, use
1297     <TT
1298 CLASS="LITERAL"
1299 ><A
1300 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
1301 >crunch-outgoing-cookies</A
1302 ></TT
1303 >.
1304     Use <SPAN
1305 CLASS="emphasis"
1306 ><I
1307 CLASS="EMPHASIS"
1308 >both</I
1309 ></SPAN
1310 > to disable cookies completely.
1311    </P
1312 ><P
1313 >    It makes <SPAN
1314 CLASS="emphasis"
1315 ><I
1316 CLASS="EMPHASIS"
1317 >no sense at all</I
1318 ></SPAN
1319 > to use this action in conjunction
1320     with the <TT
1321 CLASS="LITERAL"
1322 ><A
1323 HREF="actions-file.html#SESSION-COOKIES-ONLY"
1324 >session-cookies-only</A
1325 ></TT
1326 > action,
1327     since it would prevent the session cookies from being set.
1328    </P
1329 ></DD
1330 ><DT
1331 >Example usage:</DT
1332 ><DD
1333 ><P
1334 >    <TABLE
1335 BORDER="0"
1336 BGCOLOR="#E0E0E0"
1337 WIDTH="90%"
1338 ><TR
1339 ><TD
1340 ><PRE
1341 CLASS="SCREEN"
1342 >+crunch-incoming-cookies</PRE
1343 ></TD
1344 ></TR
1345 ></TABLE
1346 >
1347    </P
1348 ></DD
1349 ></DL
1350 ></DIV
1351 ></DIV
1352 ><DIV
1353 CLASS="SECT3"
1354 ><H4
1355 CLASS="SECT3"
1356 ><A
1357 NAME="CRUNCH-OUTGOING-COOKIES">8.5.4. crunch-outgoing-cookies</H4
1358 ><P
1359 ></P
1360 ><DIV
1361 CLASS="VARIABLELIST"
1362 ><DL
1363 ><DT
1364 >Typical use:</DT
1365 ><DD
1366 ><P
1367 >    Prevent the web server from reading any cookies from your system
1368    </P
1369 ></DD
1370 ><DT
1371 >Effect:</DT
1372 ><DD
1373 ><P
1374 >    Deletes any <SPAN
1375 CLASS="QUOTE"
1376 >"Cookie:"</SPAN
1377 > HTTP headers from client requests.
1378    </P
1379 ></DD
1380 ><DT
1381 >Type:</DT
1382 ><DD
1383 ><P
1384 >Boolean.</P
1385 ></DD
1386 ><DT
1387 >Parameter:</DT
1388 ><DD
1389 ><P
1390 >    N/A
1391    </P
1392 ></DD
1393 ><DT
1394 >Notes:</DT
1395 ><DD
1396 ><P
1397 >    This action is only concerned with <SPAN
1398 CLASS="emphasis"
1399 ><I
1400 CLASS="EMPHASIS"
1401 >outgoing</I
1402 ></SPAN
1403 > cookies. For
1404     <SPAN
1405 CLASS="emphasis"
1406 ><I
1407 CLASS="EMPHASIS"
1408 >incoming</I
1409 ></SPAN
1410 > cookies, use
1411     <TT
1412 CLASS="LITERAL"
1413 ><A
1414 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
1415 >crunch-incoming-cookies</A
1416 ></TT
1417 >.
1418     Use <SPAN
1419 CLASS="emphasis"
1420 ><I
1421 CLASS="EMPHASIS"
1422 >both</I
1423 ></SPAN
1424 > to disable cookies completely.
1425    </P
1426 ><P
1427 >    It makes <SPAN
1428 CLASS="emphasis"
1429 ><I
1430 CLASS="EMPHASIS"
1431 >no sense at all</I
1432 ></SPAN
1433 > to use this action in conjunction
1434     with the <TT
1435 CLASS="LITERAL"
1436 ><A
1437 HREF="actions-file.html#SESSION-COOKIES-ONLY"
1438 >session-cookies-only</A
1439 ></TT
1440 > action,
1441     since it would prevent the session cookies from being read.
1442    </P
1443 ></DD
1444 ><DT
1445 >Example usage:</DT
1446 ><DD
1447 ><P
1448 >    <TABLE
1449 BORDER="0"
1450 BGCOLOR="#E0E0E0"
1451 WIDTH="90%"
1452 ><TR
1453 ><TD
1454 ><PRE
1455 CLASS="SCREEN"
1456 >+crunch-outgoing-cookies</PRE
1457 ></TD
1458 ></TR
1459 ></TABLE
1460 >
1461    </P
1462 ></DD
1463 ></DL
1464 ></DIV
1465 ></DIV
1466 ><DIV
1467 CLASS="SECT3"
1468 ><H4
1469 CLASS="SECT3"
1470 ><A
1471 NAME="DEANIMATE-GIFS">8.5.5. deanimate-gifs</H4
1472 ><P
1473 ></P
1474 ><DIV
1475 CLASS="VARIABLELIST"
1476 ><DL
1477 ><DT
1478 >Typical use:</DT
1479 ><DD
1480 ><P
1481 >Stop those annoying, distracting animated GIF images.</P
1482 ></DD
1483 ><DT
1484 >Effect:</DT
1485 ><DD
1486 ><P
1487 >    De-animate GIF animations, i.e. reduce them to their first or last image.
1488    </P
1489 ></DD
1490 ><DT
1491 >Type:</DT
1492 ><DD
1493 ><P
1494 >Parameterized.</P
1495 ></DD
1496 ><DT
1497 >Parameter:</DT
1498 ><DD
1499 ><P
1500 >    <SPAN
1501 CLASS="QUOTE"
1502 >"last"</SPAN
1503 > or <SPAN
1504 CLASS="QUOTE"
1505 >"first"</SPAN
1506 >
1507    </P
1508 ></DD
1509 ><DT
1510 >Notes:</DT
1511 ><DD
1512 ><P
1513 >    This will also shrink the images considerably (in bytes, not pixels!). If
1514     the option <SPAN
1515 CLASS="QUOTE"
1516 >"first"</SPAN
1517 > is given, the first frame of the animation
1518     is used as the replacement. If <SPAN
1519 CLASS="QUOTE"
1520 >"last"</SPAN
1521 > is given, the last
1522     frame of the animation is used instead, which probably makes more sense for
1523     most banner animations, but also has the risk of not showing the entire
1524     last frame (if it is only a delta to an earlier frame).
1525    </P
1526 ><P
1527 >    You can safely use this action with patterns that will also match non-GIF
1528     objects, because no attempt will be made at anything that doesn't look like
1529     a GIF.
1530    </P
1531 ></DD
1532 ><DT
1533 >Example usage:</DT
1534 ><DD
1535 ><P
1536 >      <TABLE
1537 BORDER="0"
1538 BGCOLOR="#E0E0E0"
1539 WIDTH="90%"
1540 ><TR
1541 ><TD
1542 ><PRE
1543 CLASS="SCREEN"
1544 >+deanimate-gifs{last}</PRE
1545 ></TD
1546 ></TR
1547 ></TABLE
1548 >
1549     </P
1550 ></DD
1551 ></DL
1552 ></DIV
1553 ></DIV
1554 ><DIV
1555 CLASS="SECT3"
1556 ><H4
1557 CLASS="SECT3"
1558 ><A
1559 NAME="DOWNGRADE-HTTP-VERSION">8.5.6. downgrade-http-version</H4
1560 ><P
1561 ></P
1562 ><DIV
1563 CLASS="VARIABLELIST"
1564 ><DL
1565 ><DT
1566 >Typical use:</DT
1567 ><DD
1568 ><P
1569 >Work around (very rare) problems with HTTP/1.1</P
1570 ></DD
1571 ><DT
1572 >Effect:</DT
1573 ><DD
1574 ><P
1575 >    Downgrades HTTP/1.1 client requests and server replies to HTTP/1.0.
1576    </P
1577 ></DD
1578 ><DT
1579 >Type:</DT
1580 ><DD
1581 ><P
1582 >Boolean.</P
1583 ></DD
1584 ><DT
1585 >Parameter:</DT
1586 ><DD
1587 ><P
1588 >    N/A
1589    </P
1590 ></DD
1591 ><DT
1592 >Notes:</DT
1593 ><DD
1594 ><P
1595 >    This is a left-over from the time when <SPAN
1596 CLASS="APPLICATION"
1597 >Privoxy</SPAN
1598 >
1599     didn't support important HTTP/1.1 features well. It is left here for the
1600     unlikely case that you experience HTTP/1.1 related problems with some server
1601     out there. Not all (optional) HTTP/1.1 features are supported yet, so there
1602     is a chance you might need this action.
1603    </P
1604 ></DD
1605 ><DT
1606 >Example usage (section):</DT
1607 ><DD
1608 ><P
1609 >     <TABLE
1610 BORDER="0"
1611 BGCOLOR="#E0E0E0"
1612 WIDTH="90%"
1613 ><TR
1614 ><TD
1615 ><PRE
1616 CLASS="SCREEN"
1617 >{+downgrade-http-version}
1618 problem-host.example.com</PRE
1619 ></TD
1620 ></TR
1621 ></TABLE
1622 >
1623     </P
1624 ></DD
1625 ></DL
1626 ></DIV
1627 ></DIV
1628 ><DIV
1629 CLASS="SECT3"
1630 ><H4
1631 CLASS="SECT3"
1632 ><A
1633 NAME="FAST-REDIRECTS">8.5.7. fast-redirects</H4
1634 ><P
1635 ></P
1636 ><DIV
1637 CLASS="VARIABLELIST"
1638 ><DL
1639 ><DT
1640 >Typical use:</DT
1641 ><DD
1642 ><P
1643 >Fool some click-tracking scripts and speed up indirect links</P
1644 ></DD
1645 ><DT
1646 >Effect:</DT
1647 ><DD
1648 ><P
1649 >    Cut off all but the last valid URL from requests.
1650    </P
1651 ></DD
1652 ><DT
1653 >Type:</DT
1654 ><DD
1655 ><P
1656 >Boolean.</P
1657 ></DD
1658 ><DT
1659 >Parameter:</DT
1660 ><DD
1661 ><P
1662 >    N/A
1663    </P
1664 ></DD
1665 ><DT
1666 >Notes:</DT
1667 ><DD
1668 ><P
1669 >  
1670     Many sites, like yahoo.com, don't just link to other sites. Instead, they
1671     will link to some script on their own servers, giving the destination as a
1672     parameter, which will then redirect you to the final target. URLs
1673     resulting from this scheme typically look like:
1674     <SPAN
1675 CLASS="emphasis"
1676 ><I
1677 CLASS="EMPHASIS"
1678 >http://some.place/click-tracker.cgi?target=http://some.where.else</I
1679 ></SPAN
1680 >.
1681   </P
1682 ><P
1683 >    Sometimes, there are even multiple consecutive redirects encoded in the
1684     URL. These redirections via scripts make your web browsing more traceable,
1685     since the server from which you follow such a link can see where you go
1686     to. Apart from that, valuable bandwidth and time is wasted, while your
1687     browser ask the server for one redirect after the other. Plus, it feeds
1688     the advertisers.
1689    </P
1690 ><P
1691 >    This feature is currently not very smart and is scheduled for improvement.
1692     It is likely to break some sites. You should expect to need possibly 
1693     many exceptions to this action, if it is enabled by default in
1694     <TT
1695 CLASS="FILENAME"
1696 >default.action</TT
1697 >. Some sites just don't work without 
1698     it.
1699    </P
1700 ></DD
1701 ><DT
1702 >Example usage:</DT
1703 ><DD
1704 ><P
1705 >     <TABLE
1706 BORDER="0"
1707 BGCOLOR="#E0E0E0"
1708 WIDTH="90%"
1709 ><TR
1710 ><TD
1711 ><PRE
1712 CLASS="SCREEN"
1713 >{+fast-redirects}</PRE
1714 ></TD
1715 ></TR
1716 ></TABLE
1717 >
1718     </P
1719 ></DD
1720 ></DL
1721 ></DIV
1722 ></DIV
1723 ><DIV
1724 CLASS="SECT3"
1725 ><H4
1726 CLASS="SECT3"
1727 ><A
1728 NAME="FILTER">8.5.8. filter</H4
1729 ><P
1730 ></P
1731 ><DIV
1732 CLASS="VARIABLELIST"
1733 ><DL
1734 ><DT
1735 >Typical use:</DT
1736 ><DD
1737 ><P
1738 >Get rid of HTML and JavaScript annoyances, banner advertisements (by size), do fun text replacements, etc.</P
1739 ></DD
1740 ><DT
1741 >Effect:</DT
1742 ><DD
1743 ><P
1744 >    Text documents, including HTML and JavaScript, to which this action
1745     applies, are filtered on-the-fly through the specified regular expression
1746     based substitutions.
1747    </P
1748 ></DD
1749 ><DT
1750 >Type:</DT
1751 ><DD
1752 ><P
1753 >Parameterized.</P
1754 ></DD
1755 ><DT
1756 >Parameter:</DT
1757 ><DD
1758 ><P
1759 >    The name of a filter, as defined in the <A
1760 HREF="filter-file.html"
1761 >filter file</A
1762 >
1763     (typically <TT
1764 CLASS="FILENAME"
1765 >default.filter</TT
1766 >, set by the
1767     <TT
1768 CLASS="LITERAL"
1769 ><A
1770 HREF="config.html#FILTERFILE"
1771 >filterfile</A
1772 ></TT
1773 >
1774     option in the <A
1775 HREF="config.html"
1776 >config file</A
1777 >). Filtering 
1778     can be completely disabled without the use of parameters.
1779    </P
1780 ></DD
1781 ><DT
1782 >Notes:</DT
1783 ><DD
1784 ><P
1785 >    For your convenience, there are a number of pre-defined filters available 
1786     in the distribution filter file that you can use. See the examples below for
1787     a list.
1788    </P
1789 ><P
1790 >    This is potentially a very powerful feature!  But <SPAN
1791 CLASS="QUOTE"
1792 >"rolling your own"</SPAN
1793 >
1794     filters requires a knowledge of regular expressions and HTML.
1795    </P
1796 ><P
1797 >    Filtering requires buffering the page content, which may appear to
1798     slow down page rendering since nothing is displayed until all content has
1799     passed the filters. (It does not really take longer, but seems that way
1800     since the page is not incrementally displayed.) This effect will be more
1801     noticeable on slower connections.
1802    </P
1803 ><P
1804 >    The amount of data that can be filtered is limited to the 
1805     <TT
1806 CLASS="LITERAL"
1807 ><A
1808 HREF="config.html#BUFFER-LIMIT"
1809 >buffer-limit</A
1810 ></TT
1811 >
1812     option in the main <A
1813 HREF="config.html"
1814 >config file</A
1815 >. The 
1816     default is 4096 KB (4 Megs). Once this limit is exceeded, the buffered
1817     data, and all pending data, is passed through unfiltered. Inappropriate 
1818     MIME types are not filtered.
1819    </P
1820 ><P
1821 >    At this time, <SPAN
1822 CLASS="APPLICATION"
1823 >Privoxy</SPAN
1824 > cannot (yet!) uncompress compressed
1825     documents. If you want filtering to work on all documents, even those that
1826     would normally be sent compressed, use the
1827     <TT
1828 CLASS="LITERAL"
1829 ><A
1830 HREF="actions-file.html#PREVENT-COMPRESSION"
1831 >prevent-compression</A
1832 ></TT
1833 >
1834     action in conjunction with <TT
1835 CLASS="LITERAL"
1836 >filter</TT
1837 >.
1838    </P
1839 ><P
1840 >    Filtering can achieve some of the same effects as the 
1841     <TT
1842 CLASS="LITERAL"
1843 ><A
1844 HREF="actions-file.html#BLOCK"
1845 >block</A
1846 ></TT
1847 >
1848     action, i.e. it can be used to block ads and banners. But the mechanism 
1849     works quite differently. One effective use, is to block ad banners 
1850     based on their size (see below), since many of these seem to be somewhat 
1851     standardized.
1852    </P
1853 ><P
1854 >    <A
1855 HREF="contact.html"
1856 >Feedback</A
1857 > with suggestions for new or
1858     improved filters is particularly welcome!
1859    </P
1860 ></DD
1861 ><DT
1862 >Example usage (with filters from the distribution <TT
1863 CLASS="FILENAME"
1864 >default.filter</TT
1865 > file):</DT
1866 ><DD
1867 ><P
1868 >    <A
1869 NAME="FILTER-HTML-ANNOYANCES"
1870 ></A
1871 >
1872     <TABLE
1873 BORDER="0"
1874 BGCOLOR="#E0E0E0"
1875 WIDTH="90%"
1876 ><TR
1877 ><TD
1878 ><PRE
1879 CLASS="SCREEN"
1880 >+filter{html-annoyances}     # Get rid of particularly annoying HTML abuse.</PRE
1881 ></TD
1882 ></TR
1883 ></TABLE
1884 >
1885    </P
1886 ><P
1887 >    <A
1888 NAME="FILTER-JS-ANNOYANCES"
1889 ></A
1890 >
1891     <TABLE
1892 BORDER="0"
1893 BGCOLOR="#E0E0E0"
1894 WIDTH="90%"
1895 ><TR
1896 ><TD
1897 ><PRE
1898 CLASS="SCREEN"
1899 >+filter{js-annoyances}       # Get rid of particularly annoying JavaScript abuse</PRE
1900 ></TD
1901 ></TR
1902 ></TABLE
1903 >
1904    </P
1905 ><P
1906 >    <A
1907 NAME="FILTER-BANNERS-BY-SIZE"
1908 ></A
1909 >
1910     <TABLE
1911 BORDER="0"
1912 BGCOLOR="#E0E0E0"
1913 WIDTH="90%"
1914 ><TR
1915 ><TD
1916 ><PRE
1917 CLASS="SCREEN"
1918 >+filter{banners-by-size}     # Kill banners based on their size for this page (<SPAN
1919 CLASS="emphasis"
1920 ><I
1921 CLASS="EMPHASIS"
1922 >very</I
1923 ></SPAN
1924 > efficient!)</PRE
1925 ></TD
1926 ></TR
1927 ></TABLE
1928 >
1929    </P
1930 ><P
1931 >    <A
1932 NAME="FILTER-BANNERS-BY-LINK"
1933 ></A
1934 >
1935     <TABLE
1936 BORDER="0"
1937 BGCOLOR="#E0E0E0"
1938 WIDTH="90%"
1939 ><TR
1940 ><TD
1941 ><PRE
1942 CLASS="SCREEN"
1943 >+filter{banners-by-link}     # Kill banners based on the link they are contained in (experimental)</PRE
1944 ></TD
1945 ></TR
1946 ></TABLE
1947 >
1948    </P
1949 ><P
1950 >    <A
1951 NAME="FILTER-IMG-REORDER"
1952 ></A
1953 >
1954     <TABLE
1955 BORDER="0"
1956 BGCOLOR="#E0E0E0"
1957 WIDTH="90%"
1958 ><TR
1959 ><TD
1960 ><PRE
1961 CLASS="SCREEN"
1962 >+filter{img-reorder}         # Reorder attributes in &#60;img&#62; tags to make the banners-by-* filters more effective</PRE
1963 ></TD
1964 ></TR
1965 ></TABLE
1966 >
1967    </P
1968 ><P
1969 >    <A
1970 NAME="FILTER-CONTENT-COOKIES"
1971 ></A
1972 >
1973     <TABLE
1974 BORDER="0"
1975 BGCOLOR="#E0E0E0"
1976 WIDTH="90%"
1977 ><TR
1978 ><TD
1979 ><PRE
1980 CLASS="SCREEN"
1981 >+filter{content-cookies}     # Kill cookies that come sneaking in the HTML or JS content</PRE
1982 ></TD
1983 ></TR
1984 ></TABLE
1985 >
1986    </P
1987 ><P
1988 >    <A
1989 NAME="FILTER-POPUPS"
1990 ></A
1991 >
1992     <TABLE
1993 BORDER="0"
1994 BGCOLOR="#E0E0E0"
1995 WIDTH="90%"
1996 ><TR
1997 ><TD
1998 ><PRE
1999 CLASS="SCREEN"
2000 >+filter{popups}              # Kill all popups in JS and HTML</PRE
2001 ></TD
2002 ></TR
2003 ></TABLE
2004 >
2005    </P
2006 ><P
2007 >    <A
2008 NAME="FILTER-WEBBUGS"
2009 ></A
2010 >
2011     <TABLE
2012 BORDER="0"
2013 BGCOLOR="#E0E0E0"
2014 WIDTH="90%"
2015 ><TR
2016 ><TD
2017 ><PRE
2018 CLASS="SCREEN"
2019 >+filter{webbugs}             # Squish WebBugs (1x1 invisible GIFs used for user tracking)</PRE
2020 ></TD
2021 ></TR
2022 ></TABLE
2023 >
2024    </P
2025 ><P
2026 >    <A
2027 NAME="FILTER-FUN"
2028 ></A
2029 >
2030     <TABLE
2031 BORDER="0"
2032 BGCOLOR="#E0E0E0"
2033 WIDTH="90%"
2034 ><TR
2035 ><TD
2036 ><PRE
2037 CLASS="SCREEN"
2038 >+filter{fun}                 # Text replacements for subversive browsing fun!</PRE
2039 ></TD
2040 ></TR
2041 ></TABLE
2042 >
2043    </P
2044 ><P
2045 >    <A
2046 NAME="FILTER-FRAMESET-BORDERS"
2047 ></A
2048 >
2049     <TABLE
2050 BORDER="0"
2051 BGCOLOR="#E0E0E0"
2052 WIDTH="90%"
2053 ><TR
2054 ><TD
2055 ><PRE
2056 CLASS="SCREEN"
2057 >+filter{frameset-borders}    # Give frames a border and make them resizeable</PRE
2058 ></TD
2059 ></TR
2060 ></TABLE
2061
2062    </P
2063 ><P
2064 >    <A
2065 NAME="FILTER-REFRESH-TAGS"
2066 ></A
2067 >
2068     <TABLE
2069 BORDER="0"
2070 BGCOLOR="#E0E0E0"
2071 WIDTH="90%"
2072 ><TR
2073 ><TD
2074 ><PRE
2075 CLASS="SCREEN"
2076 >+filter{refresh-tags}        # Kill automatic refresh tags (for dial-on-demand setups)</PRE
2077 ></TD
2078 ></TR
2079 ></TABLE
2080 >
2081    </P
2082 ><P
2083 >    <A
2084 NAME="FILTER-NIMDA"
2085 ></A
2086 >
2087     <TABLE
2088 BORDER="0"
2089 BGCOLOR="#E0E0E0"
2090 WIDTH="90%"
2091 ><TR
2092 ><TD
2093 ><PRE
2094 CLASS="SCREEN"
2095 >+filter{nimda}               # Remove Nimda (virus) code.</PRE
2096 ></TD
2097 ></TR
2098 ></TABLE
2099 >
2100    </P
2101 ><P
2102 >    <A
2103 NAME="FILTER-SHOCKWAVE-FLASH"
2104 ></A
2105 >
2106     <TABLE
2107 BORDER="0"
2108 BGCOLOR="#E0E0E0"
2109 WIDTH="90%"
2110 ><TR
2111 ><TD
2112 ><PRE
2113 CLASS="SCREEN"
2114 >+filter{shockwave-flash}     # Kill embedded Shockwave Flash objects</PRE
2115 ></TD
2116 ></TR
2117 ></TABLE
2118 >
2119    </P
2120 ><P
2121 >    <A
2122 NAME="FILTER-CRUDE-PARENTAL"
2123 ></A
2124 >
2125     <TABLE
2126 BORDER="0"
2127 BGCOLOR="#E0E0E0"
2128 WIDTH="90%"
2129 ><TR
2130 ><TD
2131 ><PRE
2132 CLASS="SCREEN"
2133 >+filter{crude-parental}      # Kill all web pages that contain the words "sex" or "warez"</PRE
2134 ></TD
2135 ></TR
2136 ></TABLE
2137 >
2138    </P
2139 ><P
2140 >    <A
2141 NAME="FILTER-JS-EVENTS"
2142 ></A
2143 >
2144     <TABLE
2145 BORDER="0"
2146 BGCOLOR="#E0E0E0"
2147 WIDTH="90%"
2148 ><TR
2149 ><TD
2150 ><PRE
2151 CLASS="SCREEN"
2152 >+filter{js-events}           # Kill all JS event bindings (<SPAN
2153 CLASS="emphasis"
2154 ><I
2155 CLASS="EMPHASIS"
2156 >Radically destructive!</I
2157 ></SPAN
2158 > Only for extra nasty sites) </PRE
2159 ></TD
2160 ></TR
2161 ></TABLE
2162 >
2163    </P
2164 ></DD
2165 ></DL
2166 ></DIV
2167 ></DIV
2168 ><DIV
2169 CLASS="SECT3"
2170 ><H4
2171 CLASS="SECT3"
2172 ><A
2173 NAME="HANDLE-AS-IMAGE">8.5.9. handle-as-image</H4
2174 ><P
2175 ></P
2176 ><DIV
2177 CLASS="VARIABLELIST"
2178 ><DL
2179 ><DT
2180 >Typical use:</DT
2181 ><DD
2182 ><P
2183 >Mark URLs as belonging to images (so they'll be replaced by images <SPAN
2184 CLASS="emphasis"
2185 ><I
2186 CLASS="EMPHASIS"
2187 >if they get blocked</I
2188 ></SPAN
2189 >)</P
2190 ></DD
2191 ><DT
2192 >Effect:</DT
2193 ><DD
2194 ><P
2195 >    This action alone doesn't do anything noticeable. It just marks URLs as images.
2196     If the <TT
2197 CLASS="LITERAL"
2198 ><A
2199 HREF="actions-file.html#BLOCK"
2200 >block</A
2201 ></TT
2202 > action <SPAN
2203 CLASS="emphasis"
2204 ><I
2205 CLASS="EMPHASIS"
2206 >also applies</I
2207 ></SPAN
2208 >,
2209     the presence or absence of this mark decides whether an HTML <SPAN
2210 CLASS="QUOTE"
2211 >"blocked"</SPAN
2212 >
2213     page, or a replacement image (as determined by the <TT
2214 CLASS="LITERAL"
2215 ><A
2216 HREF="actions-file.html#SET-IMAGE-BLOCKER"
2217 >set-image-blocker</A
2218 ></TT
2219 > action) will be sent to the
2220     client as a substitute for the blocked content.
2221    </P
2222 ></DD
2223 ><DT
2224 >Type:</DT
2225 ><DD
2226 ><P
2227 >Boolean.</P
2228 ></DD
2229 ><DT
2230 >Parameter:</DT
2231 ><DD
2232 ><P
2233 >    N/A
2234    </P
2235 ></DD
2236 ><DT
2237 >Notes:</DT
2238 ><DD
2239 ><P
2240 >    The below generic example section is actually part of <TT
2241 CLASS="FILENAME"
2242 >default.action</TT
2243 >.
2244     It marks all URLs with well-known image file name extensions as images and should
2245     be left intact. 
2246    </P
2247 ><P
2248 >    Users will probably only want to use the handle-as-image action in conjunction with
2249     <TT
2250 CLASS="LITERAL"
2251 ><A
2252 HREF="actions-file.html#BLOCK"
2253 >block</A
2254 ></TT
2255 >, to block sources of banners, whose URLs don't
2256     reflect the file type, like in the second example section.
2257    </P
2258 ><P
2259 >    Note that you cannot treat HTML pages as images in most cases. For instance, (in-line) ad
2260     frames require an HTML page to be sent, or they won't display properly.
2261     Forcing <TT
2262 CLASS="LITERAL"
2263 >handle-as-image</TT
2264 > in this situation will not replace the
2265     ad frame with an image, but lead to error messages.
2266    </P
2267 ></DD
2268 ><DT
2269 >Example usage (sections):</DT
2270 ><DD
2271 ><P
2272 >     <TABLE
2273 BORDER="0"
2274 BGCOLOR="#E0E0E0"
2275 WIDTH="90%"
2276 ><TR
2277 ><TD
2278 ><PRE
2279 CLASS="SCREEN"
2280 ># Generic image extensions:
2281 #
2282 {+handle-as-image}
2283 /.*\.(gif|jpg|jpeg|png|bmp|ico)$
2284
2285 # These don't look like images, but they're banners and should be
2286 # blocked as images:
2287 #
2288 {+block +handle-as-image}
2289 some.nasty-banner-server.com/junk.cgi?output=trash
2290
2291 # Banner source! Who cares if they also have non-image content?
2292 ad.doubleclick.net </PRE
2293 ></TD
2294 ></TR
2295 ></TABLE
2296 >
2297    </P
2298 ></DD
2299 ></DL
2300 ></DIV
2301 ></DIV
2302 ><DIV
2303 CLASS="SECT3"
2304 ><H4
2305 CLASS="SECT3"
2306 ><A
2307 NAME="HIDE-FORWARDED-FOR-HEADERS">8.5.10. hide-forwarded-for-headers</H4
2308 ><P
2309 ></P
2310 ><DIV
2311 CLASS="VARIABLELIST"
2312 ><DL
2313 ><DT
2314 >Typical use:</DT
2315 ><DD
2316 ><P
2317 >Improve privacy by hiding the true source of the request</P
2318 ></DD
2319 ><DT
2320 >Effect:</DT
2321 ><DD
2322 ><P
2323 >    Deletes any existing <SPAN
2324 CLASS="QUOTE"
2325 >"X-Forwarded-for:"</SPAN
2326 > HTTP header from client requests,
2327     and prevents adding a new one.
2328    </P
2329 ></DD
2330 ><DT
2331 >Type:</DT
2332 ><DD
2333 ><P
2334 >Boolean.</P
2335 ></DD
2336 ><DT
2337 >Parameter:</DT
2338 ><DD
2339 ><P
2340 >    N/A
2341    </P
2342 ></DD
2343 ><DT
2344 >Notes:</DT
2345 ><DD
2346 ><P
2347 >    It is fairly safe to leave this on.
2348    </P
2349 ><P
2350 >    This action is scheduled for improvement: It should be able to generate forged 
2351     <SPAN
2352 CLASS="QUOTE"
2353 >"X-Forwarded-for:"</SPAN
2354 > headers using random IP addresses from a specified network,
2355     to make successive requests from the same client look like requests from a pool of different
2356     users sharing the same proxy.
2357    </P
2358 ></DD
2359 ><DT
2360 >Example usage:</DT
2361 ><DD
2362 ><P
2363 >     <TABLE
2364 BORDER="0"
2365 BGCOLOR="#E0E0E0"
2366 WIDTH="90%"
2367 ><TR
2368 ><TD
2369 ><PRE
2370 CLASS="SCREEN"
2371 >+hide-forwarded-for-headers</PRE
2372 ></TD
2373 ></TR
2374 ></TABLE
2375 >
2376    </P
2377 ></DD
2378 ></DL
2379 ></DIV
2380 ></DIV
2381 ><DIV
2382 CLASS="SECT3"
2383 ><H4
2384 CLASS="SECT3"
2385 ><A
2386 NAME="HIDE-FROM-HEADER">8.5.11. hide-from-header</H4
2387 ><P
2388 ></P
2389 ><DIV
2390 CLASS="VARIABLELIST"
2391 ><DL
2392 ><DT
2393 >Typical use:</DT
2394 ><DD
2395 ><P
2396 >Keep your (old and ill) browser from telling web servers your email address</P
2397 ></DD
2398 ><DT
2399 >Effect:</DT
2400 ><DD
2401 ><P
2402 >    Deletes any existing <SPAN
2403 CLASS="QUOTE"
2404 >"From:"</SPAN
2405 > HTTP header, or replaces it with the
2406     specified string.
2407    </P
2408 ></DD
2409 ><DT
2410 >Type:</DT
2411 ><DD
2412 ><P
2413 >Parameterized.</P
2414 ></DD
2415 ><DT
2416 >Parameter:</DT
2417 ><DD
2418 ><P
2419 >    Keyword: <SPAN
2420 CLASS="QUOTE"
2421 >"block"</SPAN
2422 >, or any user defined value.
2423    </P
2424 ></DD
2425 ><DT
2426 >Notes:</DT
2427 ><DD
2428 ><P
2429 >    The keyword <SPAN
2430 CLASS="QUOTE"
2431 >"block"</SPAN
2432 > will completely remove the header 
2433     (not to be confused with the <TT
2434 CLASS="LITERAL"
2435 ><A
2436 HREF="actions-file.html#BLOCK"
2437 >block</A
2438 ></TT
2439 >
2440     action).
2441    </P
2442 ><P
2443 >    Alternately, you can specify any value you prefer to be sent to the web
2444     server. If you do, it is a matter of fairness not to use any address that
2445     is actually used by a real person.
2446    </P
2447 ><P
2448 >    This action is rarely needed, as modern web browsers don't send
2449     <SPAN
2450 CLASS="QUOTE"
2451 >"From:"</SPAN
2452 > headers anymore.
2453    </P
2454 ></DD
2455 ><DT
2456 >Example usage:</DT
2457 ><DD
2458 ><P
2459 >    <TABLE
2460 BORDER="0"
2461 BGCOLOR="#E0E0E0"
2462 WIDTH="90%"
2463 ><TR
2464 ><TD
2465 ><PRE
2466 CLASS="SCREEN"
2467 >+hide-from-header{block}</PRE
2468 ></TD
2469 ></TR
2470 ></TABLE
2471 > or
2472     <TABLE
2473 BORDER="0"
2474 BGCOLOR="#E0E0E0"
2475 WIDTH="90%"
2476 ><TR
2477 ><TD
2478 ><PRE
2479 CLASS="SCREEN"
2480 >+hide-from-header{spam-me-senseless@sittingduck.example.com}</PRE
2481 ></TD
2482 ></TR
2483 ></TABLE
2484 >
2485    </P
2486 ></DD
2487 ></DL
2488 ></DIV
2489 ></DIV
2490 ><DIV
2491 CLASS="SECT3"
2492 ><H4
2493 CLASS="SECT3"
2494 ><A
2495 NAME="HIDE-REFERRER">8.5.12. hide-referrer</H4
2496 ><A
2497 NAME="HIDE-REFERER"
2498 ></A
2499 ><P
2500 ></P
2501 ><DIV
2502 CLASS="VARIABLELIST"
2503 ><DL
2504 ><DT
2505 >Typical use:</DT
2506 ><DD
2507 ><P
2508 >Conceal which link you followed to get to a particular site</P
2509 ></DD
2510 ><DT
2511 >Effect:</DT
2512 ><DD
2513 ><P
2514 >    Deletes the <SPAN
2515 CLASS="QUOTE"
2516 >"Referer:"</SPAN
2517 > (sic) HTTP header from the client request,
2518     or replaces it with a forged one.
2519    </P
2520 ></DD
2521 ><DT
2522 >Type:</DT
2523 ><DD
2524 ><P
2525 >Parameterized.</P
2526 ></DD
2527 ><DT
2528 >Parameter:</DT
2529 ><DD
2530 ><P
2531 ></P
2532 ><UL
2533 ><LI
2534 ><P
2535 ><SPAN
2536 CLASS="QUOTE"
2537 >"block"</SPAN
2538 > to delete the header completely.</P
2539 ></LI
2540 ><LI
2541 ><P
2542 ><SPAN
2543 CLASS="QUOTE"
2544 >"forge"</SPAN
2545 > to pretend to be coming from the homepage of the server we are talking to.</P
2546 ></LI
2547 ><LI
2548 ><P
2549 >Any other string to set a user defined referrer.</P
2550 ></LI
2551 ></UL
2552 ></DD
2553 ><DT
2554 >Notes:</DT
2555 ><DD
2556 ><P
2557 >    <SPAN
2558 CLASS="QUOTE"
2559 >"forge"</SPAN
2560 > is the preferred option here, since some servers will
2561     not send images back otherwise, in an attempt to prevent their valuable
2562     content from being embedded elsewhere (and hence, without being surrounded
2563     by <SPAN
2564 CLASS="emphasis"
2565 ><I
2566 CLASS="EMPHASIS"
2567 >their</I
2568 ></SPAN
2569 > banners).
2570    </P
2571 ><P
2572 >  
2573    <TT
2574 CLASS="LITERAL"
2575 >hide-referer</TT
2576 > is an alternate spelling of
2577    <TT
2578 CLASS="LITERAL"
2579 >hide-referrer</TT
2580 > and the two can be can be freely
2581    substituted with each other. (<SPAN
2582 CLASS="QUOTE"
2583 >"referrer"</SPAN
2584 > is the
2585    correct English spelling, however the HTTP specification has a bug - it
2586    requires it to be spelled as <SPAN
2587 CLASS="QUOTE"
2588 >"referer"</SPAN
2589 >.) 
2590   </P
2591 ></DD
2592 ><DT
2593 >Example usage:</DT
2594 ><DD
2595 ><P
2596 >     <TABLE
2597 BORDER="0"
2598 BGCOLOR="#E0E0E0"
2599 WIDTH="90%"
2600 ><TR
2601 ><TD
2602 ><PRE
2603 CLASS="SCREEN"
2604 >+hide-referrer{forge}</PRE
2605 ></TD
2606 ></TR
2607 ></TABLE
2608 > or
2609      <TABLE
2610 BORDER="0"
2611 BGCOLOR="#E0E0E0"
2612 WIDTH="90%"
2613 ><TR
2614 ><TD
2615 ><PRE
2616 CLASS="SCREEN"
2617 >+hide-referrer{http://www.yahoo.com/}</PRE
2618 ></TD
2619 ></TR
2620 ></TABLE
2621 >
2622    </P
2623 ></DD
2624 ></DL
2625 ></DIV
2626 ></DIV
2627 ><DIV
2628 CLASS="SECT3"
2629 ><H4
2630 CLASS="SECT3"
2631 ><A
2632 NAME="HIDE-USER-AGENT">8.5.13. hide-user-agent</H4
2633 ><P
2634 ></P
2635 ><DIV
2636 CLASS="VARIABLELIST"
2637 ><DL
2638 ><DT
2639 >Typical use:</DT
2640 ><DD
2641 ><P
2642 >Conceal your type of browser and client operating system</P
2643 ></DD
2644 ><DT
2645 >Effect:</DT
2646 ><DD
2647 ><P
2648 >    Replaces the value of the <SPAN
2649 CLASS="QUOTE"
2650 >"User-Agent:"</SPAN
2651 > HTTP header
2652     in client requests with the specified value.
2653    </P
2654 ></DD
2655 ><DT
2656 >Type:</DT
2657 ><DD
2658 ><P
2659 >Parameterized.</P
2660 ></DD
2661 ><DT
2662 >Parameter:</DT
2663 ><DD
2664 ><P
2665 >    Any user-defined string.
2666    </P
2667 ></DD
2668 ><DT
2669 >Notes:</DT
2670 ><DD
2671 ><DIV
2672 CLASS="WARNING"
2673 ><P
2674 ></P
2675 ><TABLE
2676 CLASS="WARNING"
2677 BORDER="1"
2678 WIDTH="90%"
2679 ><TR
2680 ><TD
2681 ALIGN="CENTER"
2682 ><B
2683 >Warning</B
2684 ></TD
2685 ></TR
2686 ><TR
2687 ><TD
2688 ALIGN="LEFT"
2689 ><P
2690 >     This breaks many web sites that depend on looking at this header in order
2691      to customize their content for different browsers (which, by the
2692      way, is <SPAN
2693 CLASS="emphasis"
2694 ><I
2695 CLASS="EMPHASIS"
2696 >NOT</I
2697 ></SPAN
2698 > a <A
2699 HREF="http://www.javascriptkit.com/javaindex.shtml"
2700 TARGET="_top"
2701 >smart way to do
2702      that</A
2703 >!).
2704     </P
2705 ></TD
2706 ></TR
2707 ></TABLE
2708 ></DIV
2709 ><P
2710 >    Using this action in multi-user setups or wherever different types of
2711     browsers will access the same <SPAN
2712 CLASS="APPLICATION"
2713 >Privoxy</SPAN
2714 > is
2715     <SPAN
2716 CLASS="emphasis"
2717 ><I
2718 CLASS="EMPHASIS"
2719 >not recommended</I
2720 ></SPAN
2721 >. In single-user, single-browser
2722     setups, you might use it to delete your OS version information from
2723     the headers, because it is an invitation to exploit known bugs for your
2724     OS. It is also occasionally useful to forge this in order to access 
2725     sites that won't let you in otherwise (though there may be a good 
2726     reason in some cases). Example of this: some MSN sites will not 
2727     let <SPAN
2728 CLASS="APPLICATION"
2729 >Mozilla</SPAN
2730 > enter, yet forging to a 
2731     <SPAN
2732 CLASS="APPLICATION"
2733 >Netscape 6.1</SPAN
2734 > user-agent works just fine.
2735     (Must be just a silly MS goof, I'm sure :-).
2736    </P
2737 ><P
2738 >    This action is scheduled for improvement.
2739    </P
2740 ></DD
2741 ><DT
2742 >Example usage:</DT
2743 ><DD
2744 ><P
2745 >     <TABLE
2746 BORDER="0"
2747 BGCOLOR="#E0E0E0"
2748 WIDTH="90%"
2749 ><TR
2750 ><TD
2751 ><PRE
2752 CLASS="SCREEN"
2753 >+hide-user-agent{Netscape 6.1 (X11; I; Linux 2.4.18 i686)}</PRE
2754 ></TD
2755 ></TR
2756 ></TABLE
2757 >
2758    </P
2759 ></DD
2760 ></DL
2761 ></DIV
2762 ></DIV
2763 ><DIV
2764 CLASS="SECT3"
2765 ><H4
2766 CLASS="SECT3"
2767 ><A
2768 NAME="KILL-POPUPS">8.5.14. kill-popups<A
2769 NAME="KILL-POPUP"
2770 ></A
2771 ></H4
2772 ><P
2773 ></P
2774 ><DIV
2775 CLASS="VARIABLELIST"
2776 ><DL
2777 ><DT
2778 >Typical use:</DT
2779 ><DD
2780 ><P
2781 >Eliminate those annoying pop-up windows</P
2782 ></DD
2783 ><DT
2784 >Effect:</DT
2785 ><DD
2786 ><P
2787 >    While loading the document, replace JavaScript code that opens
2788     pop-up windows with (syntactically neutral) dummy code on the fly.
2789    </P
2790 ></DD
2791 ><DT
2792 >Type:</DT
2793 ><DD
2794 ><P
2795 >Boolean.</P
2796 ></DD
2797 ><DT
2798 >Parameter:</DT
2799 ><DD
2800 ><P
2801 >    N/A
2802    </P
2803 ></DD
2804 ><DT
2805 >Notes:</DT
2806 ><DD
2807 ><P
2808 >    This action is easily confused with the built-in, hardwired <TT
2809 CLASS="LITERAL"
2810 ><A
2811 HREF="actions-file.html#FILTER"
2812 >filter</A
2813 ></TT
2814 >
2815     action, but there are important differences: For <TT
2816 CLASS="LITERAL"
2817 >kill-popups</TT
2818 >,
2819     the document need not be buffered, so it can be incrementally rendered while
2820     downloading. But <TT
2821 CLASS="LITERAL"
2822 >kill-popups</TT
2823 > doesn't catch as many pop-ups as
2824     <TT
2825 CLASS="LITERAL"
2826 ><A
2827 HREF="actions-file.html#FILTER"
2828 >filter</A
2829 >{<TT
2830 CLASS="REPLACEABLE"
2831 ><I
2832 >popups</I
2833 ></TT
2834 >}</TT
2835 >
2836     does. 
2837    </P
2838 ><P
2839 >    Think of it as a fast and efficient replacement for a filter that you
2840     can use if you don't want any filtering at all. Note that it doesn't make
2841     sense to combine it with any <TT
2842 CLASS="LITERAL"
2843 ><A
2844 HREF="actions-file.html#FILTER"
2845 >filter</A
2846 ></TT
2847 > action,
2848     since as soon as one <TT
2849 CLASS="LITERAL"
2850 ><A
2851 HREF="actions-file.html#FILTER"
2852 >filter</A
2853 ></TT
2854 > applies,
2855     the whole document needs to be buffered anyway, which destroys the advantage of
2856     the <TT
2857 CLASS="LITERAL"
2858 >kill-popups</TT
2859 > action over its filter equivalent.
2860    </P
2861 ><P
2862 >    Killing all pop-ups is a dangerous business. Many shops and banks rely on
2863     pop-ups to display forms, shopping carts etc, and killing only the unwanted pop-ups 
2864     would require artificial intelligence in <SPAN
2865 CLASS="APPLICATION"
2866 >Privoxy</SPAN
2867 >.
2868     If the only kind of pop-ups that you want to kill are exit consoles (those
2869     <SPAN
2870 CLASS="emphasis"
2871 ><I
2872 CLASS="EMPHASIS"
2873 >really nasty</I
2874 ></SPAN
2875 > windows that appear when you close an other
2876     one), you might want to use
2877     <TT
2878 CLASS="LITERAL"
2879 ><A
2880 HREF="actions-file.html#FILTER"
2881 >filter</A
2882 >{<TT
2883 CLASS="REPLACEABLE"
2884 ><I
2885 >js-annoyances</I
2886 ></TT
2887 >}</TT
2888 >
2889     instead. 
2890    </P
2891 ></DD
2892 ><DT
2893 >Example usage:</DT
2894 ><DD
2895 ><P
2896 ><TABLE
2897 BORDER="0"
2898 BGCOLOR="#E0E0E0"
2899 WIDTH="90%"
2900 ><TR
2901 ><TD
2902 ><PRE
2903 CLASS="SCREEN"
2904 >+kill-popups</PRE
2905 ></TD
2906 ></TR
2907 ></TABLE
2908 ></P
2909 ></DD
2910 ></DL
2911 ></DIV
2912 ></DIV
2913 ><DIV
2914 CLASS="SECT3"
2915 ><H4
2916 CLASS="SECT3"
2917 ><A
2918 NAME="LIMIT-CONNECT">8.5.15. limit-connect</H4
2919 ><P
2920 ></P
2921 ><DIV
2922 CLASS="VARIABLELIST"
2923 ><DL
2924 ><DT
2925 >Typical use:</DT
2926 ><DD
2927 ><P
2928 >Prevent abuse of <SPAN
2929 CLASS="APPLICATION"
2930 >Privoxy</SPAN
2931 > as a TCP proxy relay</P
2932 ></DD
2933 ><DT
2934 >Effect:</DT
2935 ><DD
2936 ><P
2937 >    Specifies to which ports HTTP CONNECT requests are allowable.
2938    </P
2939 ></DD
2940 ><DT
2941 >Type:</DT
2942 ><DD
2943 ><P
2944 >Parameterized.</P
2945 ></DD
2946 ><DT
2947 >Parameter:</DT
2948 ><DD
2949 ><P
2950 >    A comma-separated list of ports or port ranges (the latter using dashes, with the minimum
2951     defaulting to 0 and the maximum to 65K).
2952    </P
2953 ></DD
2954 ><DT
2955 >Notes:</DT
2956 ><DD
2957 ><P
2958 >    By default, i.e. if no <TT
2959 CLASS="LITERAL"
2960 >limit-connect</TT
2961 > action applies,
2962     <SPAN
2963 CLASS="APPLICATION"
2964 >Privoxy</SPAN
2965 > only allows HTTP CONNECT
2966     requests to port 443 (the standard, secure HTTPS port). Use 
2967     <TT
2968 CLASS="LITERAL"
2969 >limit-connect</TT
2970 > if more fine-grained control is desired
2971     for some or all destinations.
2972    </P
2973 ><P
2974 >    The CONNECT methods exists in HTTP to allow access to secure websites
2975     (<SPAN
2976 CLASS="QUOTE"
2977 >"https://"</SPAN
2978 > URLs) through proxies. It works very simply:
2979     the proxy connects to the server on the specified port, and then
2980     short-circuits its connections to the client and to the remote server.
2981     This can be a big security hole, since CONNECT-enabled proxies can be
2982     abused as TCP relays very easily.
2983   </P
2984 ><P
2985 >   If you don't know what any of this means, there probably is no reason to 
2986    change this one, since the default is already very restrictive.
2987   </P
2988 ></DD
2989 ><DT
2990 >Example usages:</DT
2991 ><DD
2992 ><P
2993 >     <TABLE
2994 BORDER="0"
2995 BGCOLOR="#E0E0E0"
2996 WIDTH="90%"
2997 ><TR
2998 ><TD
2999 ><PRE
3000 CLASS="SCREEN"
3001 >+limit-connect{443}                   # This is the default and need not be specified.
3002 +limit-connect{80,443}                # Ports 80 and 443 are OK.
3003 +limit-connect{-3, 7, 20-100, 500-}   # Ports less than 3, 7, 20 to 100 and above 500 are OK.
3004 +limit-connect{-}                     # All ports are OK (gaping security hole!)</PRE
3005 ></TD
3006 ></TR
3007 ></TABLE
3008 >
3009    </P
3010 ></DD
3011 ></DL
3012 ></DIV
3013 ></DIV
3014 ><DIV
3015 CLASS="SECT3"
3016 ><H4
3017 CLASS="SECT3"
3018 ><A
3019 NAME="PREVENT-COMPRESSION">8.5.16. prevent-compression</H4
3020 ><P
3021 ></P
3022 ><DIV
3023 CLASS="VARIABLELIST"
3024 ><DL
3025 ><DT
3026 >Typical use:</DT
3027 ><DD
3028 ><P
3029 >    Ensure that servers send the content uncompressed, so it can be
3030     passed through <TT
3031 CLASS="LITERAL"
3032 ><A
3033 HREF="actions-file.html#FILTER"
3034 >filter</A
3035 ></TT
3036 >s
3037    </P
3038 ></DD
3039 ><DT
3040 >Effect:</DT
3041 ><DD
3042 ><P
3043 >    Adds a header to the request that asks for uncompressed transfer.
3044    </P
3045 ></DD
3046 ><DT
3047 >Type:</DT
3048 ><DD
3049 ><P
3050 >Boolean.</P
3051 ></DD
3052 ><DT
3053 >Parameter:</DT
3054 ><DD
3055 ><P
3056 >    N/A
3057    </P
3058 ></DD
3059 ><DT
3060 >Notes:</DT
3061 ><DD
3062 ><P
3063 >    More and more websites send their content compressed by default, which
3064     is generally a good idea and saves bandwidth. But for the <TT
3065 CLASS="LITERAL"
3066 ><A
3067 HREF="actions-file.html#FILTER"
3068 >filter</A
3069 ></TT
3070 >, <TT
3071 CLASS="LITERAL"
3072 ><A
3073 HREF="actions-file.html#DEANIMATE-GIFS"
3074 >deanimate-gifs</A
3075 ></TT
3076 >
3077     and <TT
3078 CLASS="LITERAL"
3079 ><A
3080 HREF="actions-file.html#KILL-POPUPS"
3081 >kill-popups</A
3082 ></TT
3083 > actions to work,
3084     <SPAN
3085 CLASS="APPLICATION"
3086 >Privoxy</SPAN
3087 > needs access to the  uncompressed data.
3088     Unfortunately, <SPAN
3089 CLASS="APPLICATION"
3090 >Privoxy</SPAN
3091 > can't yet(!)  uncompress, filter, and
3092     re-compress the content on the fly. So if you want to ensure that all websites, including
3093     those that normally compress, can be filtered, you need to use this action.
3094    </P
3095 ><P
3096 >    This will slow down transfers from those websites, though. If you use any of the above-mentioned
3097     actions, you will typically want to use <TT
3098 CLASS="LITERAL"
3099 >prevent-compression</TT
3100 > in conjunction
3101     with them.
3102    </P
3103 ><P
3104 >    Note that some (rare) ill-configured sites don't handle requests for uncompressed
3105     documents correctly (they send an empty document body). If you use <TT
3106 CLASS="LITERAL"
3107 >prevent-compression</TT
3108 >
3109     per default, you'll have to add exceptions for those sites. See the example for how to do that.
3110    </P
3111 ></DD
3112 ><DT
3113 >Example usage (sections):</DT
3114 ><DD
3115 ><P
3116 >    <TABLE
3117 BORDER="0"
3118 BGCOLOR="#E0E0E0"
3119 WIDTH="90%"
3120 ><TR
3121 ><TD
3122 ><PRE
3123 CLASS="SCREEN"
3124 ># Set default:
3125 #
3126 {+prevent-compression}
3127 / # Match all sites
3128
3129 # Make exceptions for ill sites:
3130 #
3131 {-prevent-compression}
3132 www.debianhelp.org
3133 www.pclinuxonline.com</PRE
3134 ></TD
3135 ></TR
3136 ></TABLE
3137 >
3138    </P
3139 ></DD
3140 ></DL
3141 ></DIV
3142 ></DIV
3143 ><DIV
3144 CLASS="SECT3"
3145 ><H4
3146 CLASS="SECT3"
3147 ><A
3148 NAME="SEND-VANILLA-WAFER">8.5.17. send-vanilla-wafer</H4
3149 ><P
3150 ></P
3151 ><DIV
3152 CLASS="VARIABLELIST"
3153 ><DL
3154 ><DT
3155 >Typical use:</DT
3156 ><DD
3157 ><P
3158 >    Feed log analysis scripts with useless data.
3159    </P
3160 ></DD
3161 ><DT
3162 >Effect:</DT
3163 ><DD
3164 ><P
3165 >    Sends a cookie with each request stating that you do not accept any copyright
3166     on cookies sent to you, and asking the site operator not to track you.
3167    </P
3168 ></DD
3169 ><DT
3170 >Type:</DT
3171 ><DD
3172 ><P
3173 >Boolean.</P
3174 ></DD
3175 ><DT
3176 >Parameter:</DT
3177 ><DD
3178 ><P
3179 >    N/A
3180    </P
3181 ></DD
3182 ><DT
3183 >Notes:</DT
3184 ><DD
3185 ><P
3186 >    The vanilla wafer is a (relatively) unique header and could conceivably be used to track you.
3187    </P
3188 ><P
3189 >    This action is rarely used and not enabled in the default configuration.
3190    </P
3191 ></DD
3192 ><DT
3193 >Example usage:</DT
3194 ><DD
3195 ><P
3196 >     <TABLE
3197 BORDER="0"
3198 BGCOLOR="#E0E0E0"
3199 WIDTH="90%"
3200 ><TR
3201 ><TD
3202 ><PRE
3203 CLASS="SCREEN"
3204 >+send-vanilla-wafer</PRE
3205 ></TD
3206 ></TR
3207 ></TABLE
3208 >
3209    </P
3210 ></DD
3211 ></DL
3212 ></DIV
3213 ></DIV
3214 ><DIV
3215 CLASS="SECT3"
3216 ><H4
3217 CLASS="SECT3"
3218 ><A
3219 NAME="SEND-WAFER">8.5.18. send-wafer</H4
3220 ><P
3221 ></P
3222 ><DIV
3223 CLASS="VARIABLELIST"
3224 ><DL
3225 ><DT
3226 >Typical use:</DT
3227 ><DD
3228 ><P
3229 >    Send custom cookies or feed log analysis scripts with even more useless data.
3230    </P
3231 ></DD
3232 ><DT
3233 >Effect:</DT
3234 ><DD
3235 ><P
3236 >    Sends a custom, user-defined cookie with each request.
3237    </P
3238 ></DD
3239 ><DT
3240 >Type:</DT
3241 ><DD
3242 ><P
3243 >Multi-value.</P
3244 ></DD
3245 ><DT
3246 >Parameter:</DT
3247 ><DD
3248 ><P
3249 >    A string of the form <SPAN
3250 CLASS="QUOTE"
3251 >"<TT
3252 CLASS="REPLACEABLE"
3253 ><I
3254 >name</I
3255 ></TT
3256 >=<TT
3257 CLASS="REPLACEABLE"
3258 ><I
3259 >value</I
3260 ></TT
3261 >"</SPAN
3262 >.
3263    </P
3264 ></DD
3265 ><DT
3266 >Notes:</DT
3267 ><DD
3268 ><P
3269 >    Being multi-valued, multiple instances of this action can apply to the same request,
3270     resulting in multiple cookies being sent.
3271    </P
3272 ><P
3273 >    This action is rarely used and not enabled in the default configuration.
3274    </P
3275 ></DD
3276 ><DT
3277 >Example usage (section):</DT
3278 ><DD
3279 ><P
3280 >    <TABLE
3281 BORDER="0"
3282 BGCOLOR="#E0E0E0"
3283 WIDTH="90%"
3284 ><TR
3285 ><TD
3286 ><PRE
3287 CLASS="SCREEN"
3288 >{+send-wafer{UsingPrivoxy=true}}
3289 my-internal-testing-server.void</PRE
3290 ></TD
3291 ></TR
3292 ></TABLE
3293 >
3294    </P
3295 ></DD
3296 ></DL
3297 ></DIV
3298 ></DIV
3299 ><DIV
3300 CLASS="SECT3"
3301 ><H4
3302 CLASS="SECT3"
3303 ><A
3304 NAME="SESSION-COOKIES-ONLY">8.5.19. session-cookies-only</H4
3305 ><P
3306 ></P
3307 ><DIV
3308 CLASS="VARIABLELIST"
3309 ><DL
3310 ><DT
3311 >Typical use:</DT
3312 ><DD
3313 ><P
3314 >    Allow only temporary <SPAN
3315 CLASS="QUOTE"
3316 >"session"</SPAN
3317 > cookies (for the current browser session <SPAN
3318 CLASS="emphasis"
3319 ><I
3320 CLASS="EMPHASIS"
3321 >only</I
3322 ></SPAN
3323 >).
3324    </P
3325 ></DD
3326 ><DT
3327 >Effect:</DT
3328 ><DD
3329 ><P
3330 >    Deletes the <SPAN
3331 CLASS="QUOTE"
3332 >"expires"</SPAN
3333 > field from <SPAN
3334 CLASS="QUOTE"
3335 >"Set-Cookie:"</SPAN
3336 > server headers.
3337     Most browsers will not store such cookies permanently and forget them in between sessions.
3338    </P
3339 ></DD
3340 ><DT
3341 >Type:</DT
3342 ><DD
3343 ><P
3344 >Boolean.</P
3345 ></DD
3346 ><DT
3347 >Parameter:</DT
3348 ><DD
3349 ><P
3350 >    N/A
3351    </P
3352 ></DD
3353 ><DT
3354 >Notes:</DT
3355 ><DD
3356 ><P
3357 >    This is less strict than <TT
3358 CLASS="LITERAL"
3359 ><A
3360 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
3361 >crunch-incoming-cookies</A
3362 ></TT
3363 > / 
3364     <TT
3365 CLASS="LITERAL"
3366 ><A
3367 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
3368 >crunch-outgoing-cookies</A
3369 ></TT
3370 > and allows you to browse
3371     websites that insist or rely on setting cookies, without compromising your privacy too badly.
3372    </P
3373 ><P
3374 >    Most browsers will not permanently store cookies that have been processed by
3375     <TT
3376 CLASS="LITERAL"
3377 >session-cookies-only</TT
3378 > and will forget about them between sessions.
3379     This makes profiling cookies useless, but won't break sites which require cookies so
3380     that you can log in for transactions. This is generally turned on for all 
3381     sites, and is the recommended setting.
3382    </P
3383 ><P
3384 >    It makes <SPAN
3385 CLASS="emphasis"
3386 ><I
3387 CLASS="EMPHASIS"
3388 >no sense at all</I
3389 ></SPAN
3390 > to use <TT
3391 CLASS="LITERAL"
3392 >session-cookies-only</TT
3393 >
3394     together with <TT
3395 CLASS="LITERAL"
3396 ><A
3397 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
3398 >crunch-incoming-cookies</A
3399 ></TT
3400 > or
3401     <TT
3402 CLASS="LITERAL"
3403 ><A
3404 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
3405 >crunch-outgoing-cookies</A
3406 ></TT
3407 >. If you do, cookies
3408     will be plainly killed.
3409    </P
3410 ><P
3411 >    Note that it is up to the browser how it handles such cookies without an <SPAN
3412 CLASS="QUOTE"
3413 >"expires"</SPAN
3414 >
3415     field. If you use an exotic browser, you might want to try it out to be sure.
3416    </P
3417 ></DD
3418 ><DT
3419 >Example usage:</DT
3420 ><DD
3421 ><P
3422 >     <TABLE
3423 BORDER="0"
3424 BGCOLOR="#E0E0E0"
3425 WIDTH="90%"
3426 ><TR
3427 ><TD
3428 ><PRE
3429 CLASS="SCREEN"
3430 >+session-cookies-only</PRE
3431 ></TD
3432 ></TR
3433 ></TABLE
3434 >
3435    </P
3436 ></DD
3437 ></DL
3438 ></DIV
3439 ></DIV
3440 ><DIV
3441 CLASS="SECT3"
3442 ><H4
3443 CLASS="SECT3"
3444 ><A
3445 NAME="SET-IMAGE-BLOCKER">8.5.20. set-image-blocker</H4
3446 ><P
3447 ></P
3448 ><DIV
3449 CLASS="VARIABLELIST"
3450 ><DL
3451 ><DT
3452 >Typical use:</DT
3453 ><DD
3454 ><P
3455 >Choose the replacement for blocked images</P
3456 ></DD
3457 ><DT
3458 >Effect:</DT
3459 ><DD
3460 ><P
3461 >     This action alone doesn't do anything noticeable. If <SPAN
3462 CLASS="emphasis"
3463 ><I
3464 CLASS="EMPHASIS"
3465 >both</I
3466 ></SPAN
3467 >
3468      <TT
3469 CLASS="LITERAL"
3470 ><A
3471 HREF="actions-file.html#BLOCK"
3472 >block</A
3473 ></TT
3474 > <SPAN
3475 CLASS="emphasis"
3476 ><I
3477 CLASS="EMPHASIS"
3478 >and</I
3479 ></SPAN
3480 > <TT
3481 CLASS="LITERAL"
3482 ><A
3483 HREF="actions-file.html#HANDLE-AS-IMAGE"
3484 >handle-as-image</A
3485 ></TT
3486 > <SPAN
3487 CLASS="emphasis"
3488 ><I
3489 CLASS="EMPHASIS"
3490 >also</I
3491 ></SPAN
3492 >
3493      apply, i.e. if the request is to be blocked as an image,
3494      <SPAN
3495 CLASS="emphasis"
3496 ><I
3497 CLASS="EMPHASIS"
3498 >then</I
3499 ></SPAN
3500 > the parameter of this action decides what will be
3501      sent as a replacement.
3502    </P
3503 ></DD
3504 ><DT
3505 >Type:</DT
3506 ><DD
3507 ><P
3508 >Parameterized.</P
3509 ></DD
3510 ><DT
3511 >Parameter:</DT
3512 ><DD
3513 ><P
3514 ></P
3515 ><UL
3516 ><LI
3517 ><P
3518 >      <SPAN
3519 CLASS="QUOTE"
3520 >"pattern"</SPAN
3521 > to send a built-in checkerboard pattern image. The image is visually
3522       decent, scales very well, and makes it obvious where banners were busted.
3523      </P
3524 ></LI
3525 ><LI
3526 ><P
3527 >      <SPAN
3528 CLASS="QUOTE"
3529 >"blank"</SPAN
3530 > to send a built-in transparent image. This makes banners disappear
3531       completely, but makes it hard to detect where <SPAN
3532 CLASS="APPLICATION"
3533 >Privoxy</SPAN
3534 > has blocked
3535       images on a given page and complicates troubleshooting if <SPAN
3536 CLASS="APPLICATION"
3537 >Privoxy</SPAN
3538 >
3539       has blocked innocent images, like navigation icons.
3540      </P
3541 ></LI
3542 ><LI
3543 ><P
3544 >      <SPAN
3545 CLASS="QUOTE"
3546 >"<TT
3547 CLASS="REPLACEABLE"
3548 ><I
3549 >target-url</I
3550 ></TT
3551 >"</SPAN
3552 > to
3553       send a redirect to <TT
3554 CLASS="REPLACEABLE"
3555 ><I
3556 >target-url</I
3557 ></TT
3558 >. You can redirect
3559       to any image anywhere, even in your local filesystem (via <SPAN
3560 CLASS="QUOTE"
3561 >"file:///"</SPAN
3562 > URL).
3563      </P
3564 ><P
3565 >      A good application of redirects is to use special <SPAN
3566 CLASS="APPLICATION"
3567 >Privoxy</SPAN
3568 >-built-in
3569       URLs, which send the built-in images, as <TT
3570 CLASS="REPLACEABLE"
3571 ><I
3572 >target-url</I
3573 ></TT
3574 >.
3575       This has the same visual effect as specifying <SPAN
3576 CLASS="QUOTE"
3577 >"blank"</SPAN
3578 > or <SPAN
3579 CLASS="QUOTE"
3580 >"pattern"</SPAN
3581 > in
3582       the first place, but enables your browser to cache the replacement image, instead of requesting
3583       it over and over again.
3584      </P
3585 ></LI
3586 ></UL
3587 ></DD
3588 ><DT
3589 >Notes:</DT
3590 ><DD
3591 ><P
3592 >    The URLs for the built-in images are <SPAN
3593 CLASS="QUOTE"
3594 >"http://config.privoxy.org/send-banner?type=<TT
3595 CLASS="REPLACEABLE"
3596 ><I
3597 >type</I
3598 ></TT
3599 >"</SPAN
3600 >, where <TT
3601 CLASS="REPLACEABLE"
3602 ><I
3603 >type</I
3604 ></TT
3605 > is
3606     either <SPAN
3607 CLASS="QUOTE"
3608 >"blank"</SPAN
3609 > or <SPAN
3610 CLASS="QUOTE"
3611 >"pattern"</SPAN
3612 >.
3613    </P
3614 ><P
3615 >    There is a third (advanced) type, called <SPAN
3616 CLASS="QUOTE"
3617 >"auto"</SPAN
3618 >. It is <SPAN
3619 CLASS="emphasis"
3620 ><I
3621 CLASS="EMPHASIS"
3622 >NOT</I
3623 ></SPAN
3624 > to be
3625     used in <TT
3626 CLASS="LITERAL"
3627 >set-image-blocker</TT
3628 >, but meant for use from <A
3629 HREF="filter-file.html"
3630 >filters</A
3631 >.
3632     Auto will select the type of image that would have applied to the referring page, had it been an image.
3633    </P
3634 ></DD
3635 ><DT
3636 >Example usage:</DT
3637 ><DD
3638 ><P
3639 >    Built-in pattern:
3640    </P
3641 ><P
3642 >    <TABLE
3643 BORDER="0"
3644 BGCOLOR="#E0E0E0"
3645 WIDTH="90%"
3646 ><TR
3647 ><TD
3648 ><PRE
3649 CLASS="SCREEN"
3650 >+set-image-blocker{pattern}</PRE
3651 ></TD
3652 ></TR
3653 ></TABLE
3654 >
3655    </P
3656 ><P
3657 >    Redirect to the BSD devil:
3658    </P
3659 ><P
3660 >    <TABLE
3661 BORDER="0"
3662 BGCOLOR="#E0E0E0"
3663 WIDTH="90%"
3664 ><TR
3665 ><TD
3666 ><PRE
3667 CLASS="SCREEN"
3668 >+set-image-blocker{http://www.freebsd.org/gifs/dae_up3.gif}</PRE
3669 ></TD
3670 ></TR
3671 ></TABLE
3672 >
3673    </P
3674 ><P
3675 >    Redirect to the built-in pattern for better caching:
3676    </P
3677 ><P
3678 >    <TABLE
3679 BORDER="0"
3680 BGCOLOR="#E0E0E0"
3681 WIDTH="90%"
3682 ><TR
3683 ><TD
3684 ><PRE
3685 CLASS="SCREEN"
3686 >+set-image-blocker{http://config.privoxy.org/send-banner?type=pattern}</PRE
3687 ></TD
3688 ></TR
3689 ></TABLE
3690 >
3691    </P
3692 ></DD
3693 ></DL
3694 ></DIV
3695 ></DIV
3696 ><DIV
3697 CLASS="SECT3"
3698 ><H3
3699 CLASS="SECT3"
3700 ><A
3701 NAME="AEN2706">8.5.21. Summary</H3
3702 ><P
3703 > Note that many of these actions have the potential to cause a page to
3704  misbehave, possibly even not to display at all. There are many ways 
3705  a site designer may choose to design his site, and what HTTP header 
3706  content, and other criteria, he may depend on. There is no way to have hard
3707  and fast rules for all sites. See the <A
3708 HREF="appendix.html#ACTIONSANAT"
3709 >Appendix</A
3710 > for a brief example on troubleshooting
3711  actions.</P
3712 ></DIV
3713 ></DIV
3714 ><DIV
3715 CLASS="SECT2"
3716 ><H2
3717 CLASS="SECT2"
3718 ><A
3719 NAME="ALIASES">8.6. Aliases</H2
3720 ><P
3721 > Custom <SPAN
3722 CLASS="QUOTE"
3723 >"actions"</SPAN
3724 >, known to <SPAN
3725 CLASS="APPLICATION"
3726 >Privoxy</SPAN
3727 >
3728  as <SPAN
3729 CLASS="QUOTE"
3730 >"aliases"</SPAN
3731 >, can be defined by combining other actions.
3732  These can in turn be invoked just like the built-in actions.
3733  Currently, an alias name can contain any character except space, tab,
3734  <SPAN
3735 CLASS="QUOTE"
3736 >"="</SPAN
3737 >,
3738  <SPAN
3739 CLASS="QUOTE"
3740 >"{"</SPAN
3741 > and <SPAN
3742 CLASS="QUOTE"
3743 >"}"</SPAN
3744 >, but we <SPAN
3745 CLASS="emphasis"
3746 ><I
3747 CLASS="EMPHASIS"
3748 >strongly 
3749  recommend</I
3750 ></SPAN
3751 > that you only use <SPAN
3752 CLASS="QUOTE"
3753 >"a"</SPAN
3754 > to <SPAN
3755 CLASS="QUOTE"
3756 >"z"</SPAN
3757 >,
3758  <SPAN
3759 CLASS="QUOTE"
3760 >"0"</SPAN
3761 > to <SPAN
3762 CLASS="QUOTE"
3763 >"9"</SPAN
3764 >, <SPAN
3765 CLASS="QUOTE"
3766 >"+"</SPAN
3767 >, and <SPAN
3768 CLASS="QUOTE"
3769 >"-"</SPAN
3770 >.
3771  Alias names are not case sensitive, and are not required to start with a
3772  <SPAN
3773 CLASS="QUOTE"
3774 >"+"</SPAN
3775 > or <SPAN
3776 CLASS="QUOTE"
3777 >"-"</SPAN
3778 > sign, since they are merely textually
3779  expanded.</P
3780 ><P
3781 > Aliases can be used throughout the actions file, but they <SPAN
3782 CLASS="emphasis"
3783 ><I
3784 CLASS="EMPHASIS"
3785 >must be
3786  defined in a special section at the top of the file!</I
3787 ></SPAN
3788 >
3789  And there can only be one such section per actions file. Each actions file may
3790  have its own alias section, and the aliases defined in it are only visible
3791  within that file.</P
3792 ><P
3793 > There are two main reasons to use aliases: One is to save typing for frequently
3794  used combinations of actions, the other one is a gain in flexibility: If you
3795  decide once how you want to handle shops by defining an alias called
3796  <SPAN
3797 CLASS="QUOTE"
3798 >"shop"</SPAN
3799 >, you can later change your policy on shops in
3800  <SPAN
3801 CLASS="emphasis"
3802 ><I
3803 CLASS="EMPHASIS"
3804 >one</I
3805 ></SPAN
3806 > place, and your changes will take effect everywhere
3807  in the actions file where the <SPAN
3808 CLASS="QUOTE"
3809 >"shop"</SPAN
3810 > alias is used. Calling aliases
3811  by their purpose also makes your actions files more readable.</P
3812 ><P
3813 > Currently, there is one big drawback to using aliases, though:
3814  <SPAN
3815 CLASS="APPLICATION"
3816 >Privoxy</SPAN
3817 >'s built-in web-based action file
3818  editor honors aliases when reading the actions files, but it expands
3819  them before writing. So the effects of your aliases are of course preserved,
3820  but the aliases themselves are lost when you edit sections that use aliases
3821  with it.
3822  This is likely to change in future versions of <SPAN
3823 CLASS="APPLICATION"
3824 >Privoxy</SPAN
3825 >.</P
3826 ><P
3827 > Now let's define some aliases...</P
3828 ><P
3829 > <TABLE
3830 BORDER="0"
3831 BGCOLOR="#E0E0E0"
3832 WIDTH="100%"
3833 ><TR
3834 ><TD
3835 ><PRE
3836 CLASS="SCREEN"
3837 > # Useful custom aliases we can use later.
3838  #
3839  # Note the (required!) section header line and that this section
3840  # must be at the top of the actions file!
3841  #
3842  {{alias}}
3843
3844  # These aliases just save typing later:
3845  # (Note that some already use other aliases!)
3846  #
3847  +crunch-all-cookies = +crunch-incoming-cookies +crunch-outgoing-cookies
3848  -crunch-all-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies
3849  block-as-image      = +block +handle-as-image
3850  mercy-for-cookies   = -crunch-all-cookies -session-cookies-only
3851
3852  # These aliases define combinations of actions
3853  # that are useful for certain types of sites:
3854  #
3855  fragile     = -block -crunch-all-cookies -filter -fast-redirects -hide-referer -kill-popups
3856  shop        = -crunch-all-cookies -filter{popups} -kill-popups
3857
3858  # Short names for other aliases, for really lazy people ;-)
3859  #
3860  c0 = +crunch-all-cookies
3861  c1 = -crunch-all-cookies</PRE
3862 ></TD
3863 ></TR
3864 ></TABLE
3865 ></P
3866 ><P
3867 > ...and put them to use. These sections would appear in the lower part of an 
3868  actions file and define exceptions to the default actions (as specified further
3869  up for the <SPAN
3870 CLASS="QUOTE"
3871 >"/"</SPAN
3872 > pattern):</P
3873 ><P
3874 > <TABLE
3875 BORDER="0"
3876 BGCOLOR="#E0E0E0"
3877 WIDTH="100%"
3878 ><TR
3879 ><TD
3880 ><PRE
3881 CLASS="SCREEN"
3882 > # These sites are either very complex or very keen on
3883  # user data and require minimal interference to work:
3884  #
3885  {fragile}
3886  .office.microsoft.com
3887  .windowsupdate.microsoft.com
3888  .nytimes.com
3889
3890  # Shopping sites:
3891  # Allow cookies (for setting and retrieving your customer data)
3892  #           
3893  {shop}
3894  .quietpc.com
3895  .worldpay.com   # for quietpc.com
3896  .scan.co.uk
3897
3898  # These shops require pop-ups:
3899  #
3900  {shop -kill-popups -filter{popups}}
3901   .dabs.com
3902   .overclockers.co.uk</PRE
3903 ></TD
3904 ></TR
3905 ></TABLE
3906 ></P
3907 ><P
3908 > Aliases like <SPAN
3909 CLASS="QUOTE"
3910 >"shop"</SPAN
3911 > and <SPAN
3912 CLASS="QUOTE"
3913 >"fragile"</SPAN
3914 > are often used for 
3915  <SPAN
3916 CLASS="QUOTE"
3917 >"problem"</SPAN
3918 > sites that require some actions to be disabled 
3919  in order to function properly.</P
3920 ></DIV
3921 ><DIV
3922 CLASS="SECT2"
3923 ><H2
3924 CLASS="SECT2"
3925 ><A
3926 NAME="ACT-EXAMPLES">8.7. Actions Files Tutorial</H2
3927 ><P
3928 > The above chapters have shown <A
3929 HREF="actions-file.html"
3930 >which actions files
3931  there are and how they are organized</A
3932 >, how actions are <A
3933 HREF="actions-file.html#ACTIONS"
3934 >specified</A
3935 > and <A
3936 HREF="actions-file.html#ACTIONS-APPLY"
3937 >applied
3938  to URLs</A
3939 >, how <A
3940 HREF="actions-file.html#AF-PATTERNS"
3941 >patterns</A
3942 > work, and how to
3943  define and use <A
3944 HREF="actions-file.html#ALIASES"
3945 >aliases</A
3946 >. Now, let's look at an
3947  example <TT
3948 CLASS="FILENAME"
3949 >default.action</TT
3950 > and <TT
3951 CLASS="FILENAME"
3952 >user.action</TT
3953 >
3954  file and see how all these pieces come together:</P
3955 ><DIV
3956 CLASS="SECT3"
3957 ><H3
3958 CLASS="SECT3"
3959 ><A
3960 NAME="AEN2758">8.7.1. default.action</H3
3961 ><P
3962 >Every config file should start with a short comment stating its purpose:</P
3963 ><P
3964 > <TABLE
3965 BORDER="0"
3966 BGCOLOR="#E0E0E0"
3967 WIDTH="100%"
3968 ><TR
3969 ><TD
3970 ><PRE
3971 CLASS="SCREEN"
3972 ># Sample default.action file &#60;developers@privoxy.org&#62;</PRE
3973 ></TD
3974 ></TR
3975 ></TABLE
3976 ></P
3977 ><P
3978 >Then, since this is the <TT
3979 CLASS="FILENAME"
3980 >default.action</TT
3981 > file, the
3982 first section is a special section for internal use that you needn't
3983 change or worry about:</P
3984 ><P
3985 > <TABLE
3986 BORDER="0"
3987 BGCOLOR="#E0E0E0"
3988 WIDTH="100%"
3989 ><TR
3990 ><TD
3991 ><PRE
3992 CLASS="SCREEN"
3993 >##########################################################################
3994 # Settings -- Don't change! For internal Privoxy use ONLY.
3995 ##########################################################################
3996
3997 {{settings}}
3998 for-privoxy-version=3.0</PRE
3999 ></TD
4000 ></TR
4001 ></TABLE
4002 ></P
4003 ><P
4004 >After that comes the (optional) alias section. We'll use the example
4005 section from the above <A
4006 HREF="actions-file.html#ALIASES"
4007 >chapter on aliases</A
4008 >,
4009 that also explains why and how aliases are used:</P
4010 ><P
4011 > <TABLE
4012 BORDER="0"
4013 BGCOLOR="#E0E0E0"
4014 WIDTH="100%"
4015 ><TR
4016 ><TD
4017 ><PRE
4018 CLASS="SCREEN"
4019 >##########################################################################
4020 # Aliases
4021 ##########################################################################
4022 {{alias}}
4023
4024 # These aliases just save typing later:
4025 # (Note that some already use other aliases!)
4026 #
4027 +crunch-all-cookies = +crunch-incoming-cookies +crunch-outgoing-cookies
4028 -crunch-all-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies
4029 block-as-image      = +block +handle-as-image
4030 mercy-for-cookies   = -crunch-all-cookies -session-cookies-only
4031
4032 # These aliases define combinations of actions
4033 # that are useful for certain types of sites:
4034 #
4035 fragile     = -block -crunch-all-cookies -filter -fast-redirects -hide-referer -kill-popups
4036 shop        = mercy-for-cookies -filter{popups} -kill-popups</PRE
4037 ></TD
4038 ></TR
4039 ></TABLE
4040 ></P
4041 ><P
4042 > Now come the regular sections, i.e. sets of actions, accompanied
4043  by URL patterns to which they apply. Remember <SPAN
4044 CLASS="emphasis"
4045 ><I
4046 CLASS="EMPHASIS"
4047 >all actions
4048  are disabled when matching starts</I
4049 ></SPAN
4050 >, so we have to explicitly
4051  enable the ones we want.</P
4052 ><P
4053 > The first regular section is probably the most important. It has only
4054  one pattern, <SPAN
4055 CLASS="QUOTE"
4056 >"<TT
4057 CLASS="LITERAL"
4058 >/</TT
4059 >"</SPAN
4060 >, but this pattern
4061  <A
4062 HREF="actions-file.html#AF-PATTERNS"
4063 >matches all URLs</A
4064 >. Therefore, the
4065  set of actions used in this <SPAN
4066 CLASS="QUOTE"
4067 >"default"</SPAN
4068 > section <SPAN
4069 CLASS="emphasis"
4070 ><I
4071 CLASS="EMPHASIS"
4072 >will
4073  be applied to all requests as a start</I
4074 ></SPAN
4075 >. It can  be partly or
4076  wholly overridden by later matches further down this file, or in user.action,
4077  but it will still be largely responsible for your overall browsing
4078  experience.</P
4079 ><P
4080 > Again, at the start of matching, all actions are disabled, so there is
4081  no real need to disable any actions here, but we will do that nonetheless,
4082  to have a complete listing for your reference. (Remember: a <SPAN
4083 CLASS="QUOTE"
4084 >"+"</SPAN
4085 >
4086  preceding the action name enables the action, a <SPAN
4087 CLASS="QUOTE"
4088 >"-"</SPAN
4089 > disables!).
4090  Also note how this long line has been made more readable by splitting it into
4091  multiple lines with line continuation.</P
4092 ><P
4093 > <TABLE
4094 BORDER="0"
4095 BGCOLOR="#E0E0E0"
4096 WIDTH="100%"
4097 ><TR
4098 ><TD
4099 ><PRE
4100 CLASS="SCREEN"
4101 >##########################################################################
4102 # "Defaults" section:
4103 ##########################################################################
4104  { \
4105  -<A
4106 HREF="actions-file.html#ADD-HEADER"
4107 >add-header</A
4108 > \
4109  -<A
4110 HREF="actions-file.html#BLOCK"
4111 >block</A
4112 > \
4113  -<A
4114 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
4115 >crunch-incoming-cookies</A
4116 > \
4117  -<A
4118 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
4119 >crunch-outgoing-cookies</A
4120 > \
4121  +<A
4122 HREF="actions-file.html#DEANIMATE-GIFS"
4123 >deanimate-gifs</A
4124 > \
4125  -<A
4126 HREF="actions-file.html#DOWNGRADE-HTTP-VERSION"
4127 >downgrade-http-version</A
4128 > \
4129  +<A
4130 HREF="actions-file.html#FAST-REDIRECTS"
4131 >fast-redirects</A
4132 > \
4133  +<A
4134 HREF="actions-file.html#FILTER-HTML-ANNOYANCES"
4135 >filter{html-annoyances}</A
4136 > \
4137  +<A
4138 HREF="actions-file.html#FILTER-JS-ANNOYANCES"
4139 >filter{js-annoyances}</A
4140 > \
4141  -<A
4142 HREF="actions-file.html#FILTER-CONTENT-COOKIES"
4143 >filter{content-cookies}</A
4144 > \
4145  +<A
4146 HREF="actions-file.html#FILTER-POPUPS"
4147 >filter{popups}</A
4148 > \
4149  +<A
4150 HREF="actions-file.html#FILTER-WEBBUGS"
4151 >filter{webbugs}</A
4152 > \
4153  -<A
4154 HREF="actions-file.html#FILTER-REFRESH-TAGS"
4155 >filter{refresh-tags}</A
4156 > \
4157  -<A
4158 HREF="actions-file.html#FILTER-FUN"
4159 >filter{fun}</A
4160 > \
4161  +<A
4162 HREF="actions-file.html#FILTER-NIMDA"
4163 >filter{nimda}</A
4164 > \
4165  +<A
4166 HREF="actions-file.html#FILTER-BANNERS-BY-SIZE"
4167 >filter{banners-by-size}</A
4168 > \
4169  -<A
4170 HREF="actions-file.html#FILTER-BANNERS-BY-LINK"
4171 >filter{banners-by-link}</A
4172 > \
4173  -<A
4174 HREF="actions-file.html#FILTER-IMG-REORDER"
4175 >filter{img-reorder}</A
4176 > \
4177  -<A
4178 HREF="actions-file.html#FILTER-SHOCKWAVE-FLASH"
4179 >filter{shockwave-flash}</A
4180 > \
4181  -<A
4182 HREF="actions-file.html#FILTER-CRUDE-PARENTAL"
4183 >filter{crude-parental}</A
4184 > \
4185  -<A
4186 HREF="actions-file.html#FILTER-JS-EVENTS"
4187 >filter{js-events}</A
4188 > \
4189  -<A
4190 HREF="actions-file.html#HANDLE-AS-IMAGE"
4191 >handle-as-image</A
4192 > \
4193  +<A
4194 HREF="actions-file.html#HIDE-FORWARDED-FOR-HEADERS"
4195 >hide-forwarded-for-headers</A
4196 > \
4197  +<A
4198 HREF="actions-file.html#HIDE-FROM-HEADER"
4199 >hide-from-header{block}</A
4200 > \
4201  +<A
4202 HREF="actions-file.html#HIDE-REFERER"
4203 >hide-referrer{forge}</A
4204 > \
4205  -<A
4206 HREF="actions-file.html#HIDE-USER-AGENT"
4207 >hide-user-agent</A
4208 > \
4209  -<A
4210 HREF="actions-file.html#KILL-POPUPS"
4211 >kill-popups</A
4212 > \
4213  -<A
4214 HREF="actions-file.html#LIMIT-CONNECT"
4215 >limit-connect</A
4216 > \
4217  +<A
4218 HREF="actions-file.html#PREVENT-COMPRESSION"
4219 >prevent-compression</A
4220 > \
4221  -<A
4222 HREF="actions-file.html#SEND-VANILLA-WAFER"
4223 >send-vanilla-wafer</A
4224 > \
4225  -<A
4226 HREF="actions-file.html#SEND-WAFER"
4227 >send-wafer</A
4228 > \
4229  +<A
4230 HREF="actions-file.html#SESSION-COOKIES-ONLY"
4231 >session-cookies-only</A
4232 > \
4233  +<A
4234 HREF="actions-file.html#SET-IMAGE-BLOCKER"
4235 >set-image-blocker{pattern}</A
4236 > \
4237  }
4238  / # forward slash will match *all* potential URL patterns.</PRE
4239 ></TD
4240 ></TR
4241 ></TABLE
4242 ></P
4243 ><P
4244 > The default behavior is now set. Note that some actions, like not hiding
4245  the user agent, are part of a <SPAN
4246 CLASS="QUOTE"
4247 >"general policy"</SPAN
4248 > that applies
4249  universally and won't get any exceptions defined later. Other choices,
4250  like not blocking (which is <SPAN
4251 CLASS="emphasis"
4252 ><I
4253 CLASS="EMPHASIS"
4254 >understandably</I
4255 ></SPAN
4256 > the
4257  default!) need exceptions, i.e. we need to specify explicitly what we
4258  want to block in later sections.
4259  We will also want to make exceptions from our general pop-up-killing,
4260  and use our defined aliases for that.</P
4261 ><P
4262 > The first of our specialized sections is concerned with <SPAN
4263 CLASS="QUOTE"
4264 >"fragile"</SPAN
4265 >
4266  sites, i.e. sites that require minimum interference, because they are either
4267  very complex or very keen on tracking you (and have mechanisms in place that
4268  make them unusable for people who avoid being tracked). We will simply use
4269  our pre-defined <TT
4270 CLASS="LITERAL"
4271 >fragile</TT
4272 > alias instead of stating the list
4273  of actions explicitly:</P
4274 ><P
4275 > <TABLE
4276 BORDER="0"
4277 BGCOLOR="#E0E0E0"
4278 WIDTH="100%"
4279 ><TR
4280 ><TD
4281 ><PRE
4282 CLASS="SCREEN"
4283 >##########################################################################
4284 # Exceptions for sites that'll break under the default action set:
4285 ##########################################################################
4286
4287 # "Fragile" Use a minimum set of actions for these sites (see alias above):
4288 #
4289 { fragile }
4290 .office.microsoft.com           # surprise, surprise!
4291 .windowsupdate.microsoft.com</PRE
4292 ></TD
4293 ></TR
4294 ></TABLE
4295 ></P
4296 ><P
4297 > Shopping sites are not as fragile, but they typically
4298  require cookies to log in, and pop-up windows for shopping
4299  carts or item details. Again, we'll use a pre-defined alias:</P
4300 ><P
4301 > <TABLE
4302 BORDER="0"
4303 BGCOLOR="#E0E0E0"
4304 WIDTH="100%"
4305 ><TR
4306 ><TD
4307 ><PRE
4308 CLASS="SCREEN"
4309 ># Shopping sites:
4310 #
4311 { shop }
4312 .quietpc.com 
4313 .worldpay.com   # for quietpc.com
4314 .jungle.com
4315 .scan.co.uk</PRE
4316 ></TD
4317 ></TR
4318 ></TABLE
4319 ></P
4320 ><P
4321 > Then, there are sites which rely on pop-up windows (yuck!) to work.
4322  Since we made pop-up-killing our default above, we need to make exceptions
4323  now. <A
4324 HREF="http://www.mozilla.org/"
4325 TARGET="_top"
4326 >Mozilla</A
4327 > users, who
4328  can turn on smart handling of unwanted pop-ups in their browsers, can
4329  safely choose
4330  -<TT
4331 CLASS="LITERAL"
4332 ><A
4333 HREF="actions-file.html#FILTER-POPUPS"
4334 >filter{popups}</A
4335 ></TT
4336 > (and
4337  -<TT
4338 CLASS="LITERAL"
4339 ><A
4340 HREF="actions-file.html#KILL-POPUPS"
4341 >kill-popups</A
4342 ></TT
4343 >) above
4344  and hence don't need this section. Anyway, disabling an already disabled
4345  action doesn't hurt, so we'll define our exceptions regardless of what was
4346  chosen in the defaults section:</P
4347 ><P
4348 > <TABLE
4349 BORDER="0"
4350 BGCOLOR="#E0E0E0"
4351 WIDTH="100%"
4352 ><TR
4353 ><TD
4354 ><PRE
4355 CLASS="SCREEN"
4356 ># These sites require pop-ups too :( 
4357 #
4358 { -<A
4359 HREF="actions-file.html#KILL-POPUPS"
4360 >kill-popups</A
4361 > -<A
4362 HREF="actions-file.html#FILTER-POPUPS"
4363 >filter{popups}</A
4364 > }
4365 .dabs.com
4366 .overclockers.co.uk
4367 .deutsche-bank-24.de</PRE
4368 ></TD
4369 ></TR
4370 ></TABLE
4371 ></P
4372 ><P
4373 > The <TT
4374 CLASS="LITERAL"
4375 ><A
4376 HREF="actions-file.html#FAST-REDIRECTS"
4377 >fast-redirects</A
4378 ></TT
4379 >
4380  action, which we enabled per default above,  breaks some sites. So disable
4381  it for popular sites where we know it misbehaves:</P
4382 ><P
4383 > <TABLE
4384 BORDER="0"
4385 BGCOLOR="#E0E0E0"
4386 WIDTH="100%"
4387 ><TR
4388 ><TD
4389 ><PRE
4390 CLASS="SCREEN"
4391 >{ -<A
4392 HREF="actions-file.html#FAST-REDIRECTS"
4393 >fast-redirects</A
4394 > }
4395 login.yahoo.com
4396 edit.*.yahoo.com
4397 .google.com
4398 .altavista.com/.*(like|url|link):http
4399 .altavista.com/trans.*urltext=http
4400 .nytimes.com</PRE
4401 ></TD
4402 ></TR
4403 ></TABLE
4404 ></P
4405 ><P
4406 > It is important that <SPAN
4407 CLASS="APPLICATION"
4408 >Privoxy</SPAN
4409 > knows which
4410  URLs belong to images, so that <SPAN
4411 CLASS="emphasis"
4412 ><I
4413 CLASS="EMPHASIS"
4414 >if</I
4415 ></SPAN
4416 > they are to
4417  be blocked, a substitute image can be sent, rather than an HTML page.
4418  Contacting the remote site to find out is not an option, since it
4419  would destroy the loading time advantage of banner blocking, and it
4420  would feed the advertisers (in terms of money <SPAN
4421 CLASS="emphasis"
4422 ><I
4423 CLASS="EMPHASIS"
4424 >and</I
4425 ></SPAN
4426 >
4427  information). We can mark any URL as an image with the <TT
4428 CLASS="LITERAL"
4429 ><A
4430 HREF="actions-file.html#HANDLE-AS-IMAGE"
4431 >handle-as-image</A
4432 ></TT
4433 > action,
4434  and marking all URLs that end in a known image file extension is a
4435  good start:</P
4436 ><P
4437 > <TABLE
4438 BORDER="0"
4439 BGCOLOR="#E0E0E0"
4440 WIDTH="100%"
4441 ><TR
4442 ><TD
4443 ><PRE
4444 CLASS="SCREEN"
4445 >##########################################################################
4446 # Images:
4447 ##########################################################################
4448
4449 # Define which file types will be treated as images, in case they get
4450 # blocked further down this file:
4451 #
4452 { +<A
4453 HREF="actions-file.html#HANDLE-AS-IMAGE"
4454 >handle-as-image</A
4455 > }
4456 /.*\.(gif|jpe?g|png|bmp|ico)$</PRE
4457 ></TD
4458 ></TR
4459 ></TABLE
4460 ></P
4461 ><P
4462 > And then there are known banner sources. They often use scripts to
4463  generate the banners, so it won't be visible from the URL that the
4464  request is for an image. Hence we block them <SPAN
4465 CLASS="emphasis"
4466 ><I
4467 CLASS="EMPHASIS"
4468 >and</I
4469 ></SPAN
4470 >
4471  mark them as images in one go, with the help of our
4472  <TT
4473 CLASS="LITERAL"
4474 >block-as-image</TT
4475 > alias defined above. (We could of
4476  course just as well use <TT
4477 CLASS="LITERAL"
4478 >+<A
4479 HREF="actions-file.html#BLOCK"
4480 >block</A
4481 >
4482  +<A
4483 HREF="actions-file.html#HANDLE-AS-IMAGE"
4484 >handle-as-image</A
4485 ></TT
4486 > here.)
4487  Remember that the type of the replacement image is chosen by the
4488  <TT
4489 CLASS="LITERAL"
4490 ><A
4491 HREF="actions-file.html#SET-IMAGE-BLOCKER"
4492 >set-image-blocker</A
4493 ></TT
4494 >
4495  action. Since all URLs have matched the default section with its
4496  <TT
4497 CLASS="LITERAL"
4498 >+<A
4499 HREF="actions-file.html#SET-IMAGE-BLOCKER"
4500 >set-image-blocker</A
4501 >{pattern}</TT
4502 >
4503  action before, it still applies and needn't be repeated:</P
4504 ><P
4505 > <TABLE
4506 BORDER="0"
4507 BGCOLOR="#E0E0E0"
4508 WIDTH="100%"
4509 ><TR
4510 ><TD
4511 ><PRE
4512 CLASS="SCREEN"
4513 ># Known ad generators:
4514 #
4515 { block-as-image }
4516 ar.atwola.com 
4517 .ad.doubleclick.net
4518 .ad.*.doubleclick.net
4519 .a.yimg.com/(?:(?!/i/).)*$
4520 .a[0-9].yimg.com/(?:(?!/i/).)*$
4521 bs*.gsanet.com
4522 bs*.einets.com
4523 .qkimg.net</PRE
4524 ></TD
4525 ></TR
4526 ></TABLE
4527 ></P
4528 ><P
4529 > One of the most important jobs of <SPAN
4530 CLASS="APPLICATION"
4531 >Privoxy</SPAN
4532 >
4533  is to block banners. A huge bunch of them are already <SPAN
4534 CLASS="QUOTE"
4535 >"blocked"</SPAN
4536 >
4537  by the <TT
4538 CLASS="LITERAL"
4539 ><A
4540 HREF="actions-file.html#FILTER"
4541 >filter</A
4542 >{banners-by-size}</TT
4543 >
4544  action, which we enabled above, and which deletes the references to banner
4545  images from the pages while they are loaded, so the browser doesn't request
4546  them anymore, and hence they don't need to be blocked here. But this naturally
4547  doesn't catch all banners, and some people choose not to use filters, so we
4548  need a comprehensive list of patterns for banner URLs here, and apply the
4549  <TT
4550 CLASS="LITERAL"
4551 ><A
4552 HREF="actions-file.html#BLOCK"
4553 >block</A
4554 ></TT
4555 > action to them.</P
4556 ><P
4557 > First comes a bunch of generic patterns, which do most of the work, by
4558  matching typical domain and path name components of banners. Then comes
4559  a list of individual patterns for specific sites, which is omitted here
4560  to keep the example short:</P
4561 ><P
4562 > <TABLE
4563 BORDER="0"
4564 BGCOLOR="#E0E0E0"
4565 WIDTH="100%"
4566 ><TR
4567 ><TD
4568 ><PRE
4569 CLASS="SCREEN"
4570 >##########################################################################
4571 # Block these fine banners:
4572 ##########################################################################
4573 { <A
4574 HREF="actions-file.html#BLOCK"
4575 >+block</A
4576 > }
4577
4578 # Generic patterns:
4579
4580 ad*.
4581 .*ads.
4582 banner?.
4583 count*.
4584 /.*count(er)?\.(pl|cgi|exe|dll|asp|php[34]?)
4585 /(?:.*/)?(publicite|werbung|rekla(ma|me|am)|annonse|maino(kset|nta|s)?)/
4586
4587 # Site-specific patterns (abbreviated):
4588 #
4589 .hitbox.com</PRE
4590 ></TD
4591 ></TR
4592 ></TABLE
4593 ></P
4594 ><P
4595 > You wouldn't believe how many advertisers actually call their banner
4596  servers ads.<TT
4597 CLASS="REPLACEABLE"
4598 ><I
4599 >company</I
4600 ></TT
4601 >.com, or call the directory
4602  in which the banners are stored simply <SPAN
4603 CLASS="QUOTE"
4604 >"banners"</SPAN
4605 >. So the above
4606  generic patterns are surprisingly effective.</P
4607 ><P
4608 > But being very generic, they necessarily also catch URLs that we don't want
4609  to block. The pattern <TT
4610 CLASS="LITERAL"
4611 >.*ads.</TT
4612 > e.g. catches 
4613  <SPAN
4614 CLASS="QUOTE"
4615 >"nasty-<SPAN
4616 CLASS="emphasis"
4617 ><I
4618 CLASS="EMPHASIS"
4619 >ads</I
4620 ></SPAN
4621 >.nasty-corp.com"</SPAN
4622 > as intended,
4623  but also <SPAN
4624 CLASS="QUOTE"
4625 >"downlo<SPAN
4626 CLASS="emphasis"
4627 ><I
4628 CLASS="EMPHASIS"
4629 >ads</I
4630 ></SPAN
4631 >.sourcefroge.net"</SPAN
4632 > or
4633  <SPAN
4634 CLASS="QUOTE"
4635 >"<SPAN
4636 CLASS="emphasis"
4637 ><I
4638 CLASS="EMPHASIS"
4639 >ads</I
4640 ></SPAN
4641 >l.some-provider.net."</SPAN
4642 > So here come some
4643  well-known exceptions to the <TT
4644 CLASS="LITERAL"
4645 >+<A
4646 HREF="actions-file.html#BLOCK"
4647 >block</A
4648 ></TT
4649 >
4650  section above.</P
4651 ><P
4652 > Note that these are exceptions to exceptions from the default! Consider the URL
4653  <SPAN
4654 CLASS="QUOTE"
4655 >"downloads.sourcefroge.net"</SPAN
4656 >: Initially, all actions are deactivated,
4657  so it wouldn't get blocked. Then comes the defaults section, which matches the
4658  URL, but just deactivates the <TT
4659 CLASS="LITERAL"
4660 ><A
4661 HREF="actions-file.html#BLOCK"
4662 >block</A
4663 ></TT
4664 >
4665  action once again. Then it matches <TT
4666 CLASS="LITERAL"
4667 >.*ads.</TT
4668 >, an exception to the
4669  general non-blocking policy, and suddenly
4670  <TT
4671 CLASS="LITERAL"
4672 ><A
4673 HREF="actions-file.html#BLOCK"
4674 >+block</A
4675 ></TT
4676 > applies. And now, it'll match
4677  <TT
4678 CLASS="LITERAL"
4679 >.*loads.</TT
4680 >, where <TT
4681 CLASS="LITERAL"
4682 ><A
4683 HREF="actions-file.html#BLOCK"
4684 >-block</A
4685 ></TT
4686 >
4687  applies, so (unless it matches <SPAN
4688 CLASS="emphasis"
4689 ><I
4690 CLASS="EMPHASIS"
4691 >again</I
4692 ></SPAN
4693 > further down) it ends up
4694  with no <TT
4695 CLASS="LITERAL"
4696 ><A
4697 HREF="actions-file.html#BLOCK"
4698 >block</A
4699 ></TT
4700 > action applying.</P
4701 ><P
4702 > <TABLE
4703 BORDER="0"
4704 BGCOLOR="#E0E0E0"
4705 WIDTH="100%"
4706 ><TR
4707 ><TD
4708 ><PRE
4709 CLASS="SCREEN"
4710 >##########################################################################
4711 # Save some innocent victims of the above generic block patterns:
4712 ##########################################################################
4713
4714 # By domain:
4715
4716 { -<A
4717 HREF="actions-file.html#BLOCK"
4718 >block</A
4719 > }
4720 adv[io]*.  # (for advogato.org and advice.*)
4721 adsl.      # (has nothing to do with ads)
4722 ad[ud]*.   # (adult.* and add.*)
4723 .edu       # (universities don't host banners (yet!))
4724 .*loads.   # (downloads, uploads etc)
4725
4726 # By path:
4727 #
4728 /.*loads/
4729
4730 # Site-specific:
4731 #
4732 www.globalintersec.com/adv # (adv = advanced)
4733 www.ugu.com/sui/ugu/adv</PRE
4734 ></TD
4735 ></TR
4736 ></TABLE
4737 ></P
4738 ><P
4739 > Filtering source code can have nasty side effects,
4740  so make an exception for our friends at sourceforge.net,
4741  and all paths with <SPAN
4742 CLASS="QUOTE"
4743 >"cvs"</SPAN
4744 > in them. Note that
4745  <TT
4746 CLASS="LITERAL"
4747 >-<A
4748 HREF="actions-file.html#FILTER"
4749 >filter</A
4750 ></TT
4751 >
4752  disables <SPAN
4753 CLASS="emphasis"
4754 ><I
4755 CLASS="EMPHASIS"
4756 >all</I
4757 ></SPAN
4758 > filters in one fell swoop!</P
4759 ><P
4760 > <TABLE
4761 BORDER="0"
4762 BGCOLOR="#E0E0E0"
4763 WIDTH="100%"
4764 ><TR
4765 ><TD
4766 ><PRE
4767 CLASS="SCREEN"
4768 ># Don't filter code!
4769 #
4770 { -<A
4771 HREF="actions-file.html#FILTER"
4772 >filter</A
4773 > }
4774 /.*cvs
4775 .sourceforge.net</PRE
4776 ></TD
4777 ></TR
4778 ></TABLE
4779 ></P
4780 ><P
4781 > The actual <TT
4782 CLASS="FILENAME"
4783 >default.action</TT
4784 > is of course more
4785  comprehensive, but we hope this example made clear how it works.</P
4786 ></DIV
4787 ><DIV
4788 CLASS="SECT3"
4789 ><H3
4790 CLASS="SECT3"
4791 ><A
4792 NAME="AEN2915">8.7.2. user.action</H3
4793 ><P
4794 > So far we are painting with a broad brush by setting general policies,
4795  which would be a reasonable starting point for many people. Now, 
4796  you might want to be more specific and have customized rules that
4797  are more suitable to your personal habits and preferences. These would
4798  be for narrowly defined situations like your ISP or your bank, and should
4799  be placed in <TT
4800 CLASS="FILENAME"
4801 >user.action</TT
4802 >, which is parsed after all other 
4803  actions files and hence has the last word, over-riding any previously
4804  defined actions. <TT
4805 CLASS="FILENAME"
4806 >user.action</TT
4807 > is also a 
4808  <SPAN
4809 CLASS="emphasis"
4810 ><I
4811 CLASS="EMPHASIS"
4812 >safe</I
4813 ></SPAN
4814 > place for your personal settings, since
4815  <TT
4816 CLASS="FILENAME"
4817 >default.action</TT
4818 > is actively maintained by the
4819  <SPAN
4820 CLASS="APPLICATION"
4821 >Privoxy</SPAN
4822 > developers and you'll probably want
4823  to install updated versions from time to time.</P
4824 ><P
4825 > So let's look at a few examples of things that one might typically do in
4826  <TT
4827 CLASS="FILENAME"
4828 >user.action</TT
4829 >: </P
4830 ><P
4831 > <TABLE
4832 BORDER="0"
4833 BGCOLOR="#E0E0E0"
4834 WIDTH="100%"
4835 ><TR
4836 ><TD
4837 ><PRE
4838 CLASS="SCREEN"
4839 ># My user.action file. &#60;fred@foobar.com&#62;</PRE
4840 ></TD
4841 ></TR
4842 ></TABLE
4843 ></P
4844 ><P
4845 > As <A
4846 HREF="actions-file.html#ALIASES"
4847 >aliases</A
4848 > are local to the actions
4849  file that they are defined in, you can't use the ones from
4850  <TT
4851 CLASS="FILENAME"
4852 >default.action</TT
4853 >, unless you repeat them here:</P
4854 ><P
4855 > <TABLE
4856 BORDER="0"
4857 BGCOLOR="#E0E0E0"
4858 WIDTH="100%"
4859 ><TR
4860 ><TD
4861 ><PRE
4862 CLASS="SCREEN"
4863 ># (Re-)define aliases for this file:
4864 #
4865 {{alias}}
4866 -crunch-all-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies
4867 mercy-for-cookies   = -crunch-all-cookies -session-cookies-only
4868 fragile     = -block -crunch-all-cookies -filter -fast-redirects -hide-referer -kill-popups
4869 shop        = mercy-for-cookies -filter{popups} -kill-popups
4870 allow-ads   = -block -filter{banners-by-size} # (see below)</PRE
4871 ></TD
4872 ></TR
4873 ></TABLE
4874 >
4875  </P
4876 ><P
4877 > Say you have accounts on some sites that you visit regularly, and
4878  you don't want to have to log in manually each time. So you'd like
4879  to allow persistent cookies for these sites. The
4880  <TT
4881 CLASS="LITERAL"
4882 >mercy-for-cookies</TT
4883 > alias defined above does exactly
4884  that, i.e. it disables crunching of cookies in any direction, and
4885  processing of cookies to make them temporary.</P
4886 ><P
4887 > <TABLE
4888 BORDER="0"
4889 BGCOLOR="#E0E0E0"
4890 WIDTH="100%"
4891 ><TR
4892 ><TD
4893 ><PRE
4894 CLASS="SCREEN"
4895 >{ mercy-for-cookies }
4896 sunsolve.sun.com
4897 slashdot.org
4898 .yahoo.com
4899 .msdn.microsoft.com
4900 .redhat.com</PRE
4901 ></TD
4902 ></TR
4903 ></TABLE
4904 ></P
4905 ><P
4906 > Your bank needs popups and is allergic to some filter, but you don't
4907  know which, so you disable them all:</P
4908 ><P
4909 > <TABLE
4910 BORDER="0"
4911 BGCOLOR="#E0E0E0"
4912 WIDTH="100%"
4913 ><TR
4914 ><TD
4915 ><PRE
4916 CLASS="SCREEN"
4917 >{ -<A
4918 HREF="actions-file.html#FILTER"
4919 >filter</A
4920 > -<A
4921 HREF="actions-file.html#KILL-POPUPS"
4922 >kill-popups</A
4923 > }
4924 .your-home-banking-site.com</PRE
4925 ></TD
4926 ></TR
4927 ></TABLE
4928 ></P
4929 ><P
4930 > While browsing the web with <SPAN
4931 CLASS="APPLICATION"
4932 >Privoxy</SPAN
4933 > you
4934  noticed some ads that sneaked through, but you were too lazy to
4935  report them through our fine and easy <A
4936 HREF="contact.html"
4937 >feedback</A
4938 >
4939  system, so you have added them here:</P
4940 ><P
4941 > <TABLE
4942 BORDER="0"
4943 BGCOLOR="#E0E0E0"
4944 WIDTH="100%"
4945 ><TR
4946 ><TD
4947 ><PRE
4948 CLASS="SCREEN"
4949 >{ +<A
4950 HREF="actions-file.html#BLOCK"
4951 >block</A
4952 > }
4953 www.a-popular-site.com/some/unobvious/path
4954 another.popular.site.net/more/junk/here/</PRE
4955 ></TD
4956 ></TR
4957 ></TABLE
4958 ></P
4959 ><P
4960 > Note that, assuming the banners in the above example have regular image
4961  extensions (most do),
4962  <TT
4963 CLASS="LITERAL"
4964 >+<A
4965 HREF="actions-file.html#HANDLE-AS-IMAGE"
4966 >handle-as-image</A
4967 ></TT
4968 >
4969  need not be specified, since all URLs ending in these extensions will
4970  already have been tagged as images in the relevant section of 
4971  <TT
4972 CLASS="FILENAME"
4973 >default.action</TT
4974 > by now.</P
4975 ><P
4976 > Then you noticed that the default configuration breaks Forbes Magazine,
4977  but you were too lazy to find out which action is the culprit, and you
4978  were again too lazy to give <A
4979 HREF="contact.html"
4980 >feedback</A
4981 >, so
4982  you just used the <TT
4983 CLASS="LITERAL"
4984 >fragile</TT
4985 > alias on the site, and
4986  -- whoa! -- it worked:</P
4987 ><P
4988 ><TABLE
4989 BORDER="0"
4990 BGCOLOR="#E0E0E0"
4991 WIDTH="100%"
4992 ><TR
4993 ><TD
4994 ><PRE
4995 CLASS="SCREEN"
4996 >{ fragile }
4997 .forbes.com</PRE
4998 ></TD
4999 ></TR
5000 ></TABLE
5001 ></P
5002 ><P
5003 > You like the <SPAN
5004 CLASS="QUOTE"
5005 >"fun"</SPAN
5006 > text replacements in <TT
5007 CLASS="FILENAME"
5008 >default.filter</TT
5009 >,
5010  but it is disabled in the distributed actions file. (My colleagues on the team just
5011  don't have a sense of humour, that's why! ;-). So you'd like to turn it on in your private,
5012  update-safe config, once and for all:</P
5013 ><P
5014 ><TABLE
5015 BORDER="0"
5016 BGCOLOR="#E0E0E0"
5017 WIDTH="100%"
5018 ><TR
5019 ><TD
5020 ><PRE
5021 CLASS="SCREEN"
5022 >{ +<A
5023 HREF="actions-file.html#FILTER-FUN"
5024 >filter{fun}</A
5025 > }
5026 / # For ALL sites!</PRE
5027 ></TD
5028 ></TR
5029 ></TABLE
5030 ></P
5031 ><P
5032 > Note that the above is not really a good idea: There are exceptions
5033  to the filters in <TT
5034 CLASS="FILENAME"
5035 >default.action</TT
5036 > for things that
5037  really shouldn't be filtered, like code on CVS-&#62;Web interfaces. Since
5038  <TT
5039 CLASS="FILENAME"
5040 >user.action</TT
5041 > has the last word, these exceptions
5042  won't be valid for the <SPAN
5043 CLASS="QUOTE"
5044 >"fun"</SPAN
5045 > filtering specified here.</P
5046 ><P
5047 > Finally, you might think about how your favourite free websites are
5048  funded, and find that they rely on displaying banner advertisements
5049  to survive. So you might want to specifically allow banners for those
5050  sites that you feel provide value to you:</P
5051 ><P
5052 ><TABLE
5053 BORDER="0"
5054 BGCOLOR="#E0E0E0"
5055 WIDTH="100%"
5056 ><TR
5057 ><TD
5058 ><PRE
5059 CLASS="SCREEN"
5060 >{ allow-ads }
5061 .sourceforge.net
5062 .slashdot.org
5063 .osdn.net</PRE
5064 ></TD
5065 ></TR
5066 ></TABLE
5067 >   </P
5068 ><P
5069 > Note that <TT
5070 CLASS="LITERAL"
5071 >allow-ads</TT
5072 > has been aliased to 
5073  <TT
5074 CLASS="LITERAL"
5075 >-<A
5076 HREF="actions-file.html#BLOCK"
5077 >block</A
5078 ></TT
5079 >
5080  <TT
5081 CLASS="LITERAL"
5082 >-<A
5083 HREF="actions-file.html#FILTER-BANNERS-BY-SIZE"
5084 >filter{banners-by-size}</A
5085 ></TT
5086 >
5087  above.</P
5088 ></DIV
5089 ></DIV
5090 ></DIV
5091 ><DIV
5092 CLASS="NAVFOOTER"
5093 ><HR
5094 ALIGN="LEFT"
5095 WIDTH="100%"><TABLE
5096 SUMMARY="Footer navigation table"
5097 WIDTH="100%"
5098 BORDER="0"
5099 CELLPADDING="0"
5100 CELLSPACING="0"
5101 ><TR
5102 ><TD
5103 WIDTH="33%"
5104 ALIGN="left"
5105 VALIGN="top"
5106 ><A
5107 HREF="config.html"
5108 ACCESSKEY="P"
5109 >Prev</A
5110 ></TD
5111 ><TD
5112 WIDTH="34%"
5113 ALIGN="center"
5114 VALIGN="top"
5115 ><A
5116 HREF="index.html"
5117 ACCESSKEY="H"
5118 >Home</A
5119 ></TD
5120 ><TD
5121 WIDTH="33%"
5122 ALIGN="right"
5123 VALIGN="top"
5124 ><A
5125 HREF="filter-file.html"
5126 ACCESSKEY="N"
5127 >Next</A
5128 ></TD
5129 ></TR
5130 ><TR
5131 ><TD
5132 WIDTH="33%"
5133 ALIGN="left"
5134 VALIGN="top"
5135 >The Main Configuration File</TD
5136 ><TD
5137 WIDTH="34%"
5138 ALIGN="center"
5139 VALIGN="top"
5140 >&nbsp;</TD
5141 ><TD
5142 WIDTH="33%"
5143 ALIGN="right"
5144 VALIGN="top"
5145 >The Filter File</TD
5146 ></TR
5147 ></TABLE
5148 ></DIV
5149 ></BODY
5150 ></HTML
5151 >