Syncing with recent sgml updates.
[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.0.4 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="Filter Files"
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.0.4 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"
77 ></A
78 >8. Actions Files</H1
79 ><P
80 > The actions files are used to define what actions
81  <SPAN
82 CLASS="APPLICATION"
83 >Privoxy</SPAN
84 > takes for which URLs, and thus determine
85  how ad images, cookies and various other aspects of HTTP content and
86  transactions are handled, and on which sites (or even parts thereof). There 
87  are three such files included with <SPAN
88 CLASS="APPLICATION"
89 >Privoxy</SPAN
90 >
91  with differing purposes:
92  </P
93 ><P
94 >  <P
95 ></P
96 ><UL
97 ><LI
98 ><P
99 >     <TT
100 CLASS="FILENAME"
101 >default.action</TT
102 > - is the primary action file 
103      that sets the initial values for all actions. It is intended to 
104      provide a base level of functionality for
105      <SPAN
106 CLASS="APPLICATION"
107 >Privoxy's</SPAN
108 > array of features. So it is 
109      a set of broad rules that should work reasonably well for users everywhere.
110      This is the file that the developers are keeping updated, and <A
111 HREF="installation.html#INSTALLATION-KEEPUPDATED"
112 >making available to users</A
113 >.
114     </P
115 ></LI
116 ><LI
117 ><P
118 >     <TT
119 CLASS="FILENAME"
120 >user.action</TT
121 > - is intended to be for local site 
122      preferences and exceptions. As an example, if your ISP or your bank
123      has specific requirements, and need special handling, this kind of 
124      thing should go here. This file will not be upgraded.
125     </P
126 ></LI
127 ><LI
128 ><P
129 >     <TT
130 CLASS="FILENAME"
131 >standard.action</TT
132 > - is used by the web based editor, 
133      to set various pre-defined sets of rules for the default actions section
134      in <TT
135 CLASS="FILENAME"
136 >default.action</TT
137 >. These have increasing levels of
138      aggressiveness <SPAN
139 CLASS="emphasis"
140 ><I
141 CLASS="EMPHASIS"
142 >and have no influence on your browsing unless
143      you select them explicitly in the editor</I
144 ></SPAN
145 >. It is not recommend
146      to edit this file.
147     </P
148 ><P
149 >     The default profiles, and their associated actions, as pre-defined in
150      <TT
151 CLASS="FILENAME"
152 >standard.action</TT
153 > are:
154     </P
155 ><P
156 >    <DIV
157 CLASS="TABLE"
158 ><A
159 NAME="AEN1798"
160 ></A
161 ><P
162 ><B
163 >Table 1. Default Configurations</B
164 ></P
165 ><TABLE
166 BORDER="1"
167 CLASS="CALSTABLE"
168 ><THEAD
169 ><TR
170 ><TH
171 WIDTH="25%"
172 ALIGN="LEFT"
173 VALIGN="TOP"
174 >Feature</TH
175 ><TH
176 WIDTH="25%"
177 ALIGN="LEFT"
178 VALIGN="TOP"
179 >Cautious</TH
180 ><TH
181 WIDTH="25%"
182 ALIGN="LEFT"
183 VALIGN="TOP"
184 >Medium</TH
185 ><TH
186 WIDTH="25%"
187 ALIGN="LEFT"
188 VALIGN="TOP"
189 >Adventuresome</TH
190 ></TR
191 ></THEAD
192 ><TBODY
193 ><TR
194 ><TD
195 WIDTH="25%"
196 ALIGN="LEFT"
197 VALIGN="TOP"
198 >Ad-blocking by URL</TD
199 ><TD
200 WIDTH="25%"
201 ALIGN="LEFT"
202 VALIGN="TOP"
203 >yes</TD
204 ><TD
205 WIDTH="25%"
206 ALIGN="LEFT"
207 VALIGN="TOP"
208 >yes</TD
209 ><TD
210 WIDTH="25%"
211 ALIGN="LEFT"
212 VALIGN="TOP"
213 >yes</TD
214 ></TR
215 ><TR
216 ><TD
217 WIDTH="25%"
218 ALIGN="LEFT"
219 VALIGN="TOP"
220 >Ad-filtering by size</TD
221 ><TD
222 WIDTH="25%"
223 ALIGN="LEFT"
224 VALIGN="TOP"
225 >yes</TD
226 ><TD
227 WIDTH="25%"
228 ALIGN="LEFT"
229 VALIGN="TOP"
230 >yes</TD
231 ><TD
232 WIDTH="25%"
233 ALIGN="LEFT"
234 VALIGN="TOP"
235 >yes</TD
236 ></TR
237 ><TR
238 ><TD
239 WIDTH="25%"
240 ALIGN="LEFT"
241 VALIGN="TOP"
242 >GIF de-animation</TD
243 ><TD
244 WIDTH="25%"
245 ALIGN="LEFT"
246 VALIGN="TOP"
247 >no</TD
248 ><TD
249 WIDTH="25%"
250 ALIGN="LEFT"
251 VALIGN="TOP"
252 >yes</TD
253 ><TD
254 WIDTH="25%"
255 ALIGN="LEFT"
256 VALIGN="TOP"
257 >yes</TD
258 ></TR
259 ><TR
260 ><TD
261 WIDTH="25%"
262 ALIGN="LEFT"
263 VALIGN="TOP"
264 >Referer forging</TD
265 ><TD
266 WIDTH="25%"
267 ALIGN="LEFT"
268 VALIGN="TOP"
269 >no</TD
270 ><TD
271 WIDTH="25%"
272 ALIGN="LEFT"
273 VALIGN="TOP"
274 >yes</TD
275 ><TD
276 WIDTH="25%"
277 ALIGN="LEFT"
278 VALIGN="TOP"
279 >yes</TD
280 ></TR
281 ><TR
282 ><TD
283 WIDTH="25%"
284 ALIGN="LEFT"
285 VALIGN="TOP"
286 >Cookie handling</TD
287 ><TD
288 WIDTH="25%"
289 ALIGN="LEFT"
290 VALIGN="TOP"
291 >none</TD
292 ><TD
293 WIDTH="25%"
294 ALIGN="LEFT"
295 VALIGN="TOP"
296 >session-only</TD
297 ><TD
298 WIDTH="25%"
299 ALIGN="LEFT"
300 VALIGN="TOP"
301 >kill</TD
302 ></TR
303 ><TR
304 ><TD
305 WIDTH="25%"
306 ALIGN="LEFT"
307 VALIGN="TOP"
308 >Pop-up killing</TD
309 ><TD
310 WIDTH="25%"
311 ALIGN="LEFT"
312 VALIGN="TOP"
313 >unsolicited</TD
314 ><TD
315 WIDTH="25%"
316 ALIGN="LEFT"
317 VALIGN="TOP"
318 >unsolicited</TD
319 ><TD
320 WIDTH="25%"
321 ALIGN="LEFT"
322 VALIGN="TOP"
323 >all</TD
324 ></TR
325 ><TR
326 ><TD
327 WIDTH="25%"
328 ALIGN="LEFT"
329 VALIGN="TOP"
330 >Fast redirects</TD
331 ><TD
332 WIDTH="25%"
333 ALIGN="LEFT"
334 VALIGN="TOP"
335 >no</TD
336 ><TD
337 WIDTH="25%"
338 ALIGN="LEFT"
339 VALIGN="TOP"
340 >no</TD
341 ><TD
342 WIDTH="25%"
343 ALIGN="LEFT"
344 VALIGN="TOP"
345 >yes</TD
346 ></TR
347 ><TR
348 ><TD
349 WIDTH="25%"
350 ALIGN="LEFT"
351 VALIGN="TOP"
352 >HTML taming</TD
353 ><TD
354 WIDTH="25%"
355 ALIGN="LEFT"
356 VALIGN="TOP"
357 >yes</TD
358 ><TD
359 WIDTH="25%"
360 ALIGN="LEFT"
361 VALIGN="TOP"
362 >yes</TD
363 ><TD
364 WIDTH="25%"
365 ALIGN="LEFT"
366 VALIGN="TOP"
367 >yes</TD
368 ></TR
369 ><TR
370 ><TD
371 WIDTH="25%"
372 ALIGN="LEFT"
373 VALIGN="TOP"
374 >JavaScript taming</TD
375 ><TD
376 WIDTH="25%"
377 ALIGN="LEFT"
378 VALIGN="TOP"
379 >yes</TD
380 ><TD
381 WIDTH="25%"
382 ALIGN="LEFT"
383 VALIGN="TOP"
384 >yes</TD
385 ><TD
386 WIDTH="25%"
387 ALIGN="LEFT"
388 VALIGN="TOP"
389 >yes</TD
390 ></TR
391 ><TR
392 ><TD
393 WIDTH="25%"
394 ALIGN="LEFT"
395 VALIGN="TOP"
396 >Web-bug killing</TD
397 ><TD
398 WIDTH="25%"
399 ALIGN="LEFT"
400 VALIGN="TOP"
401 >yes</TD
402 ><TD
403 WIDTH="25%"
404 ALIGN="LEFT"
405 VALIGN="TOP"
406 >yes</TD
407 ><TD
408 WIDTH="25%"
409 ALIGN="LEFT"
410 VALIGN="TOP"
411 >yes</TD
412 ></TR
413 ><TR
414 ><TD
415 WIDTH="25%"
416 ALIGN="LEFT"
417 VALIGN="TOP"
418 >Fun text replacements</TD
419 ><TD
420 WIDTH="25%"
421 ALIGN="LEFT"
422 VALIGN="TOP"
423 >no</TD
424 ><TD
425 WIDTH="25%"
426 ALIGN="LEFT"
427 VALIGN="TOP"
428 >no</TD
429 ><TD
430 WIDTH="25%"
431 ALIGN="LEFT"
432 VALIGN="TOP"
433 >yes</TD
434 ></TR
435 ><TR
436 ><TD
437 WIDTH="25%"
438 ALIGN="LEFT"
439 VALIGN="TOP"
440 >Image tag reordering</TD
441 ><TD
442 WIDTH="25%"
443 ALIGN="LEFT"
444 VALIGN="TOP"
445 >no</TD
446 ><TD
447 WIDTH="25%"
448 ALIGN="LEFT"
449 VALIGN="TOP"
450 >no</TD
451 ><TD
452 WIDTH="25%"
453 ALIGN="LEFT"
454 VALIGN="TOP"
455 >yes</TD
456 ></TR
457 ><TR
458 ><TD
459 WIDTH="25%"
460 ALIGN="LEFT"
461 VALIGN="TOP"
462 >Ad-filtering by link</TD
463 ><TD
464 WIDTH="25%"
465 ALIGN="LEFT"
466 VALIGN="TOP"
467 >no</TD
468 ><TD
469 WIDTH="25%"
470 ALIGN="LEFT"
471 VALIGN="TOP"
472 >no</TD
473 ><TD
474 WIDTH="25%"
475 ALIGN="LEFT"
476 VALIGN="TOP"
477 >yes</TD
478 ></TR
479 ><TR
480 ><TD
481 WIDTH="25%"
482 ALIGN="LEFT"
483 VALIGN="TOP"
484 >Demoronizer</TD
485 ><TD
486 WIDTH="25%"
487 ALIGN="LEFT"
488 VALIGN="TOP"
489 >no</TD
490 ><TD
491 WIDTH="25%"
492 ALIGN="LEFT"
493 VALIGN="TOP"
494 >no</TD
495 ><TD
496 WIDTH="25%"
497 ALIGN="LEFT"
498 VALIGN="TOP"
499 >yes</TD
500 ></TR
501 ></TBODY
502 ></TABLE
503 ></DIV
504 >
505     </P
506 ></LI
507 ></UL
508 >
509  </P
510 ><P
511 > The list of actions files to be used are defined in the main configuration 
512  file, and are processed in the order they are defined (e.g.
513  <TT
514 CLASS="FILENAME"
515 >default.action</TT
516 > is typically process before
517  <TT
518 CLASS="FILENAME"
519 >user.action</TT
520 >). The content of these can all be viewed and
521  edited from <A
522 HREF="http://config.privoxy.org/show-status"
523 TARGET="_top"
524 >http://config.privoxy.org/show-status</A
525 >.</P
526 ><P
527 > An actions file typically has multiple sections. If you want to use
528  <SPAN
529 CLASS="QUOTE"
530 >"aliases"</SPAN
531 > in an actions file, you have to place the (optional)
532  <A
533 HREF="actions-file.html#ALIASES"
534 >alias section</A
535 > at the top of that file.
536  Then comes the default set of rules which will apply universally to all
537  sites and pages (be <SPAN
538 CLASS="emphasis"
539 ><I
540 CLASS="EMPHASIS"
541 >very careful</I
542 ></SPAN
543 > with using such a
544  universal set in <TT
545 CLASS="FILENAME"
546 >user.action</TT
547 > or any other actions file after 
548  <TT
549 CLASS="FILENAME"
550 >default.action</TT
551 >, because it will override the result
552  from consulting any previous file). And then below that,
553  exceptions to the defined universal policies. You can regard
554  <TT
555 CLASS="FILENAME"
556 >user.action</TT
557 > as an appendix to <TT
558 CLASS="FILENAME"
559 >default.action</TT
560 >,
561  with the advantage that is a separate file, which makes preserving your
562  personal settings across <SPAN
563 CLASS="APPLICATION"
564 >Privoxy</SPAN
565 > upgrades easier.</P
566 ><P
567
568  Actions can be used to block anything you want, including ads, banners, or
569  just some obnoxious URL that you would rather not see. Cookies can be accepted
570  or rejected, or accepted only during the current browser session (i.e. not
571  written to disk), content can be modified, JavaScripts tamed, user-tracking
572  fooled, and much more. See below for a <A
573 HREF="actions-file.html#ACTIONS"
574 >complete list
575  of actions</A
576 >.</P
577 ><DIV
578 CLASS="SECT2"
579 ><H2
580 CLASS="SECT2"
581 ><A
582 NAME="AEN1897"
583 ></A
584 >8.1. Finding the Right Mix</H2
585 ><P
586 > Note that some <A
587 HREF="actions-file.html#ACTIONS"
588 >actions</A
589 >, like cookie suppression
590  or script disabling, may render some sites unusable that rely on these
591  techniques to work properly. Finding the right mix of actions is not always easy and
592  certainly a matter of personal taste. In general, it can be said that the more
593  <SPAN
594 CLASS="QUOTE"
595 >"aggressive"</SPAN
596 > your default settings (in the top section of the
597  actions file) are, the more exceptions for <SPAN
598 CLASS="QUOTE"
599 >"trusted"</SPAN
600 > sites you
601  will have to make later. If, for example, you want to crunch all cookies per
602  default, you'll have to make exceptions from that rule for sites that you
603  regularly use and that require cookies for actually useful puposes, like maybe
604  your bank, favorite shop, or newspaper. </P
605 ><P
606 > We have tried to provide you with reasonable rules to start from in the
607  distribution actions files. But there is no general rule of thumb on these
608  things. There just are too many variables, and sites are constantly changing.
609  Sooner or later you will want to change the rules (and read this chapter again :).</P
610 ></DIV
611 ><DIV
612 CLASS="SECT2"
613 ><H2
614 CLASS="SECT2"
615 ><A
616 NAME="AEN1904"
617 ></A
618 >8.2. How to Edit</H2
619 ><P
620 > The easiest way to edit the actions files is with a browser by
621  using our browser-based editor, which can be reached from <A
622 HREF="http://config.privoxy.org/show-status"
623 TARGET="_top"
624 >http://config.privoxy.org/show-status</A
625 >.
626  The editor allows both fine-grained control over every single feature on a
627  per-URL basis, and easy choosing from wholesale sets of defaults like
628  <SPAN
629 CLASS="QUOTE"
630 >"Cautious"</SPAN
631 >, <SPAN
632 CLASS="QUOTE"
633 >"Medium"</SPAN
634 > or <SPAN
635 CLASS="QUOTE"
636 >"Adventuresome"</SPAN
637 >.
638  Warning: the <SPAN
639 CLASS="QUOTE"
640 >"Adventuresome"</SPAN
641 > setting is not only more aggressive, 
642  but includes settings that are fun and subversive, and which some may find of 
643  dubious merit!</P
644 ><P
645 > If you prefer plain text editing to GUIs, you can of course also directly edit the
646  the actions files. Look at <TT
647 CLASS="FILENAME"
648 >default.action</TT
649 > which is richly
650  commented.</P
651 ></DIV
652 ><DIV
653 CLASS="SECT2"
654 ><H2
655 CLASS="SECT2"
656 ><A
657 NAME="ACTIONS-APPLY"
658 ></A
659 >8.3. How Actions are Applied to URLs</H2
660 ><P
661 > Actions files are divided into sections. There are special sections,
662  like the <SPAN
663 CLASS="QUOTE"
664 >"<A
665 HREF="actions-file.html#ALIASES"
666 >alias</A
667 >"</SPAN
668 > sections which will
669  be discussed later. For now let's concentrate on regular sections: They have a
670  heading line (often split up to multiple lines for readability) which consist
671  of a list of actions, separated by whitespace and enclosed in curly braces.
672  Below that, there is a list of URL patterns, each on a separate line.</P
673 ><P
674 > To determine which actions apply to a request, the URL of the request is
675  compared to all patterns in each <SPAN
676 CLASS="QUOTE"
677 >"action file"</SPAN
678 > file. Every time it matches, the list of
679  applicable actions for the URL is incrementally updated, using the heading
680  of the section in which the pattern is located. If multiple matches for
681  the same URL set the same action differently, the last match wins. If not, 
682  the effects are aggregated. E.g. a URL might match a regular section with 
683  a heading line of <TT
684 CLASS="LITERAL"
685 >{ 
686  +<A
687 HREF="actions-file.html#HANDLE-AS-IMAGE"
688 >handle-as-image</A
689 > }</TT
690 >,
691  then later another one with just <TT
692 CLASS="LITERAL"
693 >{
694  +<A
695 HREF="actions-file.html#BLOCK"
696 >block</A
697 > }</TT
698 >, resulting
699  in <SPAN
700 CLASS="emphasis"
701 ><I
702 CLASS="EMPHASIS"
703 >both</I
704 ></SPAN
705 > actions to apply.</P
706 ><P
707 > You can trace this process for any given URL by visiting <A
708 HREF="http://config.privoxy.org/show-url-info"
709 TARGET="_top"
710 >http://config.privoxy.org/show-url-info</A
711 >.</P
712 ><P
713 > More detail on this is provided in the Appendix, <A
714 HREF="appendix.html#ACTIONSANAT"
715 > Anatomy of an Action</A
716 >.</P
717 ></DIV
718 ><DIV
719 CLASS="SECT2"
720 ><H2
721 CLASS="SECT2"
722 ><A
723 NAME="AF-PATTERNS"
724 ></A
725 >8.4. Patterns</H2
726 ><P
727
728  As mentioned, <SPAN
729 CLASS="APPLICATION"
730 >Privoxy</SPAN
731 > uses <SPAN
732 CLASS="QUOTE"
733 >"patterns"</SPAN
734 >
735  to determine what actions might apply to which sites and pages your browser 
736  attempts to access. These <SPAN
737 CLASS="QUOTE"
738 >"patterns"</SPAN
739 > use wild card type 
740  <SPAN
741 CLASS="emphasis"
742 ><I
743 CLASS="EMPHASIS"
744 >pattern</I
745 ></SPAN
746 > matching to achieve a high degree of 
747  flexibility. This allows one expression to be expanded and potentially match
748  against many similar patterns.</P
749 ><P
750 > Generally, a <SPAN
751 CLASS="APPLICATION"
752 >Privoxy</SPAN
753 > pattern has the form
754  <TT
755 CLASS="LITERAL"
756 >&#60;domain&#62;/&#60;path&#62;</TT
757 >, where both the
758  <TT
759 CLASS="LITERAL"
760 >&#60;domain&#62;</TT
761 > and <TT
762 CLASS="LITERAL"
763 >&#60;path&#62;</TT
764 > are
765  optional. (This is why the special <TT
766 CLASS="LITERAL"
767 >/</TT
768 > pattern matches all
769  URLs). Note that the protocol portion of the URL pattern (e.g.
770  <TT
771 CLASS="LITERAL"
772 >http://</TT
773 >) should <SPAN
774 CLASS="emphasis"
775 ><I
776 CLASS="EMPHASIS"
777 >not</I
778 ></SPAN
779 > be included in
780  the pattern. This is assumed already!</P
781 ><P
782 ></P
783 ><DIV
784 CLASS="VARIABLELIST"
785 ><DL
786 ><DT
787 ><TT
788 CLASS="LITERAL"
789 >www.example.com/</TT
790 ></DT
791 ><DD
792 ><P
793 >    is a domain-only pattern and will match any request to <TT
794 CLASS="LITERAL"
795 >www.example.com</TT
796 >,
797     regardless of which document on that server is requested.
798    </P
799 ></DD
800 ><DT
801 ><TT
802 CLASS="LITERAL"
803 >www.example.com</TT
804 ></DT
805 ><DD
806 ><P
807 >    means exactly the same. For domain-only patterns, the trailing <TT
808 CLASS="LITERAL"
809 >/</TT
810 > may
811     be omitted.
812    </P
813 ></DD
814 ><DT
815 ><TT
816 CLASS="LITERAL"
817 >www.example.com/index.html</TT
818 ></DT
819 ><DD
820 ><P
821 >    matches only the single document <TT
822 CLASS="LITERAL"
823 >/index.html</TT
824 >
825     on <TT
826 CLASS="LITERAL"
827 >www.example.com</TT
828 >.
829    </P
830 ></DD
831 ><DT
832 ><TT
833 CLASS="LITERAL"
834 >/index.html</TT
835 ></DT
836 ><DD
837 ><P
838 >    matches the document <TT
839 CLASS="LITERAL"
840 >/index.html</TT
841 >, regardless of the domain,
842     i.e. on <SPAN
843 CLASS="emphasis"
844 ><I
845 CLASS="EMPHASIS"
846 >any</I
847 ></SPAN
848 > web server.
849    </P
850 ></DD
851 ><DT
852 ><TT
853 CLASS="LITERAL"
854 >index.html</TT
855 ></DT
856 ><DD
857 ><P
858 >    matches nothing, since it would be  interpreted as a domain name and
859     there is no top-level domain called <TT
860 CLASS="LITERAL"
861 >.html</TT
862 >.
863    </P
864 ></DD
865 ></DL
866 ></DIV
867 ><DIV
868 CLASS="SECT3"
869 ><H3
870 CLASS="SECT3"
871 ><A
872 NAME="AEN1978"
873 ></A
874 >8.4.1. The Domain Pattern</H3
875 ><P
876 > The matching of the domain part offers some flexible options: if the
877  domain starts or ends with a dot, it becomes unanchored at that end. 
878  For example:</P
879 ><P
880 ></P
881 ><DIV
882 CLASS="VARIABLELIST"
883 ><DL
884 ><DT
885 ><TT
886 CLASS="LITERAL"
887 >.example.com</TT
888 ></DT
889 ><DD
890 ><P
891 >    matches any domain that <SPAN
892 CLASS="emphasis"
893 ><I
894 CLASS="EMPHASIS"
895 >ENDS</I
896 ></SPAN
897 > in
898     <TT
899 CLASS="LITERAL"
900 >.example.com</TT
901 >
902    </P
903 ></DD
904 ><DT
905 ><TT
906 CLASS="LITERAL"
907 >www.</TT
908 ></DT
909 ><DD
910 ><P
911 >    matches any domain that <SPAN
912 CLASS="emphasis"
913 ><I
914 CLASS="EMPHASIS"
915 >STARTS</I
916 ></SPAN
917 > with
918     <TT
919 CLASS="LITERAL"
920 >www.</TT
921 >
922    </P
923 ></DD
924 ><DT
925 ><TT
926 CLASS="LITERAL"
927 >.example.</TT
928 ></DT
929 ><DD
930 ><P
931 >    matches any domain that <SPAN
932 CLASS="emphasis"
933 ><I
934 CLASS="EMPHASIS"
935 >CONTAINS</I
936 ></SPAN
937 > <TT
938 CLASS="LITERAL"
939 >.example.</TT
940 >
941     (Correctly speaking: It matches any FQDN that contains <TT
942 CLASS="LITERAL"
943 >example</TT
944 > as a domain.)
945    </P
946 ></DD
947 ></DL
948 ></DIV
949 ><P
950 > Additionally, there are wild-cards that you can use in the domain names
951  themselves. They work pretty similar to shell wild-cards: <SPAN
952 CLASS="QUOTE"
953 >"*"</SPAN
954 >
955  stands for zero or more arbitrary characters, <SPAN
956 CLASS="QUOTE"
957 >"?"</SPAN
958 > stands for
959  any single character, you can define character classes in square
960  brackets and all of that can be freely mixed:</P
961 ><P
962 ></P
963 ><DIV
964 CLASS="VARIABLELIST"
965 ><DL
966 ><DT
967 ><TT
968 CLASS="LITERAL"
969 >ad*.example.com</TT
970 ></DT
971 ><DD
972 ><P
973 >    matches <SPAN
974 CLASS="QUOTE"
975 >"adserver.example.com"</SPAN
976 >, 
977     <SPAN
978 CLASS="QUOTE"
979 >"ads.example.com"</SPAN
980 >, etc but not <SPAN
981 CLASS="QUOTE"
982 >"sfads.example.com"</SPAN
983 >
984    </P
985 ></DD
986 ><DT
987 ><TT
988 CLASS="LITERAL"
989 >*ad*.example.com</TT
990 ></DT
991 ><DD
992 ><P
993 >    matches all of the above, and then some.
994    </P
995 ></DD
996 ><DT
997 ><TT
998 CLASS="LITERAL"
999 >.?pix.com</TT
1000 ></DT
1001 ><DD
1002 ><P
1003 >    matches <TT
1004 CLASS="LITERAL"
1005 >www.ipix.com</TT
1006 >,
1007     <TT
1008 CLASS="LITERAL"
1009 >pictures.epix.com</TT
1010 >, <TT
1011 CLASS="LITERAL"
1012 >a.b.c.d.e.upix.com</TT
1013 > etc. 
1014    </P
1015 ></DD
1016 ><DT
1017 ><TT
1018 CLASS="LITERAL"
1019 >www[1-9a-ez].example.c*</TT
1020 ></DT
1021 ><DD
1022 ><P
1023 >     matches <TT
1024 CLASS="LITERAL"
1025 >www1.example.com</TT
1026 >, 
1027      <TT
1028 CLASS="LITERAL"
1029 >www4.example.cc</TT
1030 >, <TT
1031 CLASS="LITERAL"
1032 >wwwd.example.cy</TT
1033 >, 
1034      <TT
1035 CLASS="LITERAL"
1036 >wwwz.example.com</TT
1037 > etc., but <SPAN
1038 CLASS="emphasis"
1039 ><I
1040 CLASS="EMPHASIS"
1041 >not</I
1042 ></SPAN
1043
1044      <TT
1045 CLASS="LITERAL"
1046 >wwww.example.com</TT
1047 >.
1048    </P
1049 ></DD
1050 ></DL
1051 ></DIV
1052 ></DIV
1053 ><DIV
1054 CLASS="SECT3"
1055 ><H3
1056 CLASS="SECT3"
1057 ><A
1058 NAME="AEN2040"
1059 ></A
1060 >8.4.2. The Path Pattern</H3
1061 ><P
1062 > <SPAN
1063 CLASS="APPLICATION"
1064 >Privoxy</SPAN
1065 > uses Perl compatible regular expressions
1066  (through the <A
1067 HREF="http://www.pcre.org/"
1068 TARGET="_top"
1069 >PCRE</A
1070 > library) for
1071  matching the path.</P
1072 ><P
1073 > There is an <A
1074 HREF="appendix.html#REGEX"
1075 >Appendix</A
1076 > with a brief quick-start into regular
1077  expressions, and full (very technical) documentation on PCRE regex syntax is available on-line
1078  at <A
1079 HREF="http://www.pcre.org/man.txt"
1080 TARGET="_top"
1081 >http://www.pcre.org/man.txt</A
1082 >.
1083  You might also find the Perl man page on regular expressions (<TT
1084 CLASS="LITERAL"
1085 >man perlre</TT
1086 >)
1087  useful, which is available on-line at <A
1088 HREF="http://www.perldoc.com/perl5.6/pod/perlre.html"
1089 TARGET="_top"
1090 >http://www.perldoc.com/perl5.6/pod/perlre.html</A
1091 >.</P
1092 ><P
1093 > Note that the path pattern is automatically left-anchored at the <SPAN
1094 CLASS="QUOTE"
1095 >"/"</SPAN
1096 >,
1097  i.e. it matches as if it would start with a <SPAN
1098 CLASS="QUOTE"
1099 >"^"</SPAN
1100 > (regular expression speak 
1101  for the beginning of a line).</P
1102 ><P
1103 > Please also note that matching in the path is <SPAN
1104 CLASS="emphasis"
1105 ><I
1106 CLASS="EMPHASIS"
1107 >CASE INSENSITIVE</I
1108 ></SPAN
1109 >
1110  by default, but you can switch to case sensitive at any point in the pattern by using the 
1111  <SPAN
1112 CLASS="QUOTE"
1113 >"(?-i)"</SPAN
1114 > switch: <TT
1115 CLASS="LITERAL"
1116 >www.example.com/(?-i)PaTtErN.*</TT
1117 > will match
1118  only documents whose path starts with <TT
1119 CLASS="LITERAL"
1120 >PaTtErN</TT
1121 > in
1122  <SPAN
1123 CLASS="emphasis"
1124 ><I
1125 CLASS="EMPHASIS"
1126 >exactly</I
1127 ></SPAN
1128 > this capitalization.</P
1129 ></DIV
1130 ></DIV
1131 ><DIV
1132 CLASS="SECT2"
1133 ><H2
1134 CLASS="SECT2"
1135 ><A
1136 NAME="ACTIONS"
1137 ></A
1138 >8.5. Actions</H2
1139 ><P
1140 > All actions are disabled by default, until they are explicitly enabled
1141  somewhere in an actions file. Actions are turned on if preceded with a
1142  <SPAN
1143 CLASS="QUOTE"
1144 >"+"</SPAN
1145 >, and turned off if preceded with a <SPAN
1146 CLASS="QUOTE"
1147 >"-"</SPAN
1148 >. So a
1149  <TT
1150 CLASS="LITERAL"
1151 >+action</TT
1152 > means <SPAN
1153 CLASS="QUOTE"
1154 >"do that action"</SPAN
1155 >, e.g.
1156  <TT
1157 CLASS="LITERAL"
1158 >+block</TT
1159 > means <SPAN
1160 CLASS="QUOTE"
1161 >"please block URLs that match the
1162  following patterns"</SPAN
1163 >, and <TT
1164 CLASS="LITERAL"
1165 >-block</TT
1166 > means <SPAN
1167 CLASS="QUOTE"
1168 >"don't
1169  block URLs that match the following patterns, even if <TT
1170 CLASS="LITERAL"
1171 >+block</TT
1172 >
1173  previously applied."</SPAN
1174 >&#13;</P
1175 ><P
1176
1177  Again, actions are invoked by placing them on a line, enclosed in curly braces and
1178  separated by whitespace, like in 
1179  <TT
1180 CLASS="LITERAL"
1181 >{+some-action -some-other-action{some-parameter}}</TT
1182 >,
1183  followed by a list of URL patterns, one per line, to which they apply.
1184  Together, the actions line and the following pattern lines make up a section
1185  of the actions file. </P
1186 ><P
1187
1188  There are three classes of actions:</P
1189 ><P
1190 > <P
1191 ></P
1192 ><UL
1193 ><LI
1194 ><P
1195 >  
1196    Boolean, i.e the action can only be <SPAN
1197 CLASS="QUOTE"
1198 >"enabled"</SPAN
1199 > or
1200    <SPAN
1201 CLASS="QUOTE"
1202 >"disabled"</SPAN
1203 >. Syntax:
1204   </P
1205 ><P
1206 >   <TABLE
1207 BORDER="0"
1208 BGCOLOR="#E0E0E0"
1209 WIDTH="90%"
1210 ><TR
1211 ><TD
1212 ><PRE
1213 CLASS="SCREEN"
1214 >  +<TT
1215 CLASS="REPLACEABLE"
1216 ><I
1217 >name</I
1218 ></TT
1219 >        # enable action <TT
1220 CLASS="REPLACEABLE"
1221 ><I
1222 >name</I
1223 ></TT
1224 >
1225   -<TT
1226 CLASS="REPLACEABLE"
1227 ><I
1228 >name</I
1229 ></TT
1230 >        # disable action <TT
1231 CLASS="REPLACEABLE"
1232 ><I
1233 >name</I
1234 ></TT
1235 ></PRE
1236 ></TD
1237 ></TR
1238 ></TABLE
1239 >
1240   </P
1241 ><P
1242 >  
1243    Example: <TT
1244 CLASS="LITERAL"
1245 >+block</TT
1246 >
1247   </P
1248 ></LI
1249 ><LI
1250 ><P
1251 >  
1252    Parameterized, where some value is required in order to enable this type of action.
1253    Syntax:
1254   </P
1255 ><P
1256 >   <TABLE
1257 BORDER="0"
1258 BGCOLOR="#E0E0E0"
1259 WIDTH="90%"
1260 ><TR
1261 ><TD
1262 ><PRE
1263 CLASS="SCREEN"
1264 >  +<TT
1265 CLASS="REPLACEABLE"
1266 ><I
1267 >name</I
1268 ></TT
1269 >{<TT
1270 CLASS="REPLACEABLE"
1271 ><I
1272 >param</I
1273 ></TT
1274 >}  # enable action and set parameter to <TT
1275 CLASS="REPLACEABLE"
1276 ><I
1277 >param</I
1278 ></TT
1279 >,
1280                # overwriting parameter from previous match if necessary
1281   -<TT
1282 CLASS="REPLACEABLE"
1283 ><I
1284 >name</I
1285 ></TT
1286 >         # disable action. The parameter can be omitted</PRE
1287 ></TD
1288 ></TR
1289 ></TABLE
1290 >
1291   </P
1292 ><P
1293 >   Note that if the URL matches multiple positive forms of a parameterized action,
1294    the last match wins, i.e. the params from earlier matches are simply ignored.
1295   </P
1296 ><P
1297 >  
1298    Example: <TT
1299 CLASS="LITERAL"
1300 >+hide-user-agent{ Mozilla 1.0 }</TT
1301 >
1302   </P
1303 ></LI
1304 ><LI
1305 ><P
1306 >  
1307    Multi-value. These look exactly like parameterized actions,
1308    but they behave differently: If the action applies multiple times to the
1309    same URL, but with different parameters, <SPAN
1310 CLASS="emphasis"
1311 ><I
1312 CLASS="EMPHASIS"
1313 >all</I
1314 ></SPAN
1315 > the parameters
1316    from <SPAN
1317 CLASS="emphasis"
1318 ><I
1319 CLASS="EMPHASIS"
1320 >all</I
1321 ></SPAN
1322 > matches are remembered. This is used for actions
1323    that can be executed for the same request repeatedly, like adding multiple
1324    headers, or filtering through multiple filters. Syntax:
1325   </P
1326 ><P
1327 >   <TABLE
1328 BORDER="0"
1329 BGCOLOR="#E0E0E0"
1330 WIDTH="90%"
1331 ><TR
1332 ><TD
1333 ><PRE
1334 CLASS="SCREEN"
1335 >  +<TT
1336 CLASS="REPLACEABLE"
1337 ><I
1338 >name</I
1339 ></TT
1340 >{<TT
1341 CLASS="REPLACEABLE"
1342 ><I
1343 >param</I
1344 ></TT
1345 >}   # enable action and add <TT
1346 CLASS="REPLACEABLE"
1347 ><I
1348 >param</I
1349 ></TT
1350 > to the list of parameters
1351   -<TT
1352 CLASS="REPLACEABLE"
1353 ><I
1354 >name</I
1355 ></TT
1356 >{<TT
1357 CLASS="REPLACEABLE"
1358 ><I
1359 >param</I
1360 ></TT
1361 >}   # remove the parameter <TT
1362 CLASS="REPLACEABLE"
1363 ><I
1364 >param</I
1365 ></TT
1366 > from the list of parameters
1367                 # If it was the last one left, disable the action.
1368   <TT
1369 CLASS="REPLACEABLE"
1370 ><I
1371 >-name</I
1372 ></TT
1373 >          # disable this action completely and remove all parameters from the list</PRE
1374 ></TD
1375 ></TR
1376 ></TABLE
1377 >
1378   </P
1379 ><P
1380 >  
1381    Examples: <TT
1382 CLASS="LITERAL"
1383 >+add-header{X-Fun-Header: Some text}</TT
1384 > and
1385    <TT
1386 CLASS="LITERAL"
1387 >+filter{html-annoyances}</TT
1388 >
1389   </P
1390 ></LI
1391 ></UL
1392 ></P
1393 ><P
1394 > If nothing is specified in any actions file, no <SPAN
1395 CLASS="QUOTE"
1396 >"actions"</SPAN
1397 > are
1398  taken. So in this case <SPAN
1399 CLASS="APPLICATION"
1400 >Privoxy</SPAN
1401 > would just be a
1402  normal, non-blocking, non-anonymizing proxy. You must specifically enable the
1403  privacy and blocking features you need (although the provided default actions
1404  files will give a good starting point).</P
1405 ><P
1406 > Later defined actions always over-ride earlier ones.  So exceptions 
1407  to any rules you make, should come in the latter part of the file (or 
1408  in a file that is processed later when using multiple actions files). For
1409  multi-valued actions, the actions are applied in the order they are specified.
1410  Actions files are processed in the order they are defined in
1411  <TT
1412 CLASS="FILENAME"
1413 >config</TT
1414 > (the default installation has three actions
1415  files). It also quite possible for any given URL pattern to match more than
1416  one pattern and thus more than one set of actions!</P
1417 ><P
1418 > The list of valid <SPAN
1419 CLASS="APPLICATION"
1420 >Privoxy</SPAN
1421 > actions are:</P
1422 ><DIV
1423 CLASS="SECT3"
1424 ><H4
1425 CLASS="SECT3"
1426 ><A
1427 NAME="ADD-HEADER"
1428 ></A
1429 >8.5.1. add-header</H4
1430 ><P
1431 ></P
1432 ><DIV
1433 CLASS="VARIABLELIST"
1434 ><DL
1435 ><DT
1436 >Typical use:</DT
1437 ><DD
1438 ><P
1439 >Confuse log analysis, custom applications</P
1440 ></DD
1441 ><DT
1442 >Effect:</DT
1443 ><DD
1444 ><P
1445 >    Sends a user defined HTTP header to the web server.
1446    </P
1447 ></DD
1448 ><DT
1449 >Type:</DT
1450 ><DD
1451 ><P
1452 >Multi-value.</P
1453 ></DD
1454 ><DT
1455 >Parameter:</DT
1456 ><DD
1457 ><P
1458 >    Any string value is possible. Validity of the defined HTTP headers is not checked.
1459     It is recommended that you use the <SPAN
1460 CLASS="QUOTE"
1461 >"<TT
1462 CLASS="LITERAL"
1463 >X-</TT
1464 >"</SPAN
1465 > prefix
1466     for custom headers.
1467    </P
1468 ></DD
1469 ><DT
1470 >Notes:</DT
1471 ><DD
1472 ><P
1473 >    This action may be specified multiple times, in order to define multiple 
1474     headers. This is rarely needed for the typical user. If you don't know what 
1475     <SPAN
1476 CLASS="QUOTE"
1477 >"HTTP headers"</SPAN
1478 > are, you definitely don't need to worry about this 
1479     one.
1480    </P
1481 ></DD
1482 ><DT
1483 >Example usage:</DT
1484 ><DD
1485 ><P
1486 >     <TABLE
1487 BORDER="0"
1488 BGCOLOR="#E0E0E0"
1489 WIDTH="90%"
1490 ><TR
1491 ><TD
1492 ><PRE
1493 CLASS="SCREEN"
1494 >+add-header{X-User-Tracking: sucks}</PRE
1495 ></TD
1496 ></TR
1497 ></TABLE
1498 >
1499    </P
1500 ></DD
1501 ></DL
1502 ></DIV
1503 ></DIV
1504 ><DIV
1505 CLASS="SECT3"
1506 ><H4
1507 CLASS="SECT3"
1508 ><A
1509 NAME="BLOCK"
1510 ></A
1511 >8.5.2. block</H4
1512 ><P
1513 ></P
1514 ><DIV
1515 CLASS="VARIABLELIST"
1516 ><DL
1517 ><DT
1518 >Typical use:</DT
1519 ><DD
1520 ><P
1521 >Block ads or other obnoxious content</P
1522 ></DD
1523 ><DT
1524 >Effect:</DT
1525 ><DD
1526 ><P
1527 >    Requests for URLs to which this action applies are blocked, i.e. the requests are not
1528     forwarded to the remote server, but answered locally with a substitute page or image,
1529     as determined by the <TT
1530 CLASS="LITERAL"
1531 ><A
1532 HREF="actions-file.html#HANDLE-AS-IMAGE"
1533 >handle-as-image</A
1534 ></TT
1535 >
1536     and <TT
1537 CLASS="LITERAL"
1538 ><A
1539 HREF="actions-file.html#SET-IMAGE-BLOCKER"
1540 >set-image-blocker</A
1541 ></TT
1542 > actions.
1543    </P
1544 ></DD
1545 ><DT
1546 >Type:</DT
1547 ><DD
1548 ><P
1549 >Boolean.</P
1550 ></DD
1551 ><DT
1552 >Parameter:</DT
1553 ><DD
1554 ><P
1555 >N/A</P
1556 ></DD
1557 ><DT
1558 >Notes:</DT
1559 ><DD
1560 ><P
1561 >    <SPAN
1562 CLASS="APPLICATION"
1563 >Privoxy</SPAN
1564 > sends a special <SPAN
1565 CLASS="QUOTE"
1566 >"BLOCKED"</SPAN
1567 > page
1568     for requests to blocked pages. This page contains links to find out why the request
1569     was blocked, and a click-through to the blocked content (the latter only if compiled with the
1570     force feature enabled). The <SPAN
1571 CLASS="QUOTE"
1572 >"BLOCKED"</SPAN
1573 > page adapts to the available
1574     screen space -- it displays full-blown if space allows, or miniaturized and text-only
1575     if loaded into a small frame or window. If you are using <SPAN
1576 CLASS="APPLICATION"
1577 >Privoxy</SPAN
1578 >
1579     right now, you can take a look at the 
1580     <A
1581 HREF="http://ads.bannerserver.example.com/nasty-ads/sponsor.html"
1582 TARGET="_top"
1583 ><SPAN
1584 CLASS="QUOTE"
1585 >"BLOCKED"</SPAN
1586 >
1587     page</A
1588 >.
1589    </P
1590 ><P
1591
1592     A very important exception occurs if <SPAN
1593 CLASS="emphasis"
1594 ><I
1595 CLASS="EMPHASIS"
1596 >both</I
1597 ></SPAN
1598
1599     <TT
1600 CLASS="LITERAL"
1601 >block</TT
1602 > and <TT
1603 CLASS="LITERAL"
1604 ><A
1605 HREF="actions-file.html#HANDLE-AS-IMAGE"
1606 >handle-as-image</A
1607 ></TT
1608 >,
1609     apply to the same request: it will then be replaced by an image. If 
1610     <TT
1611 CLASS="LITERAL"
1612 ><A
1613 HREF="actions-file.html#SET-IMAGE-BLOCKER"
1614 >set-image-blocker</A
1615 ></TT
1616 >
1617     (see below) also applies, the type of image will be determined by its parameter,
1618     if not, the standard checkerboard pattern is sent.
1619    </P
1620 ><P
1621 >    It is important to understand this process, in order 
1622     to understand how <SPAN
1623 CLASS="APPLICATION"
1624 >Privoxy</SPAN
1625 > deals with 
1626     ads and other unwanted content.
1627    </P
1628 ><P
1629 >    The <TT
1630 CLASS="LITERAL"
1631 ><A
1632 HREF="actions-file.html#FILTER"
1633 >filter</A
1634 ></TT
1635 >
1636     action can perform a very similar task, by <SPAN
1637 CLASS="QUOTE"
1638 >"blocking"</SPAN
1639 >
1640     banner images and other content through rewriting the relevant URLs in the
1641     document's HTML source, so they don't get requested in the first place.
1642     Note that this is a totally different technique, and it's easy to confuse the two.
1643    </P
1644 ></DD
1645 ><DT
1646 >Example usage (section):</DT
1647 ><DD
1648 ><P
1649 >     <TABLE
1650 BORDER="0"
1651 BGCOLOR="#E0E0E0"
1652 WIDTH="90%"
1653 ><TR
1654 ><TD
1655 ><PRE
1656 CLASS="SCREEN"
1657 >{+block}      # Block and replace with "blocked" page
1658 .nasty-stuff.example.com
1659
1660 {+block +handle-as-image} # Block and replace with image
1661 .ad.doubleclick.net
1662 .ads.r.us</PRE
1663 ></TD
1664 ></TR
1665 ></TABLE
1666 >
1667     </P
1668 ></DD
1669 ></DL
1670 ></DIV
1671 ></DIV
1672 ><DIV
1673 CLASS="SECT3"
1674 ><H4
1675 CLASS="SECT3"
1676 ><A
1677 NAME="CONTENT-TYPE-OVERWRITE"
1678 ></A
1679 >8.5.3. content-type-overwrite</H4
1680 ><P
1681 ></P
1682 ><DIV
1683 CLASS="VARIABLELIST"
1684 ><DL
1685 ><DT
1686 >Typical use:</DT
1687 ><DD
1688 ><P
1689 >Stop useless download menus from popping up, or change the browser's rendering mode</P
1690 ></DD
1691 ><DT
1692 >Effect:</DT
1693 ><DD
1694 ><P
1695 >    Replaces the <SPAN
1696 CLASS="QUOTE"
1697 >"Content-Type:"</SPAN
1698 > HTTP server header.
1699    </P
1700 ></DD
1701 ><DT
1702 >Type:</DT
1703 ><DD
1704 ><P
1705 >Parameterized.</P
1706 ></DD
1707 ><DT
1708 >Parameter:</DT
1709 ><DD
1710 ><P
1711 >    Any string. 
1712    </P
1713 ></DD
1714 ><DT
1715 >Notes:</DT
1716 ><DD
1717 ><P
1718 >    The <SPAN
1719 CLASS="QUOTE"
1720 >"Content-Type:"</SPAN
1721 > HTTP server header is used by the
1722     browser to decide what to do with the document. The value of this
1723     header can cause the browser to open a download menu instead of
1724     displaying the document by itself, even if the document's format is
1725     supported by the browser. 
1726    </P
1727 ><P
1728 >    The declared content type can also affect which rendering mode
1729     the browser chooses. If XHTML is delivered as <SPAN
1730 CLASS="QUOTE"
1731 >"text/html"</SPAN
1732 >,
1733     many browsers treat it as yet another broken HTML document.
1734     If it is send as <SPAN
1735 CLASS="QUOTE"
1736 >"application/xml"</SPAN
1737 >, browsers with
1738     XHTML support will only display it, if the syntax is correct.
1739    </P
1740 ><P
1741 >    If you see a web site that proudly uses XHTML buttons, but sets
1742     <SPAN
1743 CLASS="QUOTE"
1744 >"Content-Type: text/html"</SPAN
1745 >, you can use Privoxy
1746     to overwrite it with <SPAN
1747 CLASS="QUOTE"
1748 >"application/xml"</SPAN
1749 > and validate
1750     the web master's claim inside your XHTML-supporting browser.
1751     If the syntax is incorrect, the browser will complain loudly. 
1752    </P
1753 ><P
1754 >    You can also go the opposite direction: if your browser prints
1755     error messages instead of rendering a document falsely declared
1756     as XHTML, you can overwrite the content type with
1757     <SPAN
1758 CLASS="QUOTE"
1759 >"text/html"</SPAN
1760 > and have it rendered as broken HTML document. 
1761    </P
1762 ><P
1763 >    By default <TT
1764 CLASS="LITERAL"
1765 >content-type-overwrite</TT
1766 > only replaces
1767     <SPAN
1768 CLASS="QUOTE"
1769 >"Content-Type:"</SPAN
1770 > headers that look like some kind of text.
1771     If you want to overwrite it unconditionally, you have to combine it with
1772     <TT
1773 CLASS="LITERAL"
1774 ><A
1775 HREF="actions-file.html#FORCE-TEXT-MODE"
1776 >force-text-mode</A
1777 ></TT
1778 >.
1779     This limitation exists for a reason, think twice before circumventing it.
1780    </P
1781 ><P
1782 >    Most of the time it's easier to enable
1783     <TT
1784 CLASS="LITERAL"
1785 ><A
1786 HREF="actions-file.html#FILTER-SERVER-HEADERS"
1787 >filter-server-headers</A
1788 ></TT
1789 >
1790     and replace this action with a custom regular expression. It allows you
1791     to activate it for every document of a certain site and it will still
1792     only replace the content types you aimed at.
1793    </P
1794 ><P
1795 >    Of course you can apply <TT
1796 CLASS="LITERAL"
1797 >content-type-overwrite</TT
1798 >
1799     to a whole site and then make URL based exceptions, but it's a lot
1800     more work to get the same precision. 
1801    </P
1802 ></DD
1803 ><DT
1804 >Example usage (sections):</DT
1805 ><DD
1806 ><P
1807 >     <TABLE
1808 BORDER="0"
1809 BGCOLOR="#E0E0E0"
1810 WIDTH="90%"
1811 ><TR
1812 ><TD
1813 ><PRE
1814 CLASS="SCREEN"
1815 ># Check if www.example.net/ really uses valid XHTML
1816 {+content-type-overwrite {application/xml}}
1817 www.example.net/
1818 # but leave the content type unmodified if the URL looks like a style sheet
1819 {-content-type-overwrite}
1820 www.example.net/*.\.css$
1821 www.example.net/*.style</PRE
1822 ></TD
1823 ></TR
1824 ></TABLE
1825 >
1826    </P
1827 ></DD
1828 ></DL
1829 ></DIV
1830 ></DIV
1831 ><DIV
1832 CLASS="SECT3"
1833 ><H4
1834 CLASS="SECT3"
1835 ><A
1836 NAME="CRUNCH-CLIENT-HEADER"
1837 ></A
1838 >8.5.4. crunch-client-header</H4
1839 ><P
1840 ></P
1841 ><DIV
1842 CLASS="VARIABLELIST"
1843 ><DL
1844 ><DT
1845 >Typical use:</DT
1846 ><DD
1847 ><P
1848 >Remove a client header <SPAN
1849 CLASS="APPLICATION"
1850 >Privoxy</SPAN
1851 > has no dedicated action for.</P
1852 ></DD
1853 ><DT
1854 >Effect:</DT
1855 ><DD
1856 ><P
1857 >    Deletes every header send by the client that contains the string the user supplied as parameter.
1858    </P
1859 ></DD
1860 ><DT
1861 >Type:</DT
1862 ><DD
1863 ><P
1864 >Parameterized.</P
1865 ></DD
1866 ><DT
1867 >Parameter:</DT
1868 ><DD
1869 ><P
1870 >    Any string.
1871    </P
1872 ></DD
1873 ><DT
1874 >Notes:</DT
1875 ><DD
1876 ><P
1877 >    This action allows you to block client headers for which no dedicated
1878     <SPAN
1879 CLASS="APPLICATION"
1880 >Privoxy</SPAN
1881 > action exists.
1882     <SPAN
1883 CLASS="APPLICATION"
1884 >Privoxy</SPAN
1885 > will remove every client header that
1886     contains the string you supplied as parameter.
1887    </P
1888 ><P
1889 >    Regular expressions are <SPAN
1890 CLASS="emphasis"
1891 ><I
1892 CLASS="EMPHASIS"
1893 >not supported</I
1894 ></SPAN
1895 > and you can't
1896     use this action to block different headers in the same request, unless
1897     they contain the same string.
1898    </P
1899 ><P
1900 >    <TT
1901 CLASS="LITERAL"
1902 >crunch-client-header</TT
1903 > is only meant for quick tests.
1904     If you have to block several different headers, or only want to modify
1905     parts of them, you should enable
1906     <TT
1907 CLASS="LITERAL"
1908 ><A
1909 HREF="actions-file.html#FILTER-CLIENT-HEADERS"
1910 >filter-client-headers</A
1911 ></TT
1912 >
1913     and create your own filter.
1914    </P
1915 ><DIV
1916 CLASS="WARNING"
1917 ><P
1918 ></P
1919 ><TABLE
1920 CLASS="WARNING"
1921 BORDER="1"
1922 WIDTH="90%"
1923 ><TR
1924 ><TD
1925 ALIGN="CENTER"
1926 ><B
1927 >Warning</B
1928 ></TD
1929 ></TR
1930 ><TR
1931 ><TD
1932 ALIGN="LEFT"
1933 ><P
1934 >      Don't block any header without understanding the consequences.
1935      </P
1936 ></TD
1937 ></TR
1938 ></TABLE
1939 ></DIV
1940 ></DD
1941 ><DT
1942 >Example usage (section):</DT
1943 ><DD
1944 ><P
1945 >     <TABLE
1946 BORDER="0"
1947 BGCOLOR="#E0E0E0"
1948 WIDTH="90%"
1949 ><TR
1950 ><TD
1951 ><PRE
1952 CLASS="SCREEN"
1953 ># Block the non-existent "Privacy-Violation:" client header 
1954 {+crunch-client-header {Privacy-Violation:}}
1955 /
1956     </PRE
1957 ></TD
1958 ></TR
1959 ></TABLE
1960 >
1961    </P
1962 ></DD
1963 ></DL
1964 ></DIV
1965 ></DIV
1966 ><DIV
1967 CLASS="SECT3"
1968 ><H4
1969 CLASS="SECT3"
1970 ><A
1971 NAME="CRUNCH-IF-NONE-MATCH"
1972 ></A
1973 >8.5.5. crunch-if-none-match</H4
1974 ><P
1975 ></P
1976 ><DIV
1977 CLASS="VARIABLELIST"
1978 ><DL
1979 ><DT
1980 >Typical use:</DT
1981 ><DD
1982 ><P
1983 >Prevent yet another way to track the user's steps between sessions.</P
1984 ></DD
1985 ><DT
1986 >Effect:</DT
1987 ><DD
1988 ><P
1989 >    Deletes the <SPAN
1990 CLASS="QUOTE"
1991 >"If-None-Match:"</SPAN
1992 > HTTP client header.
1993    </P
1994 ></DD
1995 ><DT
1996 >Type:</DT
1997 ><DD
1998 ><P
1999 >Boolean.</P
2000 ></DD
2001 ><DT
2002 >Parameter:</DT
2003 ><DD
2004 ><P
2005 >    N/A
2006    </P
2007 ></DD
2008 ><DT
2009 >Notes:</DT
2010 ><DD
2011 ><P
2012 >    Removing the <SPAN
2013 CLASS="QUOTE"
2014 >"If-None-Match:"</SPAN
2015 > HTTP client header
2016     is useful for filter testing, where you want to force a real
2017     reload instead of getting status code <SPAN
2018 CLASS="QUOTE"
2019 >"304"</SPAN
2020 > which
2021     would cause the browser to use a cached copy of the page.
2022    </P
2023 ><P
2024 >    It is also useful to make sure the header isn't used as a cookie
2025     replacement.
2026    </P
2027 ><P
2028 >    Blocking the <SPAN
2029 CLASS="QUOTE"
2030 >"If-None-Match:"</SPAN
2031 > header shouldn't cause any
2032     caching problems, as long as the <SPAN
2033 CLASS="QUOTE"
2034 >"If-Modified-Since:"</SPAN
2035 > header
2036     isn't blocked as well.
2037    </P
2038 ><P
2039 >    It is recommended to use this action together with
2040     <TT
2041 CLASS="LITERAL"
2042 ><A
2043 HREF="actions-file.html#HIDE-IF-MODIFIED-SINCE"
2044 >hide-if-modified-since</A
2045 ></TT
2046 >
2047     and
2048     <TT
2049 CLASS="LITERAL"
2050 ><A
2051 HREF="actions-file.html#OVERWRITE-LAST-MODIFIED"
2052 >overwrite-last-modified</A
2053 ></TT
2054 >.
2055    </P
2056 ></DD
2057 ><DT
2058 >Example usage (section):</DT
2059 ><DD
2060 ><P
2061 >     <TABLE
2062 BORDER="0"
2063 BGCOLOR="#E0E0E0"
2064 WIDTH="90%"
2065 ><TR
2066 ><TD
2067 ><PRE
2068 CLASS="SCREEN"
2069 ># Let the browser revalidate cached documents without being tracked across sessions
2070 {+hide-if-modified-since {-1} \
2071 +overwrite-last-modified {randomize} \
2072 +crunch-if-none-match}
2073 /   </PRE
2074 ></TD
2075 ></TR
2076 ></TABLE
2077 >
2078    </P
2079 ></DD
2080 ></DL
2081 ></DIV
2082 ></DIV
2083 ><DIV
2084 CLASS="SECT3"
2085 ><H4
2086 CLASS="SECT3"
2087 ><A
2088 NAME="CRUNCH-INCOMING-COOKIES"
2089 ></A
2090 >8.5.6. crunch-incoming-cookies</H4
2091 ><P
2092 ></P
2093 ><DIV
2094 CLASS="VARIABLELIST"
2095 ><DL
2096 ><DT
2097 >Typical use:</DT
2098 ><DD
2099 ><P
2100 >    Prevent the web server from setting any cookies on your system
2101    </P
2102 ></DD
2103 ><DT
2104 >Effect:</DT
2105 ><DD
2106 ><P
2107 >    Deletes any <SPAN
2108 CLASS="QUOTE"
2109 >"Set-Cookie:"</SPAN
2110 > HTTP headers from server replies.
2111    </P
2112 ></DD
2113 ><DT
2114 >Type:</DT
2115 ><DD
2116 ><P
2117 >Boolean.</P
2118 ></DD
2119 ><DT
2120 >Parameter:</DT
2121 ><DD
2122 ><P
2123 >    N/A
2124    </P
2125 ></DD
2126 ><DT
2127 >Notes:</DT
2128 ><DD
2129 ><P
2130 >    This action is only concerned with <SPAN
2131 CLASS="emphasis"
2132 ><I
2133 CLASS="EMPHASIS"
2134 >incoming</I
2135 ></SPAN
2136 > cookies. For
2137     <SPAN
2138 CLASS="emphasis"
2139 ><I
2140 CLASS="EMPHASIS"
2141 >outgoing</I
2142 ></SPAN
2143 > cookies, use
2144     <TT
2145 CLASS="LITERAL"
2146 ><A
2147 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
2148 >crunch-outgoing-cookies</A
2149 ></TT
2150 >.
2151     Use <SPAN
2152 CLASS="emphasis"
2153 ><I
2154 CLASS="EMPHASIS"
2155 >both</I
2156 ></SPAN
2157 > to disable cookies completely.
2158    </P
2159 ><P
2160 >    It makes <SPAN
2161 CLASS="emphasis"
2162 ><I
2163 CLASS="EMPHASIS"
2164 >no sense at all</I
2165 ></SPAN
2166 > to use this action in conjunction
2167     with the <TT
2168 CLASS="LITERAL"
2169 ><A
2170 HREF="actions-file.html#SESSION-COOKIES-ONLY"
2171 >session-cookies-only</A
2172 ></TT
2173 > action,
2174     since it would prevent the session cookies from being set. See also 
2175     <TT
2176 CLASS="LITERAL"
2177 ><A
2178 HREF="actions-file.html#FILTER-CONTENT-COOKIES"
2179 >filter-content-cookies</A
2180 ></TT
2181 >.
2182    </P
2183 ></DD
2184 ><DT
2185 >Example usage:</DT
2186 ><DD
2187 ><P
2188 >    <TABLE
2189 BORDER="0"
2190 BGCOLOR="#E0E0E0"
2191 WIDTH="90%"
2192 ><TR
2193 ><TD
2194 ><PRE
2195 CLASS="SCREEN"
2196 >+crunch-incoming-cookies</PRE
2197 ></TD
2198 ></TR
2199 ></TABLE
2200 >
2201    </P
2202 ></DD
2203 ></DL
2204 ></DIV
2205 ></DIV
2206 ><DIV
2207 CLASS="SECT3"
2208 ><H4
2209 CLASS="SECT3"
2210 ><A
2211 NAME="CRUNCH-SERVER-HEADER"
2212 ></A
2213 >8.5.7. crunch-server-header</H4
2214 ><P
2215 ></P
2216 ><DIV
2217 CLASS="VARIABLELIST"
2218 ><DL
2219 ><DT
2220 >Typical use:</DT
2221 ><DD
2222 ><P
2223 >Remove a server header <SPAN
2224 CLASS="APPLICATION"
2225 >Privoxy</SPAN
2226 > has no dedicated action for.</P
2227 ></DD
2228 ><DT
2229 >Effect:</DT
2230 ><DD
2231 ><P
2232 >    Deletes every header sent by the server that contains the string the user supplied as parameter.
2233    </P
2234 ></DD
2235 ><DT
2236 >Type:</DT
2237 ><DD
2238 ><P
2239 >Parameterized.</P
2240 ></DD
2241 ><DT
2242 >Parameter:</DT
2243 ><DD
2244 ><P
2245 >    Any string.
2246    </P
2247 ></DD
2248 ><DT
2249 >Notes:</DT
2250 ><DD
2251 ><P
2252 >    This action allows you to block server headers for which no dedicated
2253     <SPAN
2254 CLASS="APPLICATION"
2255 >Privoxy</SPAN
2256 > action exists. <SPAN
2257 CLASS="APPLICATION"
2258 >Privoxy</SPAN
2259 >
2260     will remove every server header that contains the string you supplied as parameter.
2261    </P
2262 ><P
2263 >    Regular expressions are <SPAN
2264 CLASS="emphasis"
2265 ><I
2266 CLASS="EMPHASIS"
2267 >not supported</I
2268 ></SPAN
2269 > and you can't
2270     use this action to block different headers in the same request, unless
2271     they contain the same string.
2272    </P
2273 ><P
2274 >    <TT
2275 CLASS="LITERAL"
2276 >crunch-server-header</TT
2277 > is only meant for quick tests.
2278     If you have to block several different headers, or only want to modify
2279     parts of them, you should enable
2280     <TT
2281 CLASS="LITERAL"
2282 ><A
2283 HREF="actions-file.html#FILTER-SERVER-HEADERS"
2284 >filter-server-headers</A
2285 ></TT
2286 >
2287     and create your own filter.
2288    </P
2289 ><DIV
2290 CLASS="WARNING"
2291 ><P
2292 ></P
2293 ><TABLE
2294 CLASS="WARNING"
2295 BORDER="1"
2296 WIDTH="90%"
2297 ><TR
2298 ><TD
2299 ALIGN="CENTER"
2300 ><B
2301 >Warning</B
2302 ></TD
2303 ></TR
2304 ><TR
2305 ><TD
2306 ALIGN="LEFT"
2307 ><P
2308 >     Don't block any header without understanding the consequences.
2309      </P
2310 ></TD
2311 ></TR
2312 ></TABLE
2313 ></DIV
2314 ></DD
2315 ><DT
2316 >Example usage (section):</DT
2317 ><DD
2318 ><P
2319 >     <TABLE
2320 BORDER="0"
2321 BGCOLOR="#E0E0E0"
2322 WIDTH="90%"
2323 ><TR
2324 ><TD
2325 ><PRE
2326 CLASS="SCREEN"
2327 ># Crunch server headers that try to prevent caching
2328 {+crunch-server-header {no-cache}}
2329 /   </PRE
2330 ></TD
2331 ></TR
2332 ></TABLE
2333 >
2334    </P
2335 ></DD
2336 ></DL
2337 ></DIV
2338 ></DIV
2339 ><DIV
2340 CLASS="SECT3"
2341 ><H4
2342 CLASS="SECT3"
2343 ><A
2344 NAME="CRUNCH-OUTGOING-COOKIES"
2345 ></A
2346 >8.5.8. crunch-outgoing-cookies</H4
2347 ><P
2348 ></P
2349 ><DIV
2350 CLASS="VARIABLELIST"
2351 ><DL
2352 ><DT
2353 >Typical use:</DT
2354 ><DD
2355 ><P
2356 >    Prevent the web server from reading any cookies from your system
2357    </P
2358 ></DD
2359 ><DT
2360 >Effect:</DT
2361 ><DD
2362 ><P
2363 >    Deletes any <SPAN
2364 CLASS="QUOTE"
2365 >"Cookie:"</SPAN
2366 > HTTP headers from client requests.
2367    </P
2368 ></DD
2369 ><DT
2370 >Type:</DT
2371 ><DD
2372 ><P
2373 >Boolean.</P
2374 ></DD
2375 ><DT
2376 >Parameter:</DT
2377 ><DD
2378 ><P
2379 >    N/A
2380    </P
2381 ></DD
2382 ><DT
2383 >Notes:</DT
2384 ><DD
2385 ><P
2386 >    This action is only concerned with <SPAN
2387 CLASS="emphasis"
2388 ><I
2389 CLASS="EMPHASIS"
2390 >outgoing</I
2391 ></SPAN
2392 > cookies. For
2393     <SPAN
2394 CLASS="emphasis"
2395 ><I
2396 CLASS="EMPHASIS"
2397 >incoming</I
2398 ></SPAN
2399 > cookies, use
2400     <TT
2401 CLASS="LITERAL"
2402 ><A
2403 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
2404 >crunch-incoming-cookies</A
2405 ></TT
2406 >.
2407     Use <SPAN
2408 CLASS="emphasis"
2409 ><I
2410 CLASS="EMPHASIS"
2411 >both</I
2412 ></SPAN
2413 > to disable cookies completely.
2414    </P
2415 ><P
2416 >    It makes <SPAN
2417 CLASS="emphasis"
2418 ><I
2419 CLASS="EMPHASIS"
2420 >no sense at all</I
2421 ></SPAN
2422 > to use this action in conjunction
2423     with the <TT
2424 CLASS="LITERAL"
2425 ><A
2426 HREF="actions-file.html#SESSION-COOKIES-ONLY"
2427 >session-cookies-only</A
2428 ></TT
2429 > action,
2430     since it would prevent the session cookies from being read.
2431    </P
2432 ></DD
2433 ><DT
2434 >Example usage:</DT
2435 ><DD
2436 ><P
2437 >    <TABLE
2438 BORDER="0"
2439 BGCOLOR="#E0E0E0"
2440 WIDTH="90%"
2441 ><TR
2442 ><TD
2443 ><PRE
2444 CLASS="SCREEN"
2445 >+crunch-outgoing-cookies</PRE
2446 ></TD
2447 ></TR
2448 ></TABLE
2449 >
2450    </P
2451 ></DD
2452 ></DL
2453 ></DIV
2454 ></DIV
2455 ><DIV
2456 CLASS="SECT3"
2457 ><H4
2458 CLASS="SECT3"
2459 ><A
2460 NAME="DEANIMATE-GIFS"
2461 ></A
2462 >8.5.9. deanimate-gifs</H4
2463 ><P
2464 ></P
2465 ><DIV
2466 CLASS="VARIABLELIST"
2467 ><DL
2468 ><DT
2469 >Typical use:</DT
2470 ><DD
2471 ><P
2472 >Stop those annoying, distracting animated GIF images.</P
2473 ></DD
2474 ><DT
2475 >Effect:</DT
2476 ><DD
2477 ><P
2478 >    De-animate GIF animations, i.e. reduce them to their first or last image.
2479    </P
2480 ></DD
2481 ><DT
2482 >Type:</DT
2483 ><DD
2484 ><P
2485 >Parameterized.</P
2486 ></DD
2487 ><DT
2488 >Parameter:</DT
2489 ><DD
2490 ><P
2491 >    <SPAN
2492 CLASS="QUOTE"
2493 >"last"</SPAN
2494 > or <SPAN
2495 CLASS="QUOTE"
2496 >"first"</SPAN
2497 >
2498    </P
2499 ></DD
2500 ><DT
2501 >Notes:</DT
2502 ><DD
2503 ><P
2504 >    This will also shrink the images considerably (in bytes, not pixels!). If
2505     the option <SPAN
2506 CLASS="QUOTE"
2507 >"first"</SPAN
2508 > is given, the first frame of the animation
2509     is used as the replacement. If <SPAN
2510 CLASS="QUOTE"
2511 >"last"</SPAN
2512 > is given, the last
2513     frame of the animation is used instead, which probably makes more sense for
2514     most banner animations, but also has the risk of not showing the entire
2515     last frame (if it is only a delta to an earlier frame).
2516    </P
2517 ><P
2518 >    You can safely use this action with patterns that will also match non-GIF
2519     objects, because no attempt will be made at anything that doesn't look like
2520     a GIF.
2521    </P
2522 ></DD
2523 ><DT
2524 >Example usage:</DT
2525 ><DD
2526 ><P
2527 >      <TABLE
2528 BORDER="0"
2529 BGCOLOR="#E0E0E0"
2530 WIDTH="90%"
2531 ><TR
2532 ><TD
2533 ><PRE
2534 CLASS="SCREEN"
2535 >+deanimate-gifs{last}</PRE
2536 ></TD
2537 ></TR
2538 ></TABLE
2539 >
2540     </P
2541 ></DD
2542 ></DL
2543 ></DIV
2544 ></DIV
2545 ><DIV
2546 CLASS="SECT3"
2547 ><H4
2548 CLASS="SECT3"
2549 ><A
2550 NAME="DOWNGRADE-HTTP-VERSION"
2551 ></A
2552 >8.5.10. downgrade-http-version</H4
2553 ><P
2554 ></P
2555 ><DIV
2556 CLASS="VARIABLELIST"
2557 ><DL
2558 ><DT
2559 >Typical use:</DT
2560 ><DD
2561 ><P
2562 >Work around (very rare) problems with HTTP/1.1</P
2563 ></DD
2564 ><DT
2565 >Effect:</DT
2566 ><DD
2567 ><P
2568 >    Downgrades HTTP/1.1 client requests and server replies to HTTP/1.0.
2569    </P
2570 ></DD
2571 ><DT
2572 >Type:</DT
2573 ><DD
2574 ><P
2575 >Boolean.</P
2576 ></DD
2577 ><DT
2578 >Parameter:</DT
2579 ><DD
2580 ><P
2581 >    N/A
2582    </P
2583 ></DD
2584 ><DT
2585 >Notes:</DT
2586 ><DD
2587 ><P
2588 >    This is a left-over from the time when <SPAN
2589 CLASS="APPLICATION"
2590 >Privoxy</SPAN
2591 >
2592     didn't support important HTTP/1.1 features well. It is left here for the
2593     unlikely case that you experience HTTP/1.1 related problems with some server
2594     out there. Not all (optional) HTTP/1.1 features are supported yet, so there
2595     is a chance you might need this action.
2596    </P
2597 ></DD
2598 ><DT
2599 >Example usage (section):</DT
2600 ><DD
2601 ><P
2602 >     <TABLE
2603 BORDER="0"
2604 BGCOLOR="#E0E0E0"
2605 WIDTH="90%"
2606 ><TR
2607 ><TD
2608 ><PRE
2609 CLASS="SCREEN"
2610 >{+downgrade-http-version}
2611 problem-host.example.com</PRE
2612 ></TD
2613 ></TR
2614 ></TABLE
2615 >
2616     </P
2617 ></DD
2618 ></DL
2619 ></DIV
2620 ></DIV
2621 ><DIV
2622 CLASS="SECT3"
2623 ><H4
2624 CLASS="SECT3"
2625 ><A
2626 NAME="FAST-REDIRECTS"
2627 ></A
2628 >8.5.11. fast-redirects</H4
2629 ><P
2630 ></P
2631 ><DIV
2632 CLASS="VARIABLELIST"
2633 ><DL
2634 ><DT
2635 >Typical use:</DT
2636 ><DD
2637 ><P
2638 >Fool some click-tracking scripts and speed up indirect links.</P
2639 ></DD
2640 ><DT
2641 >Effect:</DT
2642 ><DD
2643 ><P
2644 >    Detects redirection URLs and redirects the browser without contacting
2645     the redirection server first.
2646    </P
2647 ></DD
2648 ><DT
2649 >Type:</DT
2650 ><DD
2651 ><P
2652 >Parameterized.</P
2653 ></DD
2654 ><DT
2655 >Parameter:</DT
2656 ><DD
2657 ><P
2658 ></P
2659 ><UL
2660 ><LI
2661 ><P
2662 >      <SPAN
2663 CLASS="QUOTE"
2664 >"simple-check"</SPAN
2665 > to just search for the string <SPAN
2666 CLASS="QUOTE"
2667 >"http://"</SPAN
2668 >
2669       to detect redirection URLs.
2670      </P
2671 ></LI
2672 ><LI
2673 ><P
2674 >      <SPAN
2675 CLASS="QUOTE"
2676 >"check-decoded-url"</SPAN
2677 > to decode URLs (if necessary) before searching
2678       for redirection URLs.
2679      </P
2680 ></LI
2681 ></UL
2682 ></DD
2683 ><DT
2684 >Notes:</DT
2685 ><DD
2686 ><P
2687 >  
2688     Many sites, like yahoo.com, don't just link to other sites. Instead, they
2689     will link to some script on their own servers, giving the destination as a
2690     parameter, which will then redirect you to the final target. URLs
2691     resulting from this scheme typically look like:
2692     <SPAN
2693 CLASS="QUOTE"
2694 >"http://www.example.org/click-tracker.cgi?target=http%3a//www.example.net/"</SPAN
2695 >.
2696   </P
2697 ><P
2698 >    Sometimes, there are even multiple consecutive redirects encoded in the
2699     URL. These redirections via scripts make your web browsing more traceable,
2700     since the server from which you follow such a link can see where you go
2701     to. Apart from that, valuable bandwidth and time is wasted, while your
2702     browser asks the server for one redirect after the other. Plus, it feeds
2703     the advertisers.
2704    </P
2705 ><P
2706 >    This feature is currently not very smart and is scheduled for improvement.
2707     If it is enabled by default, you will have to create some exceptions to
2708     this action. It can lead to failures in several ways: 
2709    </P
2710 ><P
2711 >    Not every URLs with other URLs as parameters is evil.
2712     Some sites offer a real service that requires this information to work.
2713     For example a validation service needs to know, which document to validate.
2714     <TT
2715 CLASS="LITERAL"
2716 >fast-redirects</TT
2717 > assumes that every URL parameter that
2718     looks like another URL is a redirection target, and will always redirect to
2719     the last one. Most of the time the assumption is correct, but if it isn't,
2720     the user gets redirected anyway.
2721    </P
2722 ><P
2723 >    Another failure occurs if the URL contains other parameters after the URL parameter.
2724     The URL:
2725     <SPAN
2726 CLASS="QUOTE"
2727 >"http://www.example.org/?redirect=http%3a//www.example.net/&#38;foo=bar"</SPAN
2728 >.
2729     contains the redirection URL <SPAN
2730 CLASS="QUOTE"
2731 >"http://www.example.net/"</SPAN
2732 >,
2733     followed by another parameter. <TT
2734 CLASS="LITERAL"
2735 >fast-redirects</TT
2736 > doesn't know that
2737     and will cause a redirect to <SPAN
2738 CLASS="QUOTE"
2739 >"http://www.example.net/&#38;foo=bar"</SPAN
2740 >.
2741     Depending on the target server configuration, the parameter will be silently ignored
2742     or lead to a <SPAN
2743 CLASS="QUOTE"
2744 >"page not found"</SPAN
2745 > error. It is possible to fix these redirected
2746     requests with <TT
2747 CLASS="LITERAL"
2748 ><A
2749 HREF="actions-file.html#FILTER-CLIENT-HEADERS"
2750 >filter-client-headers</A
2751 ></TT
2752 >
2753     but it requires a little effort.
2754    </P
2755 ><P
2756 >    To detect a redirection URL, <TT
2757 CLASS="LITERAL"
2758 >fast-redirects</TT
2759 > only
2760     looks for the string <SPAN
2761 CLASS="QUOTE"
2762 >"http://"</SPAN
2763 >, either in plain text
2764     (invalid but often used) or encoded as <SPAN
2765 CLASS="QUOTE"
2766 >"http%3a//"</SPAN
2767 >.
2768     Some sites use their own URL encoding scheme, encrypt the address
2769     of the target server or replace it with a database id. In theses cases
2770     <TT
2771 CLASS="LITERAL"
2772 >fast-redirects</TT
2773 > is fooled and the request reaches the
2774     redirection server where it probably gets logged.
2775    </P
2776 ></DD
2777 ><DT
2778 >Example usage:</DT
2779 ><DD
2780 ><P
2781 >     <TABLE
2782 BORDER="0"
2783 BGCOLOR="#E0E0E0"
2784 WIDTH="90%"
2785 ><TR
2786 ><TD
2787 ><PRE
2788 CLASS="SCREEN"
2789 >+fast-redirects{simple-check}</PRE
2790 ></TD
2791 ></TR
2792 ></TABLE
2793 >
2794     </P
2795 ><P
2796 >     <TABLE
2797 BORDER="0"
2798 BGCOLOR="#E0E0E0"
2799 WIDTH="90%"
2800 ><TR
2801 ><TD
2802 ><PRE
2803 CLASS="SCREEN"
2804 >+fast-redirects{check-decoded-url}</PRE
2805 ></TD
2806 ></TR
2807 ></TABLE
2808 >
2809     </P
2810 ></DD
2811 ></DL
2812 ></DIV
2813 ></DIV
2814 ><DIV
2815 CLASS="SECT3"
2816 ><H4
2817 CLASS="SECT3"
2818 ><A
2819 NAME="FILTER"
2820 ></A
2821 >8.5.12. filter</H4
2822 ><P
2823 ></P
2824 ><DIV
2825 CLASS="VARIABLELIST"
2826 ><DL
2827 ><DT
2828 >Typical use:</DT
2829 ><DD
2830 ><P
2831 >Get rid of HTML and JavaScript annoyances, banner advertisements (by size), do fun text replacements, etc.</P
2832 ></DD
2833 ><DT
2834 >Effect:</DT
2835 ><DD
2836 ><P
2837 >    All files of text-based type, most notably HTML and JavaScript, to which this
2838     action applies, are filtered on-the-fly through the specified regular expression
2839     based substitutions. (Note: as of version 3.0.3 plain text documents 
2840     are exempted from filtering, because web servers often use the
2841     <TT
2842 CLASS="LITERAL"
2843 >text/plain</TT
2844 > MIME type for all files whose type they
2845     don't know.) By default, filtering works only on the document content 
2846     itself, not the headers.
2847    </P
2848 ></DD
2849 ><DT
2850 >Type:</DT
2851 ><DD
2852 ><P
2853 >Parameterized.</P
2854 ></DD
2855 ><DT
2856 >Parameter:</DT
2857 ><DD
2858 ><P
2859 >    The name of a filter, as defined in the <A
2860 HREF="filter-file.html"
2861 >filter file</A
2862 >.
2863     Filters can be defined in one or more  files as defined by the 
2864     <TT
2865 CLASS="LITERAL"
2866 ><A
2867 HREF="config.html#FILTERFILE"
2868 >filterfile</A
2869 ></TT
2870 >
2871     option in the <A
2872 HREF="config.html"
2873 >config file</A
2874 >. 
2875     <TT
2876 CLASS="FILENAME"
2877 >default.filter</TT
2878 > is the collection of filters 
2879     supplied by the developers. Locally defined filters should go 
2880     in their own file, such as <TT
2881 CLASS="FILENAME"
2882 >user.filter</TT
2883 >.
2884    </P
2885 ><P
2886 >     When used in its negative form,
2887      and without parameters, filtering is completely disabled.
2888   </P
2889 ></DD
2890 ><DT
2891 >Notes:</DT
2892 ><DD
2893 ><P
2894 >    For your convenience, there are a number of pre-defined filters available 
2895     in the distribution filter file that you can use. See the examples below for
2896     a list.
2897    </P
2898 ><P
2899 >    Filtering requires buffering the page content, which may appear to
2900     slow down page rendering since nothing is displayed until all content has
2901     passed the filters. (It does not really take longer, but seems that way
2902     since the page is not incrementally displayed.) This effect will be more
2903     noticeable on slower connections.
2904    </P
2905 ><P
2906 >    This is very powerful feature, and <SPAN
2907 CLASS="QUOTE"
2908 >"rolling your own"</SPAN
2909 >
2910     filters requires a knowledge of regular expressions and HTML.
2911    </P
2912 ><P
2913 >    The amount of data that can be filtered is limited to the 
2914     <TT
2915 CLASS="LITERAL"
2916 ><A
2917 HREF="config.html#BUFFER-LIMIT"
2918 >buffer-limit</A
2919 ></TT
2920 >
2921     option in the main <A
2922 HREF="config.html"
2923 >config file</A
2924 >. The 
2925     default is 4096 KB (4 Megs). Once this limit is exceeded, the buffered
2926     data, and all pending data, is passed through unfiltered. 
2927    </P
2928 ><P
2929 >    Inadequate MIME types, such as zipped files, are not filtered at all.
2930     (Again, only text-based types except plain text). Encrypted SSL data
2931     (from HTTPS servers) cannot be filtered either, since this would violate
2932     the integrity of the secure transaction. In some situations it might
2933     be necessary to protect certain text, like source code, from filtering
2934     by defining appropriate <TT
2935 CLASS="LITERAL"
2936 >-filter</TT
2937 > sections.
2938    </P
2939 ><P
2940 >    At this time, <SPAN
2941 CLASS="APPLICATION"
2942 >Privoxy</SPAN
2943 > cannot (yet!) uncompress compressed
2944     documents. If you want filtering to work on all documents, even those that
2945     would normally be sent compressed, use the
2946     <TT
2947 CLASS="LITERAL"
2948 ><A
2949 HREF="actions-file.html#PREVENT-COMPRESSION"
2950 >prevent-compression</A
2951 ></TT
2952 >
2953     action in conjunction with <TT
2954 CLASS="LITERAL"
2955 >filter</TT
2956 >.
2957    </P
2958 ><P
2959 >    Filtering can achieve some of the same effects as the 
2960     <TT
2961 CLASS="LITERAL"
2962 ><A
2963 HREF="actions-file.html#BLOCK"
2964 >block</A
2965 ></TT
2966 >
2967     action, i.e. it can be used to block ads and banners. But the mechanism 
2968     works quite differently. One effective use, is to block ad banners 
2969     based on their size (see below), since many of these seem to be somewhat 
2970     standardized.
2971    </P
2972 ><P
2973 >    <A
2974 HREF="contact.html"
2975 >Feedback</A
2976 > with suggestions for new or
2977     improved filters is particularly welcome!
2978    </P
2979 ><P
2980 >    The below list has only the names and a one-line description of each
2981     predefined filter. There are <A
2982 HREF="filter-file.html#PREDEFINED-FILTERS"
2983 >more
2984     verbose explanations</A
2985 > of what these filters do in the <A
2986 HREF="filter-file.html"
2987 >filter file chapter</A
2988 >.
2989    </P
2990 ></DD
2991 ><DT
2992 >Example usage (with filters from the distribution <TT
2993 CLASS="FILENAME"
2994 >default.filter</TT
2995 > file).
2996   See <A
2997 HREF="filter-file.html#PREDEFINED-FILTERS"
2998 >the Predefined Filters section</A
2999 > for 
3000   more explanation on each:</DT
3001 ><DD
3002 ><P
3003 >    <A
3004 NAME="FILTER-JS-ANNOYANCES"
3005 ></A
3006 >
3007     <TABLE
3008 BORDER="0"
3009 BGCOLOR="#E0E0E0"
3010 WIDTH="90%"
3011 ><TR
3012 ><TD
3013 ><PRE
3014 CLASS="SCREEN"
3015 >+filter{js-annoyances}       # Get rid of particularly annoying JavaScript abuse</PRE
3016 ></TD
3017 ></TR
3018 ></TABLE
3019 >
3020    </P
3021 ><P
3022 >    <A
3023 NAME="FILTER-JS-EVENTS"
3024 ></A
3025 >
3026     <TABLE
3027 BORDER="0"
3028 BGCOLOR="#E0E0E0"
3029 WIDTH="90%"
3030 ><TR
3031 ><TD
3032 ><PRE
3033 CLASS="SCREEN"
3034 >+filter{js-events}           # Kill all JS event bindings (Radically destructive! Only for extra nasty sites)</PRE
3035 ></TD
3036 ></TR
3037 ></TABLE
3038 >
3039    </P
3040 ><P
3041 >    <A
3042 NAME="FILTER-HTML-ANNOYANCES"
3043 ></A
3044 >
3045     <TABLE
3046 BORDER="0"
3047 BGCOLOR="#E0E0E0"
3048 WIDTH="90%"
3049 ><TR
3050 ><TD
3051 ><PRE
3052 CLASS="SCREEN"
3053 >+filter{html-annoyances}     # Get rid of particularly annoying HTML abuse</PRE
3054 ></TD
3055 ></TR
3056 ></TABLE
3057 >
3058    </P
3059 ><P
3060 >    <A
3061 NAME="FILTER-CONTENT-COOKIES"
3062 ></A
3063 >
3064     <TABLE
3065 BORDER="0"
3066 BGCOLOR="#E0E0E0"
3067 WIDTH="90%"
3068 ><TR
3069 ><TD
3070 ><PRE
3071 CLASS="SCREEN"
3072 >+filter{content-cookies}     # Kill cookies that come in the HTML or JS content</PRE
3073 ></TD
3074 ></TR
3075 ></TABLE
3076 >
3077    </P
3078 ><P
3079 >    <A
3080 NAME="FILTER-REFRESH-TAGS"
3081 ></A
3082 >
3083     <TABLE
3084 BORDER="0"
3085 BGCOLOR="#E0E0E0"
3086 WIDTH="90%"
3087 ><TR
3088 ><TD
3089 ><PRE
3090 CLASS="SCREEN"
3091 >+filter{refresh-tags}        # Kill automatic refresh tags (for dial-on-demand setups)</PRE
3092 ></TD
3093 ></TR
3094 ></TABLE
3095 >
3096    </P
3097 ><P
3098 >    <A
3099 NAME="FILTER-UNSOLICITED-POPUPS"
3100 ></A
3101 >
3102     <TABLE
3103 BORDER="0"
3104 BGCOLOR="#E0E0E0"
3105 WIDTH="90%"
3106 ><TR
3107 ><TD
3108 ><PRE
3109 CLASS="SCREEN"
3110 >+filter{unsolicited-popups}  # Disable only unsolicited pop-up windows</PRE
3111 ></TD
3112 ></TR
3113 ></TABLE
3114 >
3115    </P
3116 ><P
3117 >    <A
3118 NAME="FILTER-ALL-POPUPS"
3119 ></A
3120 >
3121     <TABLE
3122 BORDER="0"
3123 BGCOLOR="#E0E0E0"
3124 WIDTH="90%"
3125 ><TR
3126 ><TD
3127 ><PRE
3128 CLASS="SCREEN"
3129 >+filter{all-popups}          # Kill all popups in JavaScript and HTML</PRE
3130 ></TD
3131 ></TR
3132 ></TABLE
3133 >
3134    </P
3135 ><P
3136 >    <A
3137 NAME="FILTER-IMG-REORDER"
3138 ></A
3139 >
3140     <TABLE
3141 BORDER="0"
3142 BGCOLOR="#E0E0E0"
3143 WIDTH="90%"
3144 ><TR
3145 ><TD
3146 ><PRE
3147 CLASS="SCREEN"
3148 >+filter{img-reorder}         # Reorder attributes in &#60;img&#62; tags to make the banners-by-* filters more effective</PRE
3149 ></TD
3150 ></TR
3151 ></TABLE
3152 >
3153    </P
3154 ><P
3155 >    <A
3156 NAME="FILTER-BANNERS-BY-SIZE"
3157 ></A
3158 >
3159     <TABLE
3160 BORDER="0"
3161 BGCOLOR="#E0E0E0"
3162 WIDTH="90%"
3163 ><TR
3164 ><TD
3165 ><PRE
3166 CLASS="SCREEN"
3167 >+filter{banners-by-size}     # Kill banners by size</PRE
3168 ></TD
3169 ></TR
3170 ></TABLE
3171 >
3172    </P
3173 ><P
3174 >    <A
3175 NAME="FILTER-BANNERS-BY-LINK"
3176 ></A
3177 >
3178     <TABLE
3179 BORDER="0"
3180 BGCOLOR="#E0E0E0"
3181 WIDTH="90%"
3182 ><TR
3183 ><TD
3184 ><PRE
3185 CLASS="SCREEN"
3186 >+filter{banners-by-link}     # Kill banners by their links to known clicktrackers</PRE
3187 ></TD
3188 ></TR
3189 ></TABLE
3190 >
3191    </P
3192 ><P
3193 >    <A
3194 NAME="FILTER-WEBBUGS"
3195 ></A
3196 >
3197     <TABLE
3198 BORDER="0"
3199 BGCOLOR="#E0E0E0"
3200 WIDTH="90%"
3201 ><TR
3202 ><TD
3203 ><PRE
3204 CLASS="SCREEN"
3205 >+filter{webbugs}             # Squish WebBugs (1x1 invisible GIFs used for user tracking)</PRE
3206 ></TD
3207 ></TR
3208 ></TABLE
3209 >
3210    </P
3211 ><P
3212 >    <A
3213 NAME="FILTER-TINY-TEXTFORMS"
3214 ></A
3215 >
3216     <TABLE
3217 BORDER="0"
3218 BGCOLOR="#E0E0E0"
3219 WIDTH="90%"
3220 ><TR
3221 ><TD
3222 ><PRE
3223 CLASS="SCREEN"
3224 >+filter{tiny-textforms}      # Extend those tiny textareas up to 40x80 and kill the hard wrap</PRE
3225 ></TD
3226 ></TR
3227 ></TABLE
3228 >
3229    </P
3230 ><P
3231 >    <A
3232 NAME="FILTER-JUMPING-WINDOWS"
3233 ></A
3234 >
3235     <TABLE
3236 BORDER="0"
3237 BGCOLOR="#E0E0E0"
3238 WIDTH="90%"
3239 ><TR
3240 ><TD
3241 ><PRE
3242 CLASS="SCREEN"
3243 >+filter{jumping-windows}     # Prevent windows from resizing and moving themselves</PRE
3244 ></TD
3245 ></TR
3246 ></TABLE
3247 >
3248    </P
3249 ><P
3250 >    <A
3251 NAME="FILTER-FRAMESET-BORDERS"
3252 ></A
3253 >
3254     <TABLE
3255 BORDER="0"
3256 BGCOLOR="#E0E0E0"
3257 WIDTH="90%"
3258 ><TR
3259 ><TD
3260 ><PRE
3261 CLASS="SCREEN"
3262 >+filter{frameset-borders}    # Give frames a border and make them resizable</PRE
3263 ></TD
3264 ></TR
3265 ></TABLE
3266 >
3267    </P
3268 ><P
3269 >    <A
3270 NAME="FILTER-DEMORONIZER"
3271 ></A
3272 >
3273     <TABLE
3274 BORDER="0"
3275 BGCOLOR="#E0E0E0"
3276 WIDTH="90%"
3277 ><TR
3278 ><TD
3279 ><PRE
3280 CLASS="SCREEN"
3281 >+filter{demoronizer}         # Fix MS's non-standard use of standard charsets</PRE
3282 ></TD
3283 ></TR
3284 ></TABLE
3285 >
3286    </P
3287 ><P
3288 >    <A
3289 NAME="FILTER-SHOCKWAVE-FLASH"
3290 ></A
3291 >
3292     <TABLE
3293 BORDER="0"
3294 BGCOLOR="#E0E0E0"
3295 WIDTH="90%"
3296 ><TR
3297 ><TD
3298 ><PRE
3299 CLASS="SCREEN"
3300 >+filter{shockwave-flash}     # Kill embedded Shockwave Flash objects</PRE
3301 ></TD
3302 ></TR
3303 ></TABLE
3304 >
3305    </P
3306 ><P
3307 >    <A
3308 NAME="FILTER-QUICKTIME-KIOSKMODE"
3309 ></A
3310 >
3311     <TABLE
3312 BORDER="0"
3313 BGCOLOR="#E0E0E0"
3314 WIDTH="90%"
3315 ><TR
3316 ><TD
3317 ><PRE
3318 CLASS="SCREEN"
3319 >+filter{quicktime-kioskmode} # Make Quicktime movies saveable</PRE
3320 ></TD
3321 ></TR
3322 ></TABLE
3323 >
3324    </P
3325 ><P
3326 >    <A
3327 NAME="FILTER-FUN"
3328 ></A
3329 >
3330     <TABLE
3331 BORDER="0"
3332 BGCOLOR="#E0E0E0"
3333 WIDTH="90%"
3334 ><TR
3335 ><TD
3336 ><PRE
3337 CLASS="SCREEN"
3338 >+filter{fun}                 # Text replacements for subversive browsing fun!</PRE
3339 ></TD
3340 ></TR
3341 ></TABLE
3342 >
3343    </P
3344 ><P
3345 >    <A
3346 NAME="FILTER-CRUDE-PARENTAL"
3347 ></A
3348 >
3349     <TABLE
3350 BORDER="0"
3351 BGCOLOR="#E0E0E0"
3352 WIDTH="90%"
3353 ><TR
3354 ><TD
3355 ><PRE
3356 CLASS="SCREEN"
3357 >+filter{crude-parental}      # Crude parental filtering (demo only)</PRE
3358 ></TD
3359 ></TR
3360 ></TABLE
3361 >
3362    </P
3363 ><P
3364 >    <A
3365 NAME="FILTER-IE-EXPLOITS"
3366 ></A
3367 >
3368     <TABLE
3369 BORDER="0"
3370 BGCOLOR="#E0E0E0"
3371 WIDTH="90%"
3372 ><TR
3373 ><TD
3374 ><PRE
3375 CLASS="SCREEN"
3376 >+filter{ie-exploits}         # Disable some known Internet Explorer bug exploits</PRE
3377 ></TD
3378 ></TR
3379 ></TABLE
3380 >
3381    </P
3382 ></DD
3383 ></DL
3384 ></DIV
3385 ></DIV
3386 ><DIV
3387 CLASS="SECT3"
3388 ><H4
3389 CLASS="SECT3"
3390 ><A
3391 NAME="FILTER-CLIENT-HEADERS"
3392 ></A
3393 >8.5.13. filter-client-headers</H4
3394 ><P
3395 ></P
3396 ><DIV
3397 CLASS="VARIABLELIST"
3398 ><DL
3399 ><DT
3400 >Typical use:</DT
3401 ><DD
3402 ><P
3403 >   To apply filtering to the client's (browser's) headers
3404    </P
3405 ></DD
3406 ><DT
3407 >Effect:</DT
3408 ><DD
3409 ><P
3410 >Extend filtering capabilities to the client's headers, which 
3411    by default applies only to the document itself.
3412    </P
3413 ></DD
3414 ><DT
3415 >Type:</DT
3416 ><DD
3417 ><P
3418 >Boolean.</P
3419 ></DD
3420 ><DT
3421 >Parameter:</DT
3422 ><DD
3423 ><P
3424 >    N/A
3425    </P
3426 ></DD
3427 ><DT
3428 >Notes:</DT
3429 ><DD
3430 ><P
3431 >    Regular expressions can be used to filter headers as well. Check your
3432     filters closely before activating this action, as it can easily lead to broken
3433     requests.
3434    </P
3435 ><P
3436
3437     These filters are applied to each header on its own, not to them
3438     all at once. This makes it easier to diagnose problems, but on the downside
3439     you can't write filters that only change header x if header y's value is
3440     z.
3441    </P
3442 ><P
3443 >    The filters are used after the other header actions have finished and can
3444     use their output as input.
3445    </P
3446 ><P
3447 >    Whenever possible one should specify <TT
3448 CLASS="LITERAL"
3449 >^</TT
3450 >,
3451     <TT
3452 CLASS="LITERAL"
3453 >$</TT
3454 >, the whole header name and the colon, to make sure
3455     the filter doesn't cause havoc to other headers or the
3456     page itself. For example if you want to transform
3457     <SPAN
3458 CLASS="APPLICATION"
3459 >Galeon</SPAN
3460 > User-Agents to 
3461     <SPAN
3462 CLASS="APPLICATION"
3463 >Firefox</SPAN
3464 > User-Agents you
3465     shouldn't use:</P
3466 ><P
3467 ><TABLE
3468 BORDER="0"
3469 BGCOLOR="#E0E0E0"
3470 WIDTH="90%"
3471 ><TR
3472 ><TD
3473 ><PRE
3474 CLASS="SCREEN"
3475 >s@Galeon/\d\.\d\.\d @@</PRE
3476 ></TD
3477 ></TR
3478 ></TABLE
3479 ></P
3480 ><P
3481 >    but:</P
3482 ><P
3483 ><TABLE
3484 BORDER="0"
3485 BGCOLOR="#E0E0E0"
3486 WIDTH="90%"
3487 ><TR
3488 ><TD
3489 ><PRE
3490 CLASS="SCREEN"
3491 >s@^(User-Agent:.*) Galeon/\d\.\d\.\d (Firefox/\d\.\d\.\d\.\d)$@$1 $2@</PRE
3492 ></TD
3493 ></TR
3494 ></TABLE
3495 ></P
3496 ></DD
3497 ><DT
3498 >Example usage (section):</DT
3499 ><DD
3500 ><P
3501 >     <TABLE
3502 BORDER="0"
3503 BGCOLOR="#E0E0E0"
3504 WIDTH="90%"
3505 ><TR
3506 ><TD
3507 ><PRE
3508 CLASS="SCREEN"
3509 >{+filter-client-headers +filter{test_filter}}
3510 problem-host.example.com
3511     </PRE
3512 ></TD
3513 ></TR
3514 ></TABLE
3515 >
3516     </P
3517 ></DD
3518 ></DL
3519 ></DIV
3520 ></DIV
3521 ><DIV
3522 CLASS="SECT3"
3523 ><H4
3524 CLASS="SECT3"
3525 ><A
3526 NAME="FILTER-SERVER-HEADERS"
3527 ></A
3528 >8.5.14. filter-server-headers</H4
3529 ><P
3530 ></P
3531 ><DIV
3532 CLASS="VARIABLELIST"
3533 ><DL
3534 ><DT
3535 >Typical use:</DT
3536 ><DD
3537 ><P
3538 >   To apply filtering to the server's headers
3539    </P
3540 ></DD
3541 ><DT
3542 >Effect:</DT
3543 ><DD
3544 ><P
3545 >Extend filtering capabilities to the server's headers, which 
3546    by default applies only to the document itself.
3547    </P
3548 ></DD
3549 ><DT
3550 >Type:</DT
3551 ><DD
3552 ><P
3553 >Boolean.</P
3554 ></DD
3555 ><DT
3556 >Parameter:</DT
3557 ><DD
3558 ><P
3559 >    N/A
3560    </P
3561 ></DD
3562 ><DT
3563 >Notes:</DT
3564 ><DD
3565 ><P
3566 >    Similar to <TT
3567 CLASS="LITERAL"
3568 >filter-client-headers</TT
3569 >, but works on 
3570     the server instead. To filter both server and client, use both.
3571    </P
3572 ><P
3573 >    As with <TT
3574 CLASS="LITERAL"
3575 >filter-client-headers</TT
3576 >, check your
3577     filters before activating this action, as it can easily lead to broken
3578     requests.
3579    </P
3580 ><P
3581
3582     These filters are applied to each header on its own, not to them
3583     all at once. This makes it easier to diagnose problems, but on the downside
3584     you can't write filters that only change header x if header y's value is
3585     z.
3586    </P
3587 ><P
3588 >    The filters are used after the other header actions have finished and can
3589     use their output as input.
3590    </P
3591 ><P
3592 >    Remember too, whenever possible one should specify <TT
3593 CLASS="LITERAL"
3594 >^</TT
3595 >,
3596     <TT
3597 CLASS="LITERAL"
3598 >$</TT
3599 >, the whole header name and the colon, to make sure
3600     the filter doesn't cause havoc to other headers or the
3601     page itself. See above for example.
3602    </P
3603 ></DD
3604 ><DT
3605 >Example usage (section):</DT
3606 ><DD
3607 ><P
3608 >     <TABLE
3609 BORDER="0"
3610 BGCOLOR="#E0E0E0"
3611 WIDTH="90%"
3612 ><TR
3613 ><TD
3614 ><PRE
3615 CLASS="SCREEN"
3616 >{+filter-server-headers +filter{test_filter}}
3617 problem-host.example.com
3618     </PRE
3619 ></TD
3620 ></TR
3621 ></TABLE
3622 >
3623     </P
3624 ></DD
3625 ></DL
3626 ></DIV
3627 ></DIV
3628 ><DIV
3629 CLASS="SECT3"
3630 ><H4
3631 CLASS="SECT3"
3632 ><A
3633 NAME="FORCE-TEXT-MODE"
3634 ></A
3635 >8.5.15. force-text-mode</H4
3636 ><P
3637 ></P
3638 ><DIV
3639 CLASS="VARIABLELIST"
3640 ><DL
3641 ><DT
3642 >Typical use:</DT
3643 ><DD
3644 ><P
3645 >Force <SPAN
3646 CLASS="APPLICATION"
3647 >Privoxy</SPAN
3648 > to treat a document as if it was in some kind of <SPAN
3649 CLASS="emphasis"
3650 ><I
3651 CLASS="EMPHASIS"
3652 >text</I
3653 ></SPAN
3654 > format.   </P
3655 ></DD
3656 ><DT
3657 >Effect:</DT
3658 ><DD
3659 ><P
3660 >    Declares a document as text, even if the <SPAN
3661 CLASS="QUOTE"
3662 >"Content-Type:"</SPAN
3663 > isn't detected as such.
3664    </P
3665 ></DD
3666 ><DT
3667 >Type:</DT
3668 ><DD
3669 ><P
3670 >Boolean.</P
3671 ></DD
3672 ><DT
3673 >Parameter:</DT
3674 ><DD
3675 ><P
3676 >    N/A
3677    </P
3678 ></DD
3679 ><DT
3680 >Notes:</DT
3681 ><DD
3682 ><P
3683 >    As explained <TT
3684 CLASS="LITERAL"
3685 ><A
3686 HREF="actions-file.html#FILTER"
3687 >above</A
3688 ></TT
3689 >,
3690     <SPAN
3691 CLASS="APPLICATION"
3692 >Privoxy</SPAN
3693 > tries to only filter files that are
3694     in some kind of text format. The same restrictions apply to
3695     <TT
3696 CLASS="LITERAL"
3697 ><A
3698 HREF="actions-file.html#CONTENT-TYPE-OVERWRITE"
3699 >content-type-overwrite</A
3700 ></TT
3701 >.
3702     <TT
3703 CLASS="LITERAL"
3704 >force-text-mode</TT
3705 > declares a document as text,
3706     without looking at the <SPAN
3707 CLASS="QUOTE"
3708 >"Content-Type:"</SPAN
3709 > first.
3710    </P
3711 ><DIV
3712 CLASS="WARNING"
3713 ><P
3714 ></P
3715 ><TABLE
3716 CLASS="WARNING"
3717 BORDER="1"
3718 WIDTH="90%"
3719 ><TR
3720 ><TD
3721 ALIGN="CENTER"
3722 ><B
3723 >Warning</B
3724 ></TD
3725 ></TR
3726 ><TR
3727 ><TD
3728 ALIGN="LEFT"
3729 ><P
3730 >     Think twice before activating this action. Filtering binary data
3731      with regular expressions can cause file damage.
3732     </P
3733 ></TD
3734 ></TR
3735 ></TABLE
3736 ></DIV
3737 ></DD
3738 ><DT
3739 >Example usage:</DT
3740 ><DD
3741 ><P
3742 >     <TABLE
3743 BORDER="0"
3744 BGCOLOR="#E0E0E0"
3745 WIDTH="90%"
3746 ><TR
3747 ><TD
3748 ><PRE
3749 CLASS="SCREEN"
3750 >+force-text-mode
3751      </PRE
3752 ></TD
3753 ></TR
3754 ></TABLE
3755 >
3756    </P
3757 ></DD
3758 ></DL
3759 ></DIV
3760 ></DIV
3761 ><DIV
3762 CLASS="SECT3"
3763 ><H4
3764 CLASS="SECT3"
3765 ><A
3766 NAME="HANDLE-AS-EMPTY-DOCUMENT"
3767 ></A
3768 >8.5.16. handle-as-empty-document</H4
3769 ><P
3770 ></P
3771 ><DIV
3772 CLASS="VARIABLELIST"
3773 ><DL
3774 ><DT
3775 >Typical use:</DT
3776 ><DD
3777 ><P
3778 >Mark URLs that should be replaced by empty documents <SPAN
3779 CLASS="emphasis"
3780 ><I
3781 CLASS="EMPHASIS"
3782 >if they get blocked</I
3783 ></SPAN
3784 ></P
3785 ></DD
3786 ><DT
3787 >Effect:</DT
3788 ><DD
3789 ><P
3790 >    This action alone doesn't do anything noticeable. It just marks URLs.
3791     If the <TT
3792 CLASS="LITERAL"
3793 ><A
3794 HREF="actions-file.html#BLOCK"
3795 >block</A
3796 ></TT
3797 > action <SPAN
3798 CLASS="emphasis"
3799 ><I
3800 CLASS="EMPHASIS"
3801 >also applies</I
3802 ></SPAN
3803 >,
3804     the presence or absence of this mark decides whether an HTML <SPAN
3805 CLASS="QUOTE"
3806 >"blocked"</SPAN
3807 >
3808     page, or an empty document will be sent to the client as a substitute for the blocked content.
3809     The <SPAN
3810 CLASS="emphasis"
3811 ><I
3812 CLASS="EMPHASIS"
3813 >empty</I
3814 ></SPAN
3815 > document isn't literally empty, but actually contains a single space.
3816    </P
3817 ></DD
3818 ><DT
3819 >Type:</DT
3820 ><DD
3821 ><P
3822 >Boolean.</P
3823 ></DD
3824 ><DT
3825 >Parameter:</DT
3826 ><DD
3827 ><P
3828 >    N/A
3829    </P
3830 ></DD
3831 ><DT
3832 >Notes:</DT
3833 ><DD
3834 ><P
3835 >    Some browsers complain about syntax errors if JavaScript documents
3836     are blocked with <SPAN
3837 CLASS="APPLICATION"
3838 >Privoxy's</SPAN
3839 >
3840     default HTML page; this option can be used to silence them.
3841    </P
3842 ><P
3843 >    The content type for the empty document can be specified with
3844     <TT
3845 CLASS="LITERAL"
3846 ><A
3847 HREF="actions-file.html#CONTENT-TYPE-OVERWRITE"
3848 >content-type-overwrite{}</A
3849 ></TT
3850 >,
3851     but usually this isn't necessary.
3852    </P
3853 ></DD
3854 ><DT
3855 >Example usage:</DT
3856 ><DD
3857 ><P
3858 >     <TABLE
3859 BORDER="0"
3860 BGCOLOR="#E0E0E0"
3861 WIDTH="90%"
3862 ><TR
3863 ><TD
3864 ><PRE
3865 CLASS="SCREEN"
3866 ># Block all documents on example.org that end with ".js",
3867 # but send an empty document instead of the usual HTML message. 
3868 {+block +handle-as-empty-document}
3869 example.org/.*\.js$
3870      </PRE
3871 ></TD
3872 ></TR
3873 ></TABLE
3874 >
3875    </P
3876 ></DD
3877 ></DL
3878 ></DIV
3879 ></DIV
3880 ><DIV
3881 CLASS="SECT3"
3882 ><H4
3883 CLASS="SECT3"
3884 ><A
3885 NAME="HANDLE-AS-IMAGE"
3886 ></A
3887 >8.5.17. handle-as-image</H4
3888 ><P
3889 ></P
3890 ><DIV
3891 CLASS="VARIABLELIST"
3892 ><DL
3893 ><DT
3894 >Typical use:</DT
3895 ><DD
3896 ><P
3897 >Mark URLs as belonging to images (so they'll be replaced by imagee <SPAN
3898 CLASS="emphasis"
3899 ><I
3900 CLASS="EMPHASIS"
3901 >if they get blocked</I
3902 ></SPAN
3903 >)</P
3904 ></DD
3905 ><DT
3906 >Effect:</DT
3907 ><DD
3908 ><P
3909 >    This action alone doesn't do anything noticeable. It just marks URLs as images.
3910     If the <TT
3911 CLASS="LITERAL"
3912 ><A
3913 HREF="actions-file.html#BLOCK"
3914 >block</A
3915 ></TT
3916 > action <SPAN
3917 CLASS="emphasis"
3918 ><I
3919 CLASS="EMPHASIS"
3920 >also applies</I
3921 ></SPAN
3922 >,
3923     the presence or absence of this mark decides whether an HTML <SPAN
3924 CLASS="QUOTE"
3925 >"blocked"</SPAN
3926 >
3927     page, or a replacement image (as determined by the <TT
3928 CLASS="LITERAL"
3929 ><A
3930 HREF="actions-file.html#SET-IMAGE-BLOCKER"
3931 >set-image-blocker</A
3932 ></TT
3933 > action) will be sent to the
3934     client as a substitute for the blocked content.
3935    </P
3936 ></DD
3937 ><DT
3938 >Type:</DT
3939 ><DD
3940 ><P
3941 >Boolean.</P
3942 ></DD
3943 ><DT
3944 >Parameter:</DT
3945 ><DD
3946 ><P
3947 >    N/A
3948    </P
3949 ></DD
3950 ><DT
3951 >Notes:</DT
3952 ><DD
3953 ><P
3954 >    The below generic example section is actually part of <TT
3955 CLASS="FILENAME"
3956 >default.action</TT
3957 >.
3958     It marks all URLs with well-known image file name extensions as images and should
3959     be left intact. 
3960    </P
3961 ><P
3962 >    Users will probably only want to use the handle-as-image action in conjunction with
3963     <TT
3964 CLASS="LITERAL"
3965 ><A
3966 HREF="actions-file.html#BLOCK"
3967 >block</A
3968 ></TT
3969 >, to block sources of banners, whose URLs don't
3970     reflect the file type, like in the second example section.
3971    </P
3972 ><P
3973 >    Note that you cannot treat HTML pages as images in most cases. For instance, (in-line) ad
3974     frames require an HTML page to be sent, or they won't display properly.
3975     Forcing <TT
3976 CLASS="LITERAL"
3977 >handle-as-image</TT
3978 > in this situation will not replace the
3979     ad frame with an image, but lead to error messages.
3980    </P
3981 ></DD
3982 ><DT
3983 >Example usage (sections):</DT
3984 ><DD
3985 ><P
3986 >     <TABLE
3987 BORDER="0"
3988 BGCOLOR="#E0E0E0"
3989 WIDTH="90%"
3990 ><TR
3991 ><TD
3992 ><PRE
3993 CLASS="SCREEN"
3994 ># Generic image extensions:
3995 #
3996 {+handle-as-image}
3997 /.*\.(gif|jpg|jpeg|png|bmp|ico)$
3998
3999 # These don't look like images, but they're banners and should be
4000 # blocked as images:
4001 #
4002 {+block +handle-as-image}
4003 some.nasty-banner-server.com/junk.cgi?output=trash
4004
4005 # Banner source! Who cares if they also have non-image content?
4006 ad.doubleclick.net </PRE
4007 ></TD
4008 ></TR
4009 ></TABLE
4010 >
4011    </P
4012 ></DD
4013 ></DL
4014 ></DIV
4015 ></DIV
4016 ><DIV
4017 CLASS="SECT3"
4018 ><H4
4019 CLASS="SECT3"
4020 ><A
4021 NAME="HIDE-ACCEPT-LANGUAGE"
4022 ></A
4023 >8.5.18. hide-accept-language</H4
4024 ><P
4025 ></P
4026 ><DIV
4027 CLASS="VARIABLELIST"
4028 ><DL
4029 ><DT
4030 >Typical use:</DT
4031 ><DD
4032 ><P
4033 >Pretend to use different language settings.</P
4034 ></DD
4035 ><DT
4036 >Effect:</DT
4037 ><DD
4038 ><P
4039 >    Deletes or replaces the <SPAN
4040 CLASS="QUOTE"
4041 >"Accept-Language:"</SPAN
4042 > HTTP header in client requests.
4043    </P
4044 ></DD
4045 ><DT
4046 >Type:</DT
4047 ><DD
4048 ><P
4049 >Parameterized.</P
4050 ></DD
4051 ><DT
4052 >Parameter:</DT
4053 ><DD
4054 ><P
4055 >    Keyword: <SPAN
4056 CLASS="QUOTE"
4057 >"block"</SPAN
4058 >, or any user defined value.
4059    </P
4060 ></DD
4061 ><DT
4062 >Notes:</DT
4063 ><DD
4064 ><P
4065 >    Faking the browser's language settings can be useful to make a
4066     foreign User-Agent set with
4067     <TT
4068 CLASS="LITERAL"
4069 ><A
4070 HREF="actions-file.html#HIDE-USER-AGENT"
4071 >hide-user-agent</A
4072 ></TT
4073 >
4074     more believable.
4075    </P
4076 ><P
4077 >    However some sites with content in different languages check the
4078     <SPAN
4079 CLASS="QUOTE"
4080 >"Accept-Language:"</SPAN
4081 > to decide which one to take by default.
4082     Sometimes it isn't possible to later switch to another language without
4083     changing the <SPAN
4084 CLASS="QUOTE"
4085 >"Accept-Language:"</SPAN
4086 > header first.
4087    </P
4088 ><P
4089 >    Therefore it's a good idea to either only change the
4090     <SPAN
4091 CLASS="QUOTE"
4092 >"Accept-Language:"</SPAN
4093 > header to languages you understand,
4094     or to languages that aren't wide spread.
4095    </P
4096 ><P
4097 >    Before setting the <SPAN
4098 CLASS="QUOTE"
4099 >"Accept-Language:"</SPAN
4100 > header
4101     to a rare language, you should consider that it helps to
4102     make your requests unique and thus easier to trace.
4103     If you don't plan to change this header frequently,
4104     you should stick to a common language. 
4105    </P
4106 ></DD
4107 ><DT
4108 >Example usage (section):</DT
4109 ><DD
4110 ><P
4111 >     <TABLE
4112 BORDER="0"
4113 BGCOLOR="#E0E0E0"
4114 WIDTH="90%"
4115 ><TR
4116 ><TD
4117 ><PRE
4118 CLASS="SCREEN"
4119 ># Pretend to use Canadian language settings.
4120 {+hide-accept-language{en-ca} \
4121 +hide-user-agent{Mozilla/5.0 (X11; U; OpenBSD i386; en-CA; rv:1.8.0.4) Gecko/20060628 Firefox/1.5.0.4} \
4122 }
4123 /   </PRE
4124 ></TD
4125 ></TR
4126 ></TABLE
4127 >
4128    </P
4129 ></DD
4130 ></DL
4131 ></DIV
4132 ></DIV
4133 ><DIV
4134 CLASS="SECT3"
4135 ><H4
4136 CLASS="SECT3"
4137 ><A
4138 NAME="HIDE-CONTENT-DISPOSITION"
4139 ></A
4140 >8.5.19. hide-content-disposition</H4
4141 ><P
4142 ></P
4143 ><DIV
4144 CLASS="VARIABLELIST"
4145 ><DL
4146 ><DT
4147 >Typical use:</DT
4148 ><DD
4149 ><P
4150 >Prevent download menus for content you prefer to view inside the browser.</P
4151 ></DD
4152 ><DT
4153 >Effect:</DT
4154 ><DD
4155 ><P
4156 >    Deletes or replaces the <SPAN
4157 CLASS="QUOTE"
4158 >"Content-Disposition:"</SPAN
4159 > HTTP header set by some servers.
4160    </P
4161 ></DD
4162 ><DT
4163 >Type:</DT
4164 ><DD
4165 ><P
4166 >Parameterized.</P
4167 ></DD
4168 ><DT
4169 >Parameter:</DT
4170 ><DD
4171 ><P
4172 >    Keyword: <SPAN
4173 CLASS="QUOTE"
4174 >"block"</SPAN
4175 >, or any user defined value.
4176    </P
4177 ></DD
4178 ><DT
4179 >Notes:</DT
4180 ><DD
4181 ><P
4182 >    Some servers set the <SPAN
4183 CLASS="QUOTE"
4184 >"Content-Disposition:"</SPAN
4185 > HTTP header for
4186     documents they assume you want to save locally before viewing them.
4187     The <SPAN
4188 CLASS="QUOTE"
4189 >"Content-Disposition:"</SPAN
4190 > header contains the file name
4191     the browser is supposed to use by default.
4192    </P
4193 ><P
4194 >    In most browsers that understand this header, it makes it impossible to
4195     <SPAN
4196 CLASS="emphasis"
4197 ><I
4198 CLASS="EMPHASIS"
4199 >just view</I
4200 ></SPAN
4201 > the document, without downloading it first,
4202     even if it's just a simple text file or an image.
4203    </P
4204 ><P
4205 >    Removing the <SPAN
4206 CLASS="QUOTE"
4207 >"Content-Disposition:"</SPAN
4208 > header helps
4209     to prevent this annoyance, but some browsers additionally check the
4210     <SPAN
4211 CLASS="QUOTE"
4212 >"Content-Type:"</SPAN
4213 > header, before they decide if they can
4214     display a document without saving it first. In these cases, you have
4215     to change this header as well, before the browser stops displaying
4216     download menus.
4217    </P
4218 ><P
4219 >    It is also possible to change the server's file name suggestion
4220     to another one, but in most cases it isn't worth the time to set
4221     it up.
4222    </P
4223 ></DD
4224 ><DT
4225 >Example usage:</DT
4226 ><DD
4227 ><P
4228 >     <TABLE
4229 BORDER="0"
4230 BGCOLOR="#E0E0E0"
4231 WIDTH="90%"
4232 ><TR
4233 ><TD
4234 ><PRE
4235 CLASS="SCREEN"
4236 ># Disarm the download link in Sourceforge's patch tracker
4237 {-filter\
4238 +content-type-overwrite {text/plain}\
4239 +hide-content-disposition {block} }
4240 .sourceforge.net/tracker/download.php</PRE
4241 ></TD
4242 ></TR
4243 ></TABLE
4244 >
4245    </P
4246 ></DD
4247 ></DL
4248 ></DIV
4249 ></DIV
4250 ><DIV
4251 CLASS="SECT3"
4252 ><H4
4253 CLASS="SECT3"
4254 ><A
4255 NAME="HIDE-IF-MODIFIED-SINCE"
4256 ></A
4257 >8.5.20. hide-if-modified-since</H4
4258 ><P
4259 ></P
4260 ><DIV
4261 CLASS="VARIABLELIST"
4262 ><DL
4263 ><DT
4264 >Typical use:</DT
4265 ><DD
4266 ><P
4267 >Prevent yet another way to track the user's steps between sessions.</P
4268 ></DD
4269 ><DT
4270 >Effect:</DT
4271 ><DD
4272 ><P
4273 >    Deletes the <SPAN
4274 CLASS="QUOTE"
4275 >"If-Modified-Since:"</SPAN
4276 > HTTP client header or modifies its value. 
4277    </P
4278 ></DD
4279 ><DT
4280 >Type:</DT
4281 ><DD
4282 ><P
4283 >Parameterized.</P
4284 ></DD
4285 ><DT
4286 >Parameter:</DT
4287 ><DD
4288 ><P
4289 >    Keyword: <SPAN
4290 CLASS="QUOTE"
4291 >"block"</SPAN
4292 >, or a user defined value that specifies a range of hours.
4293    </P
4294 ></DD
4295 ><DT
4296 >Notes:</DT
4297 ><DD
4298 ><P
4299 >    Removing this header is useful for filter testing, where you want to force a real
4300     reload instead of getting status code <SPAN
4301 CLASS="QUOTE"
4302 >"304"</SPAN
4303 >, which would cause the
4304     browser to use a cached copy of the page.
4305    </P
4306 ><P
4307 >    Instead of removing the header, <TT
4308 CLASS="LITERAL"
4309 >hide-if-modified-since</TT
4310 > can
4311     also add or substract a random amount of time to/from the headers value.
4312     You specify a range of hours were the random factor should be chosen from and
4313     <SPAN
4314 CLASS="APPLICATION"
4315 >Privoxy</SPAN
4316 > does the rest. A negative value means
4317     subtracting, a positive value adding.
4318    </P
4319 ><P
4320 >    Randomizing the value of the <SPAN
4321 CLASS="QUOTE"
4322 >"If-Modified-Since:"</SPAN
4323 > makes
4324     sure it isn't used as a cookie replacement, but you will run into
4325     caching problems if the random range is too high.  
4326    </P
4327 ><P
4328 >    It is a good idea to only use a small negative value and let
4329     <TT
4330 CLASS="LITERAL"
4331 ><A
4332 HREF="actions-file.html#OVERWRITE-LAST-MODIFIED"
4333 >overwrite-last-modified</A
4334 ></TT
4335 >
4336     handle the greater changes.
4337    </P
4338 ><P
4339 >    It is also recommended to use this action together with
4340     <TT
4341 CLASS="LITERAL"
4342 ><A
4343 HREF="actions-file.html#CRUNCH-IF-NONE-MATCH"
4344 >crunch-if-none-match</A
4345 ></TT
4346 >.
4347    </P
4348 ></DD
4349 ><DT
4350 >Example usage (section):</DT
4351 ><DD
4352 ><P
4353 >     <TABLE
4354 BORDER="0"
4355 BGCOLOR="#E0E0E0"
4356 WIDTH="90%"
4357 ><TR
4358 ><TD
4359 ><PRE
4360 CLASS="SCREEN"
4361 ># Let the browser revalidate without being tracked across sessions
4362 {+hide-if-modified-since {-1}\
4363 +overwrite-last-modified {randomize}\
4364 +crunch-if-none-match}
4365 /</PRE
4366 ></TD
4367 ></TR
4368 ></TABLE
4369 >
4370    </P
4371 ></DD
4372 ></DL
4373 ></DIV
4374 ></DIV
4375 ><DIV
4376 CLASS="SECT3"
4377 ><H4
4378 CLASS="SECT3"
4379 ><A
4380 NAME="HIDE-FORWARDED-FOR-HEADERS"
4381 ></A
4382 >8.5.21. hide-forwarded-for-headers</H4
4383 ><P
4384 ></P
4385 ><DIV
4386 CLASS="VARIABLELIST"
4387 ><DL
4388 ><DT
4389 >Typical use:</DT
4390 ><DD
4391 ><P
4392 >Improve privacy by hiding the true source of the request</P
4393 ></DD
4394 ><DT
4395 >Effect:</DT
4396 ><DD
4397 ><P
4398 >    Deletes any existing <SPAN
4399 CLASS="QUOTE"
4400 >"X-Forwarded-for:"</SPAN
4401 > HTTP header from client requests,
4402     and prevents adding a new one.
4403    </P
4404 ></DD
4405 ><DT
4406 >Type:</DT
4407 ><DD
4408 ><P
4409 >Boolean.</P
4410 ></DD
4411 ><DT
4412 >Parameter:</DT
4413 ><DD
4414 ><P
4415 >    N/A
4416    </P
4417 ></DD
4418 ><DT
4419 >Notes:</DT
4420 ><DD
4421 ><P
4422 >    It is fairly safe to leave this on.
4423    </P
4424 ><P
4425 >    This action is scheduled for improvement: It should be able to generate forged 
4426     <SPAN
4427 CLASS="QUOTE"
4428 >"X-Forwarded-for:"</SPAN
4429 > headers using random IP addresses from a specified network,
4430     to make successive requests from the same client look like requests from a pool of different
4431     users sharing the same proxy.
4432    </P
4433 ></DD
4434 ><DT
4435 >Example usage:</DT
4436 ><DD
4437 ><P
4438 >     <TABLE
4439 BORDER="0"
4440 BGCOLOR="#E0E0E0"
4441 WIDTH="90%"
4442 ><TR
4443 ><TD
4444 ><PRE
4445 CLASS="SCREEN"
4446 >+hide-forwarded-for-headers</PRE
4447 ></TD
4448 ></TR
4449 ></TABLE
4450 >
4451    </P
4452 ></DD
4453 ></DL
4454 ></DIV
4455 ></DIV
4456 ><DIV
4457 CLASS="SECT3"
4458 ><H4
4459 CLASS="SECT3"
4460 ><A
4461 NAME="HIDE-FROM-HEADER"
4462 ></A
4463 >8.5.22. hide-from-header</H4
4464 ><P
4465 ></P
4466 ><DIV
4467 CLASS="VARIABLELIST"
4468 ><DL
4469 ><DT
4470 >Typical use:</DT
4471 ><DD
4472 ><P
4473 >Keep your (old and ill) browser from telling web servers your email address</P
4474 ></DD
4475 ><DT
4476 >Effect:</DT
4477 ><DD
4478 ><P
4479 >    Deletes any existing <SPAN
4480 CLASS="QUOTE"
4481 >"From:"</SPAN
4482 > HTTP header, or replaces it with the
4483     specified string.
4484    </P
4485 ></DD
4486 ><DT
4487 >Type:</DT
4488 ><DD
4489 ><P
4490 >Parameterized.</P
4491 ></DD
4492 ><DT
4493 >Parameter:</DT
4494 ><DD
4495 ><P
4496 >    Keyword: <SPAN
4497 CLASS="QUOTE"
4498 >"block"</SPAN
4499 >, or any user defined value.
4500    </P
4501 ></DD
4502 ><DT
4503 >Notes:</DT
4504 ><DD
4505 ><P
4506 >    The keyword <SPAN
4507 CLASS="QUOTE"
4508 >"block"</SPAN
4509 > will completely remove the header 
4510     (not to be confused with the <TT
4511 CLASS="LITERAL"
4512 ><A
4513 HREF="actions-file.html#BLOCK"
4514 >block</A
4515 ></TT
4516 >
4517     action).
4518    </P
4519 ><P
4520 >    Alternately, you can specify any value you prefer to be sent to the web
4521     server. If you do, it is a matter of fairness not to use any address that
4522     is actually used by a real person.
4523    </P
4524 ><P
4525 >    This action is rarely needed, as modern web browsers don't send
4526     <SPAN
4527 CLASS="QUOTE"
4528 >"From:"</SPAN
4529 > headers anymore.
4530    </P
4531 ></DD
4532 ><DT
4533 >Example usage:</DT
4534 ><DD
4535 ><P
4536 >    <TABLE
4537 BORDER="0"
4538 BGCOLOR="#E0E0E0"
4539 WIDTH="90%"
4540 ><TR
4541 ><TD
4542 ><PRE
4543 CLASS="SCREEN"
4544 >+hide-from-header{block}</PRE
4545 ></TD
4546 ></TR
4547 ></TABLE
4548 > or
4549     <TABLE
4550 BORDER="0"
4551 BGCOLOR="#E0E0E0"
4552 WIDTH="90%"
4553 ><TR
4554 ><TD
4555 ><PRE
4556 CLASS="SCREEN"
4557 >+hide-from-header{spam-me-senseless@sittingduck.example.com}</PRE
4558 ></TD
4559 ></TR
4560 ></TABLE
4561 >
4562    </P
4563 ></DD
4564 ></DL
4565 ></DIV
4566 ></DIV
4567 ><DIV
4568 CLASS="SECT3"
4569 ><H4
4570 CLASS="SECT3"
4571 ><A
4572 NAME="HIDE-REFERRER"
4573 ></A
4574 >8.5.23. hide-referrer</H4
4575 ><A
4576 NAME="HIDE-REFERER"
4577 ></A
4578 ><P
4579 ></P
4580 ><DIV
4581 CLASS="VARIABLELIST"
4582 ><DL
4583 ><DT
4584 >Typical use:</DT
4585 ><DD
4586 ><P
4587 >Conceal which link you followed to get to a particular site</P
4588 ></DD
4589 ><DT
4590 >Effect:</DT
4591 ><DD
4592 ><P
4593 >    Deletes the <SPAN
4594 CLASS="QUOTE"
4595 >"Referer:"</SPAN
4596 > (sic) HTTP header from the client request,
4597     or replaces it with a forged one.
4598    </P
4599 ></DD
4600 ><DT
4601 >Type:</DT
4602 ><DD
4603 ><P
4604 >Parameterized.</P
4605 ></DD
4606 ><DT
4607 >Parameter:</DT
4608 ><DD
4609 ><P
4610 ></P
4611 ><UL
4612 ><LI
4613 ><P
4614 ><SPAN
4615 CLASS="QUOTE"
4616 >"conditional-block"</SPAN
4617 > to delete the header completely if the host has changed.</P
4618 ></LI
4619 ><LI
4620 ><P
4621 ><SPAN
4622 CLASS="QUOTE"
4623 >"block"</SPAN
4624 > to delete the header unconditionally.</P
4625 ></LI
4626 ><LI
4627 ><P
4628 ><SPAN
4629 CLASS="QUOTE"
4630 >"forge"</SPAN
4631 > to pretend to be coming from the homepage of the server we are talking to.</P
4632 ></LI
4633 ><LI
4634 ><P
4635 >Any other string to set a user defined referrer.</P
4636 ></LI
4637 ></UL
4638 ></DD
4639 ><DT
4640 >Notes:</DT
4641 ><DD
4642 ><P
4643 >    <TT
4644 CLASS="LITERAL"
4645 >conditional-block</TT
4646 > is the only parameter,
4647     that isn't easily detected in the server's log file. If it blocks the
4648     referrer, the request will look like the visitor used a bookmark or
4649     typed in the address directly.
4650    </P
4651 ><P
4652 >    Leaving the referrer unmodified for requests on the same host
4653     allows the server owner to see the visitor's <SPAN
4654 CLASS="QUOTE"
4655 >"click path"</SPAN
4656 >,
4657     but in most cases she could also get that information by comparing
4658     other parts of the log file: for example the User-Agent if it isn't
4659     a very common one, or the user's IP address if it doesn't change between
4660     different requests.
4661    </P
4662 ><P
4663 >    Always blocking the referrer, or using a custom one, can lead to
4664     failures on servers that check the referrer before they answer any
4665     requests, in an attempt to prevent their valuable content from being
4666     embedded or linked to elsewhere.
4667    </P
4668 ><P
4669 >    Both <TT
4670 CLASS="LITERAL"
4671 >conditional-block</TT
4672 > and <TT
4673 CLASS="LITERAL"
4674 >forge</TT
4675 >
4676     will work with referrer checks, as long as content and valid referring page
4677     are on the same host. Most of the time that's the case.
4678    </P
4679 ><P
4680 >  
4681     <TT
4682 CLASS="LITERAL"
4683 >hide-referer</TT
4684 > is an alternate spelling of
4685     <TT
4686 CLASS="LITERAL"
4687 >hide-referrer</TT
4688 > and the two can be can be freely
4689     substituted with each other. (<SPAN
4690 CLASS="QUOTE"
4691 >"referrer"</SPAN
4692 > is the
4693     correct English spelling, however the HTTP specification has a bug - it
4694     requires it to be spelled as <SPAN
4695 CLASS="QUOTE"
4696 >"referer"</SPAN
4697 >.) 
4698    </P
4699 ></DD
4700 ><DT
4701 >Example usage:</DT
4702 ><DD
4703 ><P
4704 >     <TABLE
4705 BORDER="0"
4706 BGCOLOR="#E0E0E0"
4707 WIDTH="90%"
4708 ><TR
4709 ><TD
4710 ><PRE
4711 CLASS="SCREEN"
4712 >+hide-referrer{forge}</PRE
4713 ></TD
4714 ></TR
4715 ></TABLE
4716 > or
4717      <TABLE
4718 BORDER="0"
4719 BGCOLOR="#E0E0E0"
4720 WIDTH="90%"
4721 ><TR
4722 ><TD
4723 ><PRE
4724 CLASS="SCREEN"
4725 >+hide-referrer{http://www.yahoo.com/}</PRE
4726 ></TD
4727 ></TR
4728 ></TABLE
4729 >
4730    </P
4731 ></DD
4732 ></DL
4733 ></DIV
4734 ></DIV
4735 ><DIV
4736 CLASS="SECT3"
4737 ><H4
4738 CLASS="SECT3"
4739 ><A
4740 NAME="HIDE-USER-AGENT"
4741 ></A
4742 >8.5.24. hide-user-agent</H4
4743 ><P
4744 ></P
4745 ><DIV
4746 CLASS="VARIABLELIST"
4747 ><DL
4748 ><DT
4749 >Typical use:</DT
4750 ><DD
4751 ><P
4752 >Conceal your type of browser and client operating system</P
4753 ></DD
4754 ><DT
4755 >Effect:</DT
4756 ><DD
4757 ><P
4758 >    Replaces the value of the <SPAN
4759 CLASS="QUOTE"
4760 >"User-Agent:"</SPAN
4761 > HTTP header
4762     in client requests with the specified value.
4763    </P
4764 ></DD
4765 ><DT
4766 >Type:</DT
4767 ><DD
4768 ><P
4769 >Parameterized.</P
4770 ></DD
4771 ><DT
4772 >Parameter:</DT
4773 ><DD
4774 ><P
4775 >    Any user-defined string.
4776    </P
4777 ></DD
4778 ><DT
4779 >Notes:</DT
4780 ><DD
4781 ><DIV
4782 CLASS="WARNING"
4783 ><P
4784 ></P
4785 ><TABLE
4786 CLASS="WARNING"
4787 BORDER="1"
4788 WIDTH="90%"
4789 ><TR
4790 ><TD
4791 ALIGN="CENTER"
4792 ><B
4793 >Warning</B
4794 ></TD
4795 ></TR
4796 ><TR
4797 ><TD
4798 ALIGN="LEFT"
4799 ><P
4800 >     This can lead to problems on web sites that depend on looking at this header in
4801      order to customize their content for different browsers (which, by the
4802      way, is <SPAN
4803 CLASS="emphasis"
4804 ><I
4805 CLASS="EMPHASIS"
4806 >NOT</I
4807 ></SPAN
4808 > the right thing to do: good web sites
4809      work browser-independently). 
4810      
4811     </P
4812 ></TD
4813 ></TR
4814 ></TABLE
4815 ></DIV
4816 ><P
4817 >    Using this action in multi-user setups or wherever different types of
4818     browsers will access the same <SPAN
4819 CLASS="APPLICATION"
4820 >Privoxy</SPAN
4821 > is
4822     <SPAN
4823 CLASS="emphasis"
4824 ><I
4825 CLASS="EMPHASIS"
4826 >not recommended</I
4827 ></SPAN
4828 >. In single-user, single-browser
4829     setups, you might use it to delete your OS version information from
4830     the headers, because it is an invitation to exploit known bugs for your
4831     OS. It is also occasionally useful to forge this in order to access 
4832     sites that won't let you in otherwise (though there may be a good 
4833     reason in some cases). Example of this: some MSN sites will not 
4834     let <SPAN
4835 CLASS="APPLICATION"
4836 >Mozilla</SPAN
4837 > enter, yet forging to a 
4838     <SPAN
4839 CLASS="APPLICATION"
4840 >Netscape 6.1</SPAN
4841 > user-agent works just fine.
4842     (Must be just a silly MS goof, I'm sure :-).
4843    </P
4844 ><P
4845 >    This action is scheduled for improvement.
4846    </P
4847 ></DD
4848 ><DT
4849 >Example usage:</DT
4850 ><DD
4851 ><P
4852 >     <TABLE
4853 BORDER="0"
4854 BGCOLOR="#E0E0E0"
4855 WIDTH="90%"
4856 ><TR
4857 ><TD
4858 ><PRE
4859 CLASS="SCREEN"
4860 >+hide-user-agent{Netscape 6.1 (X11; I; Linux 2.4.18 i686)}</PRE
4861 ></TD
4862 ></TR
4863 ></TABLE
4864 >
4865    </P
4866 ></DD
4867 ></DL
4868 ></DIV
4869 ></DIV
4870 ><DIV
4871 CLASS="SECT3"
4872 ><H4
4873 CLASS="SECT3"
4874 ><A
4875 NAME="INSPECT-JPEGS"
4876 ></A
4877 >8.5.25. inspect-jpegs</H4
4878 ><P
4879 ></P
4880 ><DIV
4881 CLASS="VARIABLELIST"
4882 ><DL
4883 ><DT
4884 >Typical use:</DT
4885 ><DD
4886 ><P
4887 >To protect against the MS buffer over-run in JPEG processing</P
4888 ></DD
4889 ><DT
4890 >Effect:</DT
4891 ><DD
4892 ><P
4893 >    To protect against a known exploit
4894    </P
4895 ></DD
4896 ><DT
4897 >Type:</DT
4898 ><DD
4899 ><P
4900 >Boolean.</P
4901 ></DD
4902 ><DT
4903 >Parameter:</DT
4904 ><DD
4905 ><P
4906 >    N/A
4907    </P
4908 ></DD
4909 ><DT
4910 >Notes:</DT
4911 ><DD
4912 ><P
4913 >    See Microsoft Security Bulletin MS04-028. JPEG images are one of the most 
4914     common image types found across the Internet. The exploit as described can 
4915     allow execution of code on the target system, giving an attacker access 
4916     to the system in question by merely planting an altered JPEG image, which 
4917     would have no obvious indications of what lurks inside. This action
4918     prevents unwanted intrusion.
4919    </P
4920 ></DD
4921 ><DT
4922 >Example usage:</DT
4923 ><DD
4924 ><P
4925 ><TABLE
4926 BORDER="0"
4927 BGCOLOR="#E0E0E0"
4928 WIDTH="90%"
4929 ><TR
4930 ><TD
4931 ><PRE
4932 CLASS="SCREEN"
4933 >+inspect-jpegs</PRE
4934 ></TD
4935 ></TR
4936 ></TABLE
4937 ></P
4938 ></DD
4939 ></DL
4940 ></DIV
4941 ></DIV
4942 ><DIV
4943 CLASS="SECT3"
4944 ><H4
4945 CLASS="SECT3"
4946 ><A
4947 NAME="KILL-POPUPS"
4948 ></A
4949 >8.5.26. kill-popups<A
4950 NAME="KILL-POPUP"
4951 ></A
4952 ></H4
4953 ><P
4954 ></P
4955 ><DIV
4956 CLASS="VARIABLELIST"
4957 ><DL
4958 ><DT
4959 >Typical use:</DT
4960 ><DD
4961 ><P
4962 >Eliminate those annoying pop-up windows (deprecated)</P
4963 ></DD
4964 ><DT
4965 >Effect:</DT
4966 ><DD
4967 ><P
4968 >    While loading the document, replace JavaScript code that opens
4969     pop-up windows with (syntactically neutral) dummy code on the fly.
4970    </P
4971 ></DD
4972 ><DT
4973 >Type:</DT
4974 ><DD
4975 ><P
4976 >Boolean.</P
4977 ></DD
4978 ><DT
4979 >Parameter:</DT
4980 ><DD
4981 ><P
4982 >    N/A
4983    </P
4984 ></DD
4985 ><DT
4986 >Notes:</DT
4987 ><DD
4988 ><P
4989 >    This action is basically a built-in, hardwired special-purpose filter
4990     action, but there are important differences: For <TT
4991 CLASS="LITERAL"
4992 >kill-popups</TT
4993 >,
4994     the document need not be buffered, so it can be incrementally rendered while
4995     downloading. But <TT
4996 CLASS="LITERAL"
4997 >kill-popups</TT
4998 > doesn't catch as many pop-ups as
4999     <TT
5000 CLASS="LITERAL"
5001 ><A
5002 HREF="actions-file.html#FILTER-ALL-POPUPS"
5003 >filter{<TT
5004 CLASS="REPLACEABLE"
5005 ><I
5006 >all-popups</I
5007 ></TT
5008 >}</A
5009 ></TT
5010 >
5011     does and is not as smart as <TT
5012 CLASS="LITERAL"
5013 ><A
5014 HREF="actions-file.html#FILTER-UNSOLICITED-POPUPS"
5015 >filter{<TT
5016 CLASS="REPLACEABLE"
5017 ><I
5018 >unsolicited-popups</I
5019 ></TT
5020 >}</A
5021 >
5022     </TT
5023 >is.
5024    </P
5025 ><P
5026 >    Think of it as a fast and efficient replacement for a filter that you
5027     can use if you don't want any filtering at all. Note that it doesn't make
5028     sense to combine it with any <TT
5029 CLASS="LITERAL"
5030 ><A
5031 HREF="actions-file.html#FILTER"
5032 >filter</A
5033 ></TT
5034 > action,
5035     since as soon as one <TT
5036 CLASS="LITERAL"
5037 ><A
5038 HREF="actions-file.html#FILTER"
5039 >filter</A
5040 ></TT
5041 > applies,
5042     the whole document needs to be buffered anyway, which destroys the advantage of
5043     the <TT
5044 CLASS="LITERAL"
5045 >kill-popups</TT
5046 > action over its filter equivalent.
5047    </P
5048 ><P
5049 >    Killing all pop-ups unconditionally is problematic. Many shops and banks rely on
5050     pop-ups to display forms, shopping carts etc, and the <TT
5051 CLASS="LITERAL"
5052 ><A
5053 HREF="actions-file.html#FILTER-UNSOLICITED-POPUPS"
5054 >filter{<TT
5055 CLASS="REPLACEABLE"
5056 ><I
5057 >unsolicited-popups</I
5058 ></TT
5059 >}</A
5060 >
5061     </TT
5062 > does a fairly good job of catching only the unwanted ones.
5063    </P
5064 ><P
5065 >    If the only kind of pop-ups that you want to kill are exit consoles (those
5066     <SPAN
5067 CLASS="emphasis"
5068 ><I
5069 CLASS="EMPHASIS"
5070 >really nasty</I
5071 ></SPAN
5072 > windows that appear when you close an other
5073     one), you might want to use
5074     <TT
5075 CLASS="LITERAL"
5076 ><A
5077 HREF="actions-file.html#FILTER"
5078 >filter</A
5079 >{<TT
5080 CLASS="REPLACEABLE"
5081 ><I
5082 >js-annoyances</I
5083 ></TT
5084 >}</TT
5085 >
5086     instead. 
5087    </P
5088 ></DD
5089 ><DT
5090 >Example usage:</DT
5091 ><DD
5092 ><P
5093 ><TABLE
5094 BORDER="0"
5095 BGCOLOR="#E0E0E0"
5096 WIDTH="90%"
5097 ><TR
5098 ><TD
5099 ><PRE
5100 CLASS="SCREEN"
5101 >+kill-popups</PRE
5102 ></TD
5103 ></TR
5104 ></TABLE
5105 ></P
5106 ></DD
5107 ></DL
5108 ></DIV
5109 ></DIV
5110 ><DIV
5111 CLASS="SECT3"
5112 ><H4
5113 CLASS="SECT3"
5114 ><A
5115 NAME="LIMIT-CONNECT"
5116 ></A
5117 >8.5.27. limit-connect</H4
5118 ><P
5119 ></P
5120 ><DIV
5121 CLASS="VARIABLELIST"
5122 ><DL
5123 ><DT
5124 >Typical use:</DT
5125 ><DD
5126 ><P
5127 >Prevent abuse of <SPAN
5128 CLASS="APPLICATION"
5129 >Privoxy</SPAN
5130 > as a TCP proxy relay or disable SSL for untrusted sites</P
5131 ></DD
5132 ><DT
5133 >Effect:</DT
5134 ><DD
5135 ><P
5136 >    Specifies to which ports HTTP CONNECT requests are allowable.
5137    </P
5138 ></DD
5139 ><DT
5140 >Type:</DT
5141 ><DD
5142 ><P
5143 >Parameterized.</P
5144 ></DD
5145 ><DT
5146 >Parameter:</DT
5147 ><DD
5148 ><P
5149 >    A comma-separated list of ports or port ranges (the latter using dashes, with the minimum
5150     defaulting to 0 and the maximum to 65K).
5151    </P
5152 ></DD
5153 ><DT
5154 >Notes:</DT
5155 ><DD
5156 ><P
5157 >    By default, i.e. if no <TT
5158 CLASS="LITERAL"
5159 >limit-connect</TT
5160 > action applies,
5161     <SPAN
5162 CLASS="APPLICATION"
5163 >Privoxy</SPAN
5164 > only allows HTTP CONNECT
5165     requests to port 443 (the standard, secure HTTPS port). Use 
5166     <TT
5167 CLASS="LITERAL"
5168 >limit-connect</TT
5169 > if more fine-grained control is desired
5170     for some or all destinations.
5171    </P
5172 ><P
5173 >    The CONNECT methods exists in HTTP to allow access to secure websites
5174     (<SPAN
5175 CLASS="QUOTE"
5176 >"https://"</SPAN
5177 > URLs) through proxies. It works very simply:
5178     the proxy connects to the server on the specified port, and then
5179     short-circuits its connections to the client and to the remote server.
5180     This can be a big security hole, since CONNECT-enabled proxies can be
5181     abused as TCP relays very easily.
5182   </P
5183 ><P
5184 >   <SPAN
5185 CLASS="APPLICATION"
5186 >Privoxy</SPAN
5187 > relays HTTPS traffic without seeing
5188    the decoded content. Websites can leverage this limitation to circumvent Privoxy's
5189    filters. By specifying an invalid port range you can disable HTTPS entirely.
5190    If you plan to disable SSL by default, consider enabling 
5191    <TT
5192 CLASS="LITERAL"
5193 ><A
5194 HREF="actions-file.html#TREAT-FORBIDDEN-CONNECTS-LIKE-BLOCKS"
5195 >treat-forbidden-connects-like-blocks</A
5196 ></TT
5197 >
5198    as well, to be able to quickly create exceptions.
5199   </P
5200 ></DD
5201 ><DT
5202 >Example usages:</DT
5203 ><DD
5204 ><P
5205 >     <TABLE
5206 BORDER="0"
5207 BGCOLOR="#E0E0E0"
5208 WIDTH="90%"
5209 ><TR
5210 ><TD
5211 ><PRE
5212 CLASS="SCREEN"
5213 >+limit-connect{443}                   # This is the default and need not be specified.
5214 +limit-connect{80,443}                # Ports 80 and 443 are OK.
5215 +limit-connect{-3, 7, 20-100, 500-}   # Ports less than 3, 7, 20 to 100 and above 500 are OK.
5216 +limit-connect{-}                     # All ports are OK
5217 +limit-connect{,}                     # No HTTPS traffic is allowed</PRE
5218 ></TD
5219 ></TR
5220 ></TABLE
5221 >
5222    </P
5223 ></DD
5224 ></DL
5225 ></DIV
5226 ></DIV
5227 ><DIV
5228 CLASS="SECT3"
5229 ><H4
5230 CLASS="SECT3"
5231 ><A
5232 NAME="PREVENT-COMPRESSION"
5233 ></A
5234 >8.5.28. prevent-compression</H4
5235 ><P
5236 ></P
5237 ><DIV
5238 CLASS="VARIABLELIST"
5239 ><DL
5240 ><DT
5241 >Typical use:</DT
5242 ><DD
5243 ><P
5244 >    Ensure that servers send the content uncompressed, so it can be
5245     passed through <TT
5246 CLASS="LITERAL"
5247 ><A
5248 HREF="actions-file.html#FILTER"
5249 >filter</A
5250 ></TT
5251 >s.
5252    </P
5253 ></DD
5254 ><DT
5255 >Effect:</DT
5256 ><DD
5257 ><P
5258 >    Removes the Accept-Encoding header which can be used to ask for compressed transfer.
5259    </P
5260 ></DD
5261 ><DT
5262 >Type:</DT
5263 ><DD
5264 ><P
5265 >Boolean.</P
5266 ></DD
5267 ><DT
5268 >Parameter:</DT
5269 ><DD
5270 ><P
5271 >    N/A
5272    </P
5273 ></DD
5274 ><DT
5275 >Notes:</DT
5276 ><DD
5277 ><P
5278 >    More and more websites send their content compressed by default, which
5279     is generally a good idea and saves bandwidth. But for the <TT
5280 CLASS="LITERAL"
5281 ><A
5282 HREF="actions-file.html#FILTER"
5283 >filter</A
5284 ></TT
5285 >, <TT
5286 CLASS="LITERAL"
5287 ><A
5288 HREF="actions-file.html#DEANIMATE-GIFS"
5289 >deanimate-gifs</A
5290 ></TT
5291 >
5292     and <TT
5293 CLASS="LITERAL"
5294 ><A
5295 HREF="actions-file.html#KILL-POPUPS"
5296 >kill-popups</A
5297 ></TT
5298 > actions to work,
5299     <SPAN
5300 CLASS="APPLICATION"
5301 >Privoxy</SPAN
5302 > needs access to the  uncompressed data.
5303     Unfortunately, <SPAN
5304 CLASS="APPLICATION"
5305 >Privoxy</SPAN
5306 > can't yet(!)  uncompress, filter, and
5307     re-compress the content on the fly. So if you want to ensure that all websites, including
5308     those that normally compress, can be filtered, you need to use this action.
5309    </P
5310 ><P
5311 >    This will slow down transfers from those websites, though. If you use any of the above-mentioned
5312     actions, you will typically want to use <TT
5313 CLASS="LITERAL"
5314 >prevent-compression</TT
5315 > in conjunction
5316     with them.
5317    </P
5318 ><P
5319 >    Note that some (rare) ill-configured sites don't handle requests for uncompressed
5320     documents correctly (they send an empty document body). If you use <TT
5321 CLASS="LITERAL"
5322 >prevent-compression</TT
5323 >
5324     per default, you'll have to add exceptions for those sites. See the example for how to do that.
5325    </P
5326 ></DD
5327 ><DT
5328 >Example usage (sections):</DT
5329 ><DD
5330 ><P
5331 >    <TABLE
5332 BORDER="0"
5333 BGCOLOR="#E0E0E0"
5334 WIDTH="90%"
5335 ><TR
5336 ><TD
5337 ><PRE
5338 CLASS="SCREEN"
5339 ># Set default:
5340 #
5341 {+prevent-compression}
5342 / # Match all sites
5343
5344 # Make exceptions for ill sites:
5345 #
5346 {-prevent-compression}
5347 www.debianhelp.org
5348 www.pclinuxonline.com</PRE
5349 ></TD
5350 ></TR
5351 ></TABLE
5352 >
5353    </P
5354 ></DD
5355 ></DL
5356 ></DIV
5357 ></DIV
5358 ><DIV
5359 CLASS="SECT3"
5360 ><H4
5361 CLASS="SECT3"
5362 ><A
5363 NAME="OVERWRITE-LAST-MODIFIED"
5364 ></A
5365 >8.5.29. overwrite-last-modified</H4
5366 ><P
5367 ></P
5368 ><DIV
5369 CLASS="VARIABLELIST"
5370 ><DL
5371 ><DT
5372 >Typical use:</DT
5373 ><DD
5374 ><P
5375 >Prevent yet another way to track the user's steps between sessions.</P
5376 ></DD
5377 ><DT
5378 >Effect:</DT
5379 ><DD
5380 ><P
5381 >    Deletes the <SPAN
5382 CLASS="QUOTE"
5383 >"Last-Modified:"</SPAN
5384 > HTTP server header or modifies its value. 
5385    </P
5386 ></DD
5387 ><DT
5388 >Type:</DT
5389 ><DD
5390 ><P
5391 >Parameterized.</P
5392 ></DD
5393 ><DT
5394 >Parameter:</DT
5395 ><DD
5396 ><P
5397 >    One of the keywords: <SPAN
5398 CLASS="QUOTE"
5399 >"block"</SPAN
5400 >, <SPAN
5401 CLASS="QUOTE"
5402 >"reset-to-request-time"</SPAN
5403 >
5404     and <SPAN
5405 CLASS="QUOTE"
5406 >"randomize"</SPAN
5407 >
5408    </P
5409 ></DD
5410 ><DT
5411 >Notes:</DT
5412 ><DD
5413 ><P
5414 >    Removing the <SPAN
5415 CLASS="QUOTE"
5416 >"Last-Modified:"</SPAN
5417 > header is useful for filter
5418     testing, where you want to force a real reload instead of getting status
5419     code <SPAN
5420 CLASS="QUOTE"
5421 >"304"</SPAN
5422 >, which would cause the browser to reuse the old
5423     version of the page.
5424    </P
5425 ><P
5426 >    The <SPAN
5427 CLASS="QUOTE"
5428 >"randomize"</SPAN
5429 > option overwrites the value of the
5430     <SPAN
5431 CLASS="QUOTE"
5432 >"Last-Modified:"</SPAN
5433 > header with a randomly chosen time
5434     between the original value and the current time. In theory the server
5435     could send each document with a different <SPAN
5436 CLASS="QUOTE"
5437 >"Last-Modified:"</SPAN
5438 >
5439     header to track visits without using cookies. <SPAN
5440 CLASS="QUOTE"
5441 >"Randomize"</SPAN
5442 >
5443     makes it impossible and the browser can still revalidate cached documents. 
5444    </P
5445 ><P
5446 >    <SPAN
5447 CLASS="QUOTE"
5448 >"reset-to-request-time"</SPAN
5449 > overwrites the value of the
5450     <SPAN
5451 CLASS="QUOTE"
5452 >"Last-Modified:"</SPAN
5453 > header with the current time. You could use
5454     this option together with
5455     <TT
5456 CLASS="LITERAL"
5457 ><A
5458 HREF="actions-file.html#HIDE-IF-MODIFIED-SINCE"
5459 >hided-if-modified-since</A
5460 ></TT
5461 >
5462     to further customize your random range.
5463    </P
5464 ><P
5465 >    The preferred parameter here is <SPAN
5466 CLASS="QUOTE"
5467 >"randomize"</SPAN
5468 >. It is safe
5469     to use, as long as the time settings are more or less correct.
5470     If the server sets the <SPAN
5471 CLASS="QUOTE"
5472 >"Last-Modified:"</SPAN
5473 > header to the time
5474     of the request, the random range becomes zero and the value stays the same.
5475     Therefore you should later randomize it a second time with
5476     <TT
5477 CLASS="LITERAL"
5478 ><A
5479 HREF="actions-file.html#HIDE-IF-MODIFIED-SINCE"
5480 >hided-if-modified-since</A
5481 ></TT
5482 >,
5483     just to be sure. 
5484    </P
5485 ><P
5486 >    It is also recommended to use this action together with
5487     <TT
5488 CLASS="LITERAL"
5489 ><A
5490 HREF="actions-file.html#CRUNCH-IF-NONE-MATCH"
5491 >crunch-if-none-match</A
5492 ></TT
5493 >.
5494    </P
5495 ></DD
5496 ><DT
5497 >Example usage:</DT
5498 ><DD
5499 ><P
5500 >     <TABLE
5501 BORDER="0"
5502 BGCOLOR="#E0E0E0"
5503 WIDTH="90%"
5504 ><TR
5505 ><TD
5506 ><PRE
5507 CLASS="SCREEN"
5508 ># Let the browser revalidate without being tracked across sessions
5509 {+hide-if-modified-since {-1}\
5510 +overwrite-last-modified {randomize}\
5511 +crunch-if-none-match}
5512 /</PRE
5513 ></TD
5514 ></TR
5515 ></TABLE
5516 >
5517    </P
5518 ></DD
5519 ></DL
5520 ></DIV
5521 ></DIV
5522 ><DIV
5523 CLASS="SECT3"
5524 ><H4
5525 CLASS="SECT3"
5526 ><A
5527 NAME="REDIRECT"
5528 ></A
5529 >8.5.30. redirect</H4
5530 ><P
5531 ></P
5532 ><DIV
5533 CLASS="VARIABLELIST"
5534 ><DL
5535 ><DT
5536 >Typical use:</DT
5537 ><DD
5538 ><P
5539 >    Redirect requests to other sites.
5540    </P
5541 ></DD
5542 ><DT
5543 >Effect:</DT
5544 ><DD
5545 ><P
5546 >    Convinces the browser that the requested document has been moved
5547     to another location and the browser should get it from there.
5548    </P
5549 ></DD
5550 ><DT
5551 >Type:</DT
5552 ><DD
5553 ><P
5554 >Parameterized</P
5555 ></DD
5556 ><DT
5557 >Parameter:</DT
5558 ><DD
5559 ><P
5560 >    Any URL.
5561    </P
5562 ></DD
5563 ><DT
5564 >Notes:</DT
5565 ><DD
5566 ><P
5567 >    This action is useful to replace whole documents with your own
5568     ones. For that to work, they have to be available on another server.
5569    </P
5570 ><P
5571 >    You can do the same by combining the actions
5572     <TT
5573 CLASS="LITERAL"
5574 ><A
5575 HREF="actions-file.html#BLOCK"
5576 >block</A
5577 ></TT
5578 >,
5579     <TT
5580 CLASS="LITERAL"
5581 ><A
5582 HREF="actions-file.html#HANDLE-AS-IMAGE"
5583 >handle-as-image</A
5584 ></TT
5585 > and
5586     <TT
5587 CLASS="LITERAL"
5588 ><A
5589 HREF="actions-file.html#SET-IMAGE-BLOCKER"
5590 >set-image-blocker{URL}</A
5591 ></TT
5592 >.
5593     It doesn't sound right for non-image documents, and that's why this action
5594     was created.
5595    </P
5596 ><P
5597 >    This action will be ignored if you use it together with
5598     <TT
5599 CLASS="LITERAL"
5600 ><A
5601 HREF="actions-file.html#BLOCK"
5602 >block</A
5603 ></TT
5604 >.
5605    </P
5606 ></DD
5607 ><DT
5608 >Example usage:</DT
5609 ><DD
5610 ><P
5611 >    <TABLE
5612 BORDER="0"
5613 BGCOLOR="#E0E0E0"
5614 WIDTH="90%"
5615 ><TR
5616 ><TD
5617 ><PRE
5618 CLASS="SCREEN"
5619 ># Replace example.com's style sheet with another one
5620 {+redirect{http://localhost/css-replacements/example.com.css}}
5621 example.com/stylesheet.css</PRE
5622 ></TD
5623 ></TR
5624 ></TABLE
5625 >
5626    </P
5627 ></DD
5628 ></DL
5629 ></DIV
5630 ></DIV
5631 ><DIV
5632 CLASS="SECT3"
5633 ><H4
5634 CLASS="SECT3"
5635 ><A
5636 NAME="SEND-VANILLA-WAFER"
5637 ></A
5638 >8.5.31. send-vanilla-wafer</H4
5639 ><P
5640 ></P
5641 ><DIV
5642 CLASS="VARIABLELIST"
5643 ><DL
5644 ><DT
5645 >Typical use:</DT
5646 ><DD
5647 ><P
5648 >    Feed log analysis scripts with useless data.
5649    </P
5650 ></DD
5651 ><DT
5652 >Effect:</DT
5653 ><DD
5654 ><P
5655 >    Sends a cookie with each request stating that you do not accept any copyright
5656     on cookies sent to you, and asking the site operator not to track you.
5657    </P
5658 ></DD
5659 ><DT
5660 >Type:</DT
5661 ><DD
5662 ><P
5663 >Boolean.</P
5664 ></DD
5665 ><DT
5666 >Parameter:</DT
5667 ><DD
5668 ><P
5669 >    N/A
5670    </P
5671 ></DD
5672 ><DT
5673 >Notes:</DT
5674 ><DD
5675 ><P
5676 >    The vanilla wafer is a (relatively) unique header and could conceivably be used to track you.
5677    </P
5678 ><P
5679 >    This action is rarely used and not enabled in the default configuration.
5680    </P
5681 ></DD
5682 ><DT
5683 >Example usage:</DT
5684 ><DD
5685 ><P
5686 >     <TABLE
5687 BORDER="0"
5688 BGCOLOR="#E0E0E0"
5689 WIDTH="90%"
5690 ><TR
5691 ><TD
5692 ><PRE
5693 CLASS="SCREEN"
5694 >+send-vanilla-wafer</PRE
5695 ></TD
5696 ></TR
5697 ></TABLE
5698 >
5699    </P
5700 ></DD
5701 ></DL
5702 ></DIV
5703 ></DIV
5704 ><DIV
5705 CLASS="SECT3"
5706 ><H4
5707 CLASS="SECT3"
5708 ><A
5709 NAME="SEND-WAFER"
5710 ></A
5711 >8.5.32. send-wafer</H4
5712 ><P
5713 ></P
5714 ><DIV
5715 CLASS="VARIABLELIST"
5716 ><DL
5717 ><DT
5718 >Typical use:</DT
5719 ><DD
5720 ><P
5721 >    Send custom cookies or feed log analysis scripts with even more useless data.
5722    </P
5723 ></DD
5724 ><DT
5725 >Effect:</DT
5726 ><DD
5727 ><P
5728 >    Sends a custom, user-defined cookie with each request.
5729    </P
5730 ></DD
5731 ><DT
5732 >Type:</DT
5733 ><DD
5734 ><P
5735 >Multi-value.</P
5736 ></DD
5737 ><DT
5738 >Parameter:</DT
5739 ><DD
5740 ><P
5741 >    A string of the form <SPAN
5742 CLASS="QUOTE"
5743 >"<TT
5744 CLASS="REPLACEABLE"
5745 ><I
5746 >name</I
5747 ></TT
5748 >=<TT
5749 CLASS="REPLACEABLE"
5750 ><I
5751 >value</I
5752 ></TT
5753 >"</SPAN
5754 >.
5755    </P
5756 ></DD
5757 ><DT
5758 >Notes:</DT
5759 ><DD
5760 ><P
5761 >    Being multi-valued, multiple instances of this action can apply to the same request,
5762     resulting in multiple cookies being sent.
5763    </P
5764 ><P
5765 >    This action is rarely used and not enabled in the default configuration.
5766    </P
5767 ></DD
5768 ><DT
5769 >Example usage (section):</DT
5770 ><DD
5771 ><P
5772 >    <TABLE
5773 BORDER="0"
5774 BGCOLOR="#E0E0E0"
5775 WIDTH="90%"
5776 ><TR
5777 ><TD
5778 ><PRE
5779 CLASS="SCREEN"
5780 >{+send-wafer{UsingPrivoxy=true}}
5781 my-internal-testing-server.void</PRE
5782 ></TD
5783 ></TR
5784 ></TABLE
5785 >
5786    </P
5787 ></DD
5788 ></DL
5789 ></DIV
5790 ></DIV
5791 ><DIV
5792 CLASS="SECT3"
5793 ><H4
5794 CLASS="SECT3"
5795 ><A
5796 NAME="SESSION-COOKIES-ONLY"
5797 ></A
5798 >8.5.33. session-cookies-only</H4
5799 ><P
5800 ></P
5801 ><DIV
5802 CLASS="VARIABLELIST"
5803 ><DL
5804 ><DT
5805 >Typical use:</DT
5806 ><DD
5807 ><P
5808 >    Allow only temporary <SPAN
5809 CLASS="QUOTE"
5810 >"session"</SPAN
5811 > cookies (for the current
5812     browser session <SPAN
5813 CLASS="emphasis"
5814 ><I
5815 CLASS="EMPHASIS"
5816 >only</I
5817 ></SPAN
5818 >). 
5819    </P
5820 ></DD
5821 ><DT
5822 >Effect:</DT
5823 ><DD
5824 ><P
5825 >    Deletes the <SPAN
5826 CLASS="QUOTE"
5827 >"expires"</SPAN
5828 > field from <SPAN
5829 CLASS="QUOTE"
5830 >"Set-Cookie:"</SPAN
5831 >
5832     server headers. Most browsers will not store such cookies permanently and
5833     forget them in between sessions.
5834    </P
5835 ></DD
5836 ><DT
5837 >Type:</DT
5838 ><DD
5839 ><P
5840 >Boolean.</P
5841 ></DD
5842 ><DT
5843 >Parameter:</DT
5844 ><DD
5845 ><P
5846 >    N/A
5847    </P
5848 ></DD
5849 ><DT
5850 >Notes:</DT
5851 ><DD
5852 ><P
5853 >    This is less strict than <TT
5854 CLASS="LITERAL"
5855 ><A
5856 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
5857 >crunch-incoming-cookies</A
5858 ></TT
5859 > / 
5860     <TT
5861 CLASS="LITERAL"
5862 ><A
5863 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
5864 >crunch-outgoing-cookies</A
5865 ></TT
5866 > and allows you to browse
5867     websites that insist or rely on setting cookies, without compromising your privacy too badly.
5868    </P
5869 ><P
5870 >    Most browsers will not permanently store cookies that have been processed by
5871     <TT
5872 CLASS="LITERAL"
5873 >session-cookies-only</TT
5874 > and will forget about them between sessions.
5875     This makes profiling cookies useless, but won't break sites which require cookies so
5876     that you can log in for transactions. This is generally turned on for all 
5877     sites, and is the recommended setting.
5878    </P
5879 ><P
5880 >    It makes <SPAN
5881 CLASS="emphasis"
5882 ><I
5883 CLASS="EMPHASIS"
5884 >no sense at all</I
5885 ></SPAN
5886 > to use <TT
5887 CLASS="LITERAL"
5888 >session-cookies-only</TT
5889 >
5890     together with <TT
5891 CLASS="LITERAL"
5892 ><A
5893 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
5894 >crunch-incoming-cookies</A
5895 ></TT
5896 > or
5897     <TT
5898 CLASS="LITERAL"
5899 ><A
5900 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
5901 >crunch-outgoing-cookies</A
5902 ></TT
5903 >. If you do, cookies
5904     will be plainly killed.
5905    </P
5906 ><P
5907 >    Note that it is up to the browser how it handles such cookies without an <SPAN
5908 CLASS="QUOTE"
5909 >"expires"</SPAN
5910 >
5911     field. If you use an exotic browser, you might want to try it out to be sure.
5912    </P
5913 ><P
5914 >    This setting also has no effect on cookies that may have been stored
5915     previously by the browser before starting <SPAN
5916 CLASS="APPLICATION"
5917 >Privoxy</SPAN
5918 >.
5919     These would have to be removed manually.
5920    </P
5921 ><P
5922 >     <SPAN
5923 CLASS="APPLICATION"
5924 >Privoxy</SPAN
5925 > also uses  
5926      the <A
5927 HREF="actions-file.html#FILTER-CONTENT-COOKIES"
5928 >content-cookies filter</A
5929
5930      to block some types of cookies. Content cookies are not effected by 
5931      <TT
5932 CLASS="LITERAL"
5933 >session-cookies-only</TT
5934 >.
5935    </P
5936 ></DD
5937 ><DT
5938 >Example usage:</DT
5939 ><DD
5940 ><P
5941 >     <TABLE
5942 BORDER="0"
5943 BGCOLOR="#E0E0E0"
5944 WIDTH="90%"
5945 ><TR
5946 ><TD
5947 ><PRE
5948 CLASS="SCREEN"
5949 >+session-cookies-only</PRE
5950 ></TD
5951 ></TR
5952 ></TABLE
5953 >
5954    </P
5955 ></DD
5956 ></DL
5957 ></DIV
5958 ></DIV
5959 ><DIV
5960 CLASS="SECT3"
5961 ><H4
5962 CLASS="SECT3"
5963 ><A
5964 NAME="SET-IMAGE-BLOCKER"
5965 ></A
5966 >8.5.34. set-image-blocker</H4
5967 ><P
5968 ></P
5969 ><DIV
5970 CLASS="VARIABLELIST"
5971 ><DL
5972 ><DT
5973 >Typical use:</DT
5974 ><DD
5975 ><P
5976 >Choose the replacement for blocked images</P
5977 ></DD
5978 ><DT
5979 >Effect:</DT
5980 ><DD
5981 ><P
5982 >     This action alone doesn't do anything noticeable. If <SPAN
5983 CLASS="emphasis"
5984 ><I
5985 CLASS="EMPHASIS"
5986 >both</I
5987 ></SPAN
5988 >
5989      <TT
5990 CLASS="LITERAL"
5991 ><A
5992 HREF="actions-file.html#BLOCK"
5993 >block</A
5994 ></TT
5995 > <SPAN
5996 CLASS="emphasis"
5997 ><I
5998 CLASS="EMPHASIS"
5999 >and</I
6000 ></SPAN
6001 > <TT
6002 CLASS="LITERAL"
6003 ><A
6004 HREF="actions-file.html#HANDLE-AS-IMAGE"
6005 >handle-as-image</A
6006 ></TT
6007 > <SPAN
6008 CLASS="emphasis"
6009 ><I
6010 CLASS="EMPHASIS"
6011 >also</I
6012 ></SPAN
6013 >
6014      apply, i.e. if the request is to be blocked as an image,
6015      <SPAN
6016 CLASS="emphasis"
6017 ><I
6018 CLASS="EMPHASIS"
6019 >then</I
6020 ></SPAN
6021 > the parameter of this action decides what will be
6022      sent as a replacement.
6023    </P
6024 ></DD
6025 ><DT
6026 >Type:</DT
6027 ><DD
6028 ><P
6029 >Parameterized.</P
6030 ></DD
6031 ><DT
6032 >Parameter:</DT
6033 ><DD
6034 ><P
6035 ></P
6036 ><UL
6037 ><LI
6038 ><P
6039 >      <SPAN
6040 CLASS="QUOTE"
6041 >"pattern"</SPAN
6042 > to send a built-in checkerboard pattern image. The image is visually
6043       decent, scales very well, and makes it obvious where banners were busted.
6044      </P
6045 ></LI
6046 ><LI
6047 ><P
6048 >      <SPAN
6049 CLASS="QUOTE"
6050 >"blank"</SPAN
6051 > to send a built-in transparent image. This makes banners disappear
6052       completely, but makes it hard to detect where <SPAN
6053 CLASS="APPLICATION"
6054 >Privoxy</SPAN
6055 > has blocked
6056       images on a given page and complicates troubleshooting if <SPAN
6057 CLASS="APPLICATION"
6058 >Privoxy</SPAN
6059 >
6060       has blocked innocent images, like navigation icons.
6061      </P
6062 ></LI
6063 ><LI
6064 ><P
6065 >      <SPAN
6066 CLASS="QUOTE"
6067 >"<TT
6068 CLASS="REPLACEABLE"
6069 ><I
6070 >target-url</I
6071 ></TT
6072 >"</SPAN
6073 > to
6074       send a redirect to <TT
6075 CLASS="REPLACEABLE"
6076 ><I
6077 >target-url</I
6078 ></TT
6079 >. You can redirect
6080       to any image anywhere, even in your local filesystem via <SPAN
6081 CLASS="QUOTE"
6082 >"file:///"</SPAN
6083 > URL. 
6084       (But note that not all browsers support redirecting to a local file system).
6085      </P
6086 ><P
6087 >      A good application of redirects is to use special <SPAN
6088 CLASS="APPLICATION"
6089 >Privoxy</SPAN
6090 >-built-in
6091       URLs, which send the built-in images, as <TT
6092 CLASS="REPLACEABLE"
6093 ><I
6094 >target-url</I
6095 ></TT
6096 >.
6097       This has the same visual effect as specifying <SPAN
6098 CLASS="QUOTE"
6099 >"blank"</SPAN
6100 > or <SPAN
6101 CLASS="QUOTE"
6102 >"pattern"</SPAN
6103 > in
6104       the first place, but enables your browser to cache the replacement image, instead of requesting
6105       it over and over again.
6106      </P
6107 ></LI
6108 ></UL
6109 ></DD
6110 ><DT
6111 >Notes:</DT
6112 ><DD
6113 ><P
6114 >    The URLs for the built-in images are <SPAN
6115 CLASS="QUOTE"
6116 >"http://config.privoxy.org/send-banner?type=<TT
6117 CLASS="REPLACEABLE"
6118 ><I
6119 >type</I
6120 ></TT
6121 >"</SPAN
6122 >, where <TT
6123 CLASS="REPLACEABLE"
6124 ><I
6125 >type</I
6126 ></TT
6127 > is
6128     either <SPAN
6129 CLASS="QUOTE"
6130 >"blank"</SPAN
6131 > or <SPAN
6132 CLASS="QUOTE"
6133 >"pattern"</SPAN
6134 >.
6135    </P
6136 ><P
6137 >    There is a third (advanced) type, called <SPAN
6138 CLASS="QUOTE"
6139 >"auto"</SPAN
6140 >. It is <SPAN
6141 CLASS="emphasis"
6142 ><I
6143 CLASS="EMPHASIS"
6144 >NOT</I
6145 ></SPAN
6146 > to be
6147     used in <TT
6148 CLASS="LITERAL"
6149 >set-image-blocker</TT
6150 >, but meant for use from <A
6151 HREF="filter-file.html"
6152 >filters</A
6153 >.
6154     Auto will select the type of image that would have applied to the referring page, had it been an image.
6155    </P
6156 ></DD
6157 ><DT
6158 >Example usage:</DT
6159 ><DD
6160 ><P
6161 >    Built-in pattern:
6162    </P
6163 ><P
6164 >    <TABLE
6165 BORDER="0"
6166 BGCOLOR="#E0E0E0"
6167 WIDTH="90%"
6168 ><TR
6169 ><TD
6170 ><PRE
6171 CLASS="SCREEN"
6172 >+set-image-blocker{pattern}</PRE
6173 ></TD
6174 ></TR
6175 ></TABLE
6176 >
6177    </P
6178 ><P
6179 >    Redirect to the BSD devil:
6180    </P
6181 ><P
6182 >    <TABLE
6183 BORDER="0"
6184 BGCOLOR="#E0E0E0"
6185 WIDTH="90%"
6186 ><TR
6187 ><TD
6188 ><PRE
6189 CLASS="SCREEN"
6190 >+set-image-blocker{http://www.freebsd.org/gifs/dae_up3.gif}</PRE
6191 ></TD
6192 ></TR
6193 ></TABLE
6194 >
6195    </P
6196 ><P
6197 >    Redirect to the built-in pattern for better caching:
6198    </P
6199 ><P
6200 >    <TABLE
6201 BORDER="0"
6202 BGCOLOR="#E0E0E0"
6203 WIDTH="90%"
6204 ><TR
6205 ><TD
6206 ><PRE
6207 CLASS="SCREEN"
6208 >+set-image-blocker{http://config.privoxy.org/send-banner?type=pattern}</PRE
6209 ></TD
6210 ></TR
6211 ></TABLE
6212 >
6213    </P
6214 ></DD
6215 ></DL
6216 ></DIV
6217 ></DIV
6218 ><DIV
6219 CLASS="SECT3"
6220 ><H4
6221 CLASS="SECT3"
6222 ><A
6223 NAME="TREAT-FORBIDDEN-CONNECTS-LIKE-BLOCKS"
6224 ></A
6225 >8.5.35. treat-forbidden-connects-like-blocks</H4
6226 ><P
6227 ></P
6228 ><DIV
6229 CLASS="VARIABLELIST"
6230 ><DL
6231 ><DT
6232 >Typical use:</DT
6233 ><DD
6234 ><P
6235 >Block forbidden connects with an easy to find error message.</P
6236 ></DD
6237 ><DT
6238 >Effect:</DT
6239 ><DD
6240 ><P
6241 >    If this action is enabled, <SPAN
6242 CLASS="APPLICATION"
6243 >Privoxy</SPAN
6244 > no longer
6245     makes a difference between forbidden connects and ordinary blocks. 
6246    </P
6247 ></DD
6248 ><DT
6249 >Type:</DT
6250 ><DD
6251 ><P
6252 >Boolean</P
6253 ></DD
6254 ><DT
6255 >Parameter:</DT
6256 ><DD
6257 ><P
6258 >N/A</P
6259 ></DD
6260 ><DT
6261 >Notes:</DT
6262 ><DD
6263 ><P
6264 >    By default <SPAN
6265 CLASS="APPLICATION"
6266 >Privoxy</SPAN
6267 > answers
6268     <A
6269 HREF="actions-file.html#LIMIT-CONNECT"
6270 >forbidden <SPAN
6271 CLASS="QUOTE"
6272 >"Connect"</SPAN
6273 > requests</A
6274 >
6275     with a short error message inside the headers. If the browser doesn't display
6276     headers (most don't), you just see an empty page.
6277    </P
6278 ><P
6279 >    With this action enabled, <SPAN
6280 CLASS="APPLICATION"
6281 >Privoxy</SPAN
6282 > displays
6283     the message that is used for ordinary blocks instead. If you decide
6284     to make an exception for the page in question, you can do so by
6285     following the <SPAN
6286 CLASS="QUOTE"
6287 >"See why"</SPAN
6288 > link.
6289    </P
6290 ><P
6291 >    For <SPAN
6292 CLASS="QUOTE"
6293 >"Connect"</SPAN
6294 > requests the clients tell
6295     <SPAN
6296 CLASS="APPLICATION"
6297 >Privoxy</SPAN
6298 > which host they are interested
6299     in, but not which document they plan to get later. As a result, the
6300     <SPAN
6301 CLASS="QUOTE"
6302 >"Go there anyway"</SPAN
6303 > link becomes rather useless:
6304     it lets the client request the home page of the forbidden host
6305     through unencrypted HTTP, still using the port of the last request.
6306    </P
6307 ><P
6308 >    If you previously configured <SPAN
6309 CLASS="APPLICATION"
6310 >Privoxy</SPAN
6311 > to do the
6312     request through a SSL tunnel, everything will work. Most likely you haven't
6313     and the server will responds with an error message because it is expecting
6314     HTTPS.
6315    </P
6316 ></DD
6317 ><DT
6318 >Example usage:</DT
6319 ><DD
6320 ><P
6321 >    <TABLE
6322 BORDER="0"
6323 BGCOLOR="#E0E0E0"
6324 WIDTH="90%"
6325 ><TR
6326 ><TD
6327 ><PRE
6328 CLASS="SCREEN"
6329 >+treat-forbidden-connects-like-blocks</PRE
6330 ></TD
6331 ></TR
6332 ></TABLE
6333 >
6334    </P
6335 ></DD
6336 ></DL
6337 ></DIV
6338 ></DIV
6339 ><DIV
6340 CLASS="SECT3"
6341 ><H3
6342 CLASS="SECT3"
6343 ><A
6344 NAME="AEN3633"
6345 ></A
6346 >8.5.36. Summary</H3
6347 ><P
6348 > Note that many of these actions have the potential to cause a page to
6349  misbehave, possibly even not to display at all. There are many ways 
6350  a site designer may choose to design his site, and what HTTP header 
6351  content, and other criteria, he may depend on. There is no way to have hard
6352  and fast rules for all sites. See the <A
6353 HREF="appendix.html#ACTIONSANAT"
6354 >Appendix</A
6355 > for a brief example on troubleshooting
6356  actions.</P
6357 ></DIV
6358 ></DIV
6359 ><DIV
6360 CLASS="SECT2"
6361 ><H2
6362 CLASS="SECT2"
6363 ><A
6364 NAME="ALIASES"
6365 ></A
6366 >8.6. Aliases</H2
6367 ><P
6368 > Custom <SPAN
6369 CLASS="QUOTE"
6370 >"actions"</SPAN
6371 >, known to <SPAN
6372 CLASS="APPLICATION"
6373 >Privoxy</SPAN
6374 >
6375  as <SPAN
6376 CLASS="QUOTE"
6377 >"aliases"</SPAN
6378 >, can be defined by combining other actions.
6379  These can in turn be invoked just like the built-in actions.
6380  Currently, an alias name can contain any character except space, tab,
6381  <SPAN
6382 CLASS="QUOTE"
6383 >"="</SPAN
6384 >,
6385  <SPAN
6386 CLASS="QUOTE"
6387 >"{"</SPAN
6388 > and <SPAN
6389 CLASS="QUOTE"
6390 >"}"</SPAN
6391 >, but we <SPAN
6392 CLASS="emphasis"
6393 ><I
6394 CLASS="EMPHASIS"
6395 >strongly 
6396  recommend</I
6397 ></SPAN
6398 > that you only use <SPAN
6399 CLASS="QUOTE"
6400 >"a"</SPAN
6401 > to <SPAN
6402 CLASS="QUOTE"
6403 >"z"</SPAN
6404 >,
6405  <SPAN
6406 CLASS="QUOTE"
6407 >"0"</SPAN
6408 > to <SPAN
6409 CLASS="QUOTE"
6410 >"9"</SPAN
6411 >, <SPAN
6412 CLASS="QUOTE"
6413 >"+"</SPAN
6414 >, and <SPAN
6415 CLASS="QUOTE"
6416 >"-"</SPAN
6417 >.
6418  Alias names are not case sensitive, and are not required to start with a
6419  <SPAN
6420 CLASS="QUOTE"
6421 >"+"</SPAN
6422 > or <SPAN
6423 CLASS="QUOTE"
6424 >"-"</SPAN
6425 > sign, since they are merely textually
6426  expanded.</P
6427 ><P
6428 > Aliases can be used throughout the actions file, but they <SPAN
6429 CLASS="emphasis"
6430 ><I
6431 CLASS="EMPHASIS"
6432 >must be
6433  defined in a special section at the top of the file!</I
6434 ></SPAN
6435 >
6436  And there can only be one such section per actions file. Each actions file may
6437  have its own alias section, and the aliases defined in it are only visible
6438  within that file.</P
6439 ><P
6440 > There are two main reasons to use aliases: One is to save typing for frequently
6441  used combinations of actions, the other one is a gain in flexibility: If you
6442  decide once how you want to handle shops by defining an alias called
6443  <SPAN
6444 CLASS="QUOTE"
6445 >"shop"</SPAN
6446 >, you can later change your policy on shops in
6447  <SPAN
6448 CLASS="emphasis"
6449 ><I
6450 CLASS="EMPHASIS"
6451 >one</I
6452 ></SPAN
6453 > place, and your changes will take effect everywhere
6454  in the actions file where the <SPAN
6455 CLASS="QUOTE"
6456 >"shop"</SPAN
6457 > alias is used. Calling aliases
6458  by their purpose also makes your actions files more readable.</P
6459 ><P
6460 > Currently, there is one big drawback to using aliases, though:
6461  <SPAN
6462 CLASS="APPLICATION"
6463 >Privoxy</SPAN
6464 >'s built-in web-based action file
6465  editor honors aliases when reading the actions files, but it expands
6466  them before writing. So the effects of your aliases are of course preserved,
6467  but the aliases themselves are lost when you edit sections that use aliases
6468  with it.
6469  This is likely to change in future versions of <SPAN
6470 CLASS="APPLICATION"
6471 >Privoxy</SPAN
6472 >.</P
6473 ><P
6474 > Now let's define some aliases...</P
6475 ><P
6476 > <TABLE
6477 BORDER="0"
6478 BGCOLOR="#E0E0E0"
6479 WIDTH="100%"
6480 ><TR
6481 ><TD
6482 ><PRE
6483 CLASS="SCREEN"
6484 > # Useful custom aliases we can use later.
6485  #
6486  # Note the (required!) section header line and that this section
6487  # must be at the top of the actions file!
6488  #
6489  {{alias}}
6490
6491  # These aliases just save typing later:
6492  # (Note that some already use other aliases!)
6493  #
6494  +crunch-all-cookies = +<A
6495 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
6496 >crunch-incoming-cookies</A
6497 > +<A
6498 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
6499 >crunch-outgoing-cookies</A
6500 >
6501  -crunch-all-cookies = -<A
6502 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
6503 >crunch-incoming-cookies</A
6504 > -<A
6505 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
6506 >crunch-outgoing-cookies</A
6507 >
6508  block-as-image      = +block +handle-as-image
6509  mercy-for-cookies   = -crunch-all-cookies -<A
6510 HREF="actions-file.html#SESSION-COOKIES-ONLY"
6511 >session-cookies-only</A
6512 > -<A
6513 HREF="actions-file.html#FILTER-CONTENT-COOKIES"
6514 >filter{content-cookies}</A
6515 >
6516
6517  # These aliases define combinations of actions
6518  # that are useful for certain types of sites:
6519  #
6520  fragile     = -<A
6521 HREF="actions-file.html#BLOCK"
6522 >block</A
6523 > -<A
6524 HREF="actions-file.html#FILTER"
6525 >filter</A
6526 > -crunch-all-cookies -<A
6527 HREF="actions-file.html#FAST-REDIRECTS"
6528 >fast-redirects</A
6529 > -<A
6530 HREF="actions-file.html#HIDE-REFERER"
6531 >hide-referrer</A
6532 > -<A
6533 HREF="actions-file.html#KILL-POPUPS"
6534 >kill-popups</A
6535 >
6536  shop        = -crunch-all-cookies -<A
6537 HREF="actions-file.html#FILTER-ALL-POPUPS"
6538 >filter{all-popups}</A
6539 > -<A
6540 HREF="actions-file.html#KILL-POPUPS"
6541 >kill-popups</A
6542 >
6543
6544  # Short names for other aliases, for really lazy people ;-)
6545  #
6546  c0 = +crunch-all-cookies
6547  c1 = -crunch-all-cookies</PRE
6548 ></TD
6549 ></TR
6550 ></TABLE
6551 ></P
6552 ><P
6553 > ...and put them to use. These sections would appear in the lower part of an 
6554  actions file and define exceptions to the default actions (as specified further
6555  up for the <SPAN
6556 CLASS="QUOTE"
6557 >"/"</SPAN
6558 > pattern):</P
6559 ><P
6560 > <TABLE
6561 BORDER="0"
6562 BGCOLOR="#E0E0E0"
6563 WIDTH="100%"
6564 ><TR
6565 ><TD
6566 ><PRE
6567 CLASS="SCREEN"
6568 > # These sites are either very complex or very keen on
6569  # user data and require minimal interference to work:
6570  #
6571  {fragile}
6572  .office.microsoft.com
6573  .windowsupdate.microsoft.com
6574  .nytimes.com
6575
6576  # Shopping sites:
6577  # Allow cookies (for setting and retrieving your customer data)
6578  #           
6579  {shop}
6580  .quietpc.com
6581  .worldpay.com   # for quietpc.com
6582  .scan.co.uk
6583
6584  # These shops require pop-ups:
6585  #
6586  {shop -kill-popups -filter{all-popups}}
6587   .dabs.com
6588   .overclockers.co.uk</PRE
6589 ></TD
6590 ></TR
6591 ></TABLE
6592 ></P
6593 ><P
6594 > Aliases like <SPAN
6595 CLASS="QUOTE"
6596 >"shop"</SPAN
6597 > and <SPAN
6598 CLASS="QUOTE"
6599 >"fragile"</SPAN
6600 > are often used for 
6601  <SPAN
6602 CLASS="QUOTE"
6603 >"problem"</SPAN
6604 > sites that require some actions to be disabled 
6605  in order to function properly.</P
6606 ></DIV
6607 ><DIV
6608 CLASS="SECT2"
6609 ><H2
6610 CLASS="SECT2"
6611 ><A
6612 NAME="ACT-EXAMPLES"
6613 ></A
6614 >8.7. Actions Files Tutorial</H2
6615 ><P
6616 > The above chapters have shown <A
6617 HREF="actions-file.html"
6618 >which actions files
6619  there are and how they are organized</A
6620 >, how actions are <A
6621 HREF="actions-file.html#ACTIONS"
6622 >specified</A
6623 > and <A
6624 HREF="actions-file.html#ACTIONS-APPLY"
6625 >applied
6626  to URLs</A
6627 >, how <A
6628 HREF="actions-file.html#AF-PATTERNS"
6629 >patterns</A
6630 > work, and how to
6631  define and use <A
6632 HREF="actions-file.html#ALIASES"
6633 >aliases</A
6634 >. Now, let's look at an
6635  example <TT
6636 CLASS="FILENAME"
6637 >default.action</TT
6638 > and <TT
6639 CLASS="FILENAME"
6640 >user.action</TT
6641 >
6642  file and see how all these pieces come together:</P
6643 ><DIV
6644 CLASS="SECT3"
6645 ><H3
6646 CLASS="SECT3"
6647 ><A
6648 NAME="AEN3698"
6649 ></A
6650 >8.7.1. default.action</H3
6651 ><P
6652 >Every config file should start with a short comment stating its purpose:</P
6653 ><P
6654 > <TABLE
6655 BORDER="0"
6656 BGCOLOR="#E0E0E0"
6657 WIDTH="100%"
6658 ><TR
6659 ><TD
6660 ><PRE
6661 CLASS="SCREEN"
6662 ># Sample default.action file &#60;ijbswa-developers@lists.sourceforge.net&#62;</PRE
6663 ></TD
6664 ></TR
6665 ></TABLE
6666 ></P
6667 ><P
6668 >Then, since this is the <TT
6669 CLASS="FILENAME"
6670 >default.action</TT
6671 > file, the
6672 first section is a special section for internal use that you needn't
6673 change or worry about:</P
6674 ><P
6675 > <TABLE
6676 BORDER="0"
6677 BGCOLOR="#E0E0E0"
6678 WIDTH="100%"
6679 ><TR
6680 ><TD
6681 ><PRE
6682 CLASS="SCREEN"
6683 >##########################################################################
6684 # Settings -- Don't change! For internal Privoxy use ONLY.
6685 ##########################################################################
6686
6687 {{settings}}
6688 for-privoxy-version=3.0</PRE
6689 ></TD
6690 ></TR
6691 ></TABLE
6692 ></P
6693 ><P
6694 >After that comes the (optional) alias section. We'll use the example
6695 section from the above <A
6696 HREF="actions-file.html#ALIASES"
6697 >chapter on aliases</A
6698 >,
6699 that also explains why and how aliases are used:</P
6700 ><P
6701 > <TABLE
6702 BORDER="0"
6703 BGCOLOR="#E0E0E0"
6704 WIDTH="100%"
6705 ><TR
6706 ><TD
6707 ><PRE
6708 CLASS="SCREEN"
6709 >##########################################################################
6710 # Aliases
6711 ##########################################################################
6712 {{alias}}
6713
6714  # These aliases just save typing later:
6715  # (Note that some already use other aliases!)
6716  #
6717  +crunch-all-cookies = +<A
6718 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
6719 >crunch-incoming-cookies</A
6720 > +<A
6721 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
6722 >crunch-outgoing-cookies</A
6723 >
6724  -crunch-all-cookies = -<A
6725 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
6726 >crunch-incoming-cookies</A
6727 > -<A
6728 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
6729 >crunch-outgoing-cookies</A
6730 >
6731  block-as-image      = +block +handle-as-image
6732  mercy-for-cookies   = -crunch-all-cookies -<A
6733 HREF="actions-file.html#SESSION-COOKIES-ONLY"
6734 >session-cookies-only</A
6735 > -<A
6736 HREF="actions-file.html#FILTER-CONTENT-COOKIES"
6737 >filter{content-cookies}</A
6738 >
6739
6740  # These aliases define combinations of actions
6741  # that are useful for certain types of sites:
6742  #
6743  fragile     = -<A
6744 HREF="actions-file.html#BLOCK"
6745 >block</A
6746 > -<A
6747 HREF="actions-file.html#FILTER"
6748 >filter</A
6749 > -crunch-all-cookies -<A
6750 HREF="actions-file.html#FAST-REDIRECTS"
6751 >fast-redirects</A
6752 > -<A
6753 HREF="actions-file.html#HIDE-REFERER"
6754 >hide-referrer</A
6755 > -<A
6756 HREF="actions-file.html#KILL-POPUPS"
6757 >kill-popups</A
6758 >
6759  shop        = -crunch-all-cookies -<A
6760 HREF="actions-file.html#FILTER-ALL-POPUPS"
6761 >filter{all-popups}</A
6762 > -<A
6763 HREF="actions-file.html#KILL-POPUPS"
6764 >kill-popups</A
6765 ></PRE
6766 ></TD
6767 ></TR
6768 ></TABLE
6769 ></P
6770 ><P
6771 > Now come the regular sections, i.e. sets of actions, accompanied
6772  by URL patterns to which they apply. Remember <SPAN
6773 CLASS="emphasis"
6774 ><I
6775 CLASS="EMPHASIS"
6776 >all actions
6777  are disabled when matching starts</I
6778 ></SPAN
6779 >, so we have to explicitly
6780  enable the ones we want.</P
6781 ><P
6782 > The first regular section is probably the most important. It has only
6783  one pattern, <SPAN
6784 CLASS="QUOTE"
6785 >"<TT
6786 CLASS="LITERAL"
6787 >/</TT
6788 >"</SPAN
6789 >, but this pattern
6790  <A
6791 HREF="actions-file.html#AF-PATTERNS"
6792 >matches all URLs</A
6793 >. Therefore, the
6794  set of actions used in this <SPAN
6795 CLASS="QUOTE"
6796 >"default"</SPAN
6797 > section <SPAN
6798 CLASS="emphasis"
6799 ><I
6800 CLASS="EMPHASIS"
6801 >will
6802  be applied to all requests as a start</I
6803 ></SPAN
6804 >. It can  be partly or
6805  wholly overridden by later matches further down this file, or in user.action,
6806  but it will still be largely responsible for your overall browsing
6807  experience.</P
6808 ><P
6809 > Again, at the start of matching, all actions are disabled, so there is
6810  no real need to disable any actions here, but we will do that nonetheless,
6811  to have a complete listing for your reference. (Remember: a <SPAN
6812 CLASS="QUOTE"
6813 >"+"</SPAN
6814 >
6815  preceding the action name enables the action, a <SPAN
6816 CLASS="QUOTE"
6817 >"-"</SPAN
6818 > disables!).
6819  Also note how this long line has been made more readable by splitting it into
6820  multiple lines with line continuation.</P
6821 ><P
6822 > <TABLE
6823 BORDER="0"
6824 BGCOLOR="#E0E0E0"
6825 WIDTH="100%"
6826 ><TR
6827 ><TD
6828 ><PRE
6829 CLASS="SCREEN"
6830 >##########################################################################
6831 # "Defaults" section:
6832 ##########################################################################
6833  { \
6834  -<A
6835 HREF="actions-file.html#ADD-HEADER"
6836 >add-header</A
6837 > \
6838  -<A
6839 HREF="actions-file.html#BLOCK"
6840 >block</A
6841 > \
6842  -<A
6843 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
6844 >crunch-incoming-cookies</A
6845 > \
6846  -<A
6847 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
6848 >crunch-outgoing-cookies</A
6849 > \
6850  +<A
6851 HREF="actions-file.html#DEANIMATE-GIFS"
6852 >deanimate-gifs</A
6853 > \
6854  -<A
6855 HREF="actions-file.html#DOWNGRADE-HTTP-VERSION"
6856 >downgrade-http-version</A
6857 > \
6858  +<A
6859 HREF="actions-file.html#FAST-REDIRECTS"
6860 >fast-redirects</A
6861 > \
6862  +<A
6863 HREF="actions-file.html#FILTER-JS-ANNOYANCES"
6864 >filter{js-annoyances}</A
6865 > \
6866  -<A
6867 HREF="actions-file.html#FILTER-JS-EVENTS"
6868 >filter{js-events}</A
6869 > \
6870  +<A
6871 HREF="actions-file.html#FILTER-HTML-ANNOYANCES"
6872 >filter{html-annoyances}</A
6873 > \
6874  -<A
6875 HREF="actions-file.html#FILTER-CONTENT-COOKIES"
6876 >filter{content-cookies}</A
6877 > \
6878  +<A
6879 HREF="actions-file.html#FILTER-REFRESH-TAGS"
6880 >filter{refresh-tags}</A
6881 > \
6882  +<A
6883 HREF="actions-file.html#FILTER-UNSOLICITED-POPUPS"
6884 >filter{unsolicited-popups}</A
6885 > \
6886  -<A
6887 HREF="actions-file.html#FILTER-ALL-POPUPS"
6888 >filter{all-popups}</A
6889 > \
6890  +<A
6891 HREF="actions-file.html#FILTER-IMG-REORDER"
6892 >filter{img-reorder}</A
6893 > \
6894  +<A
6895 HREF="actions-file.html#FILTER-BANNERS-BY-SIZE"
6896 >filter{banners-by-size}</A
6897 > \
6898  -<A
6899 HREF="actions-file.html#FILTER-BANNERS-BY-LINK"
6900 >filter{banners-by-link}</A
6901 > \
6902  +<A
6903 HREF="actions-file.html#FILTER-WEBBUGS"
6904 >filter{webbugs}</A
6905 > \
6906  -<A
6907 HREF="actions-file.html#FILTER-TINY-TEXTFORMS"
6908 >filter{tiny-textforms}</A
6909 > \
6910  +<A
6911 HREF="actions-file.html#FILTER-JUMPING-WINDOWS"
6912 >filter{jumping-windows}</A
6913 > \
6914  -<A
6915 HREF="actions-file.html#FILTER-FRAMESET-BORDERS"
6916 >filter{frameset-borders}</A
6917 > \
6918  -<A
6919 HREF="actions-file.html#FILTER-DEMORONIZER"
6920 >filter{demoronizer}</A
6921 > \
6922  -<A
6923 HREF="actions-file.html#FILTER-SHOCKWAVE-FLASH"
6924 >filter{shockwave-flash}</A
6925 > \
6926  -<A
6927 HREF="actions-file.html#FILTER-QUICKTIME-KIOSKMODE"
6928 >filter{quicktime-kioskmode}</A
6929 > \
6930  -<A
6931 HREF="actions-file.html#FILTER-FUN"
6932 >filter{fun}</A
6933 > \
6934  -<A
6935 HREF="actions-file.html#FILTER-CRUDE-PARENTAL"
6936 >filter{crude-parental}</A
6937 > \
6938  +<A
6939 HREF="actions-file.html#FILTER-IE-EXPLOITS"
6940 >filter{ie-exploits}</A
6941 > \     
6942  -<A
6943 HREF="actions-file.html#HANDLE-AS-IMAGE"
6944 >handle-as-image</A
6945 > \
6946  +<A
6947 HREF="actions-file.html#HIDE-FORWARDED-FOR-HEADERS"
6948 >hide-forwarded-for-headers</A
6949 > \
6950  +<A
6951 HREF="actions-file.html#HIDE-FROM-HEADER"
6952 >hide-from-header{block}</A
6953 > \
6954  +<A
6955 HREF="actions-file.html#HIDE-REFERER"
6956 >hide-referrer{forge}</A
6957 > \
6958  -<A
6959 HREF="actions-file.html#HIDE-USER-AGENT"
6960 >hide-user-agent</A
6961 > \
6962  -<A
6963 HREF="actions-file.html#KILL-POPUPS"
6964 >kill-popups</A
6965 > \
6966  -<A
6967 HREF="actions-file.html#LIMIT-CONNECT"
6968 >limit-connect</A
6969 > \
6970  +<A
6971 HREF="actions-file.html#PREVENT-COMPRESSION"
6972 >prevent-compression</A
6973 > \
6974  -<A
6975 HREF="actions-file.html#SEND-VANILLA-WAFER"
6976 >send-vanilla-wafer</A
6977 > \
6978  -<A
6979 HREF="actions-file.html#SEND-WAFER"
6980 >send-wafer</A
6981 > \
6982  +<A
6983 HREF="actions-file.html#SESSION-COOKIES-ONLY"
6984 >session-cookies-only</A
6985 > \
6986  +<A
6987 HREF="actions-file.html#SET-IMAGE-BLOCKER"
6988 >set-image-blocker{pattern}</A
6989 > \
6990  }
6991  / # forward slash will match *all* potential URL patterns.</PRE
6992 ></TD
6993 ></TR
6994 ></TABLE
6995 ></P
6996 ><P
6997 > The default behavior is now set. Note that some actions, like not hiding
6998  the user agent, are part of a <SPAN
6999 CLASS="QUOTE"
7000 >"general policy"</SPAN
7001 > that applies
7002  universally and won't get any exceptions defined later. Other choices,
7003  like not blocking (which is <SPAN
7004 CLASS="emphasis"
7005 ><I
7006 CLASS="EMPHASIS"
7007 >understandably</I
7008 ></SPAN
7009 > the
7010  default!) need exceptions, i.e. we need to specify explicitly what we
7011  want to block in later sections.</P
7012 ><P
7013 > The first of our specialized sections is concerned with <SPAN
7014 CLASS="QUOTE"
7015 >"fragile"</SPAN
7016 >
7017  sites, i.e. sites that require minimum interference, because they are either
7018  very complex or very keen on tracking you (and have mechanisms in place that
7019  make them unusable for people who avoid being tracked). We will simply use
7020  our pre-defined <TT
7021 CLASS="LITERAL"
7022 >fragile</TT
7023 > alias instead of stating the list
7024  of actions explicitly:</P
7025 ><P
7026 > <TABLE
7027 BORDER="0"
7028 BGCOLOR="#E0E0E0"
7029 WIDTH="100%"
7030 ><TR
7031 ><TD
7032 ><PRE
7033 CLASS="SCREEN"
7034 >##########################################################################
7035 # Exceptions for sites that'll break under the default action set:
7036 ##########################################################################
7037
7038 # "Fragile" Use a minimum set of actions for these sites (see alias above):
7039 #
7040 { fragile }
7041 .office.microsoft.com           # surprise, surprise!
7042 .windowsupdate.microsoft.com</PRE
7043 ></TD
7044 ></TR
7045 ></TABLE
7046 ></P
7047 ><P
7048 > Shopping sites are not as fragile, but they typically
7049  require cookies to log in, and pop-up windows for shopping
7050  carts or item details. Again, we'll use a pre-defined alias:</P
7051 ><P
7052 > <TABLE
7053 BORDER="0"
7054 BGCOLOR="#E0E0E0"
7055 WIDTH="100%"
7056 ><TR
7057 ><TD
7058 ><PRE
7059 CLASS="SCREEN"
7060 ># Shopping sites:
7061 #
7062 { shop }
7063 .quietpc.com 
7064 .worldpay.com   # for quietpc.com
7065 .jungle.com
7066 .scan.co.uk</PRE
7067 ></TD
7068 ></TR
7069 ></TABLE
7070 ></P
7071 ><P
7072 > The <TT
7073 CLASS="LITERAL"
7074 ><A
7075 HREF="actions-file.html#FAST-REDIRECTS"
7076 >fast-redirects</A
7077 ></TT
7078 >
7079  action, which we enabled per default above,  breaks some sites. So disable
7080  it for popular sites where we know it misbehaves:</P
7081 ><P
7082 > <TABLE
7083 BORDER="0"
7084 BGCOLOR="#E0E0E0"
7085 WIDTH="100%"
7086 ><TR
7087 ><TD
7088 ><PRE
7089 CLASS="SCREEN"
7090 >{ -<A
7091 HREF="actions-file.html#FAST-REDIRECTS"
7092 >fast-redirects</A
7093 > }
7094 login.yahoo.com
7095 edit.*.yahoo.com
7096 .google.com
7097 .altavista.com/.*(like|url|link):http
7098 .altavista.com/trans.*urltext=http
7099 .nytimes.com</PRE
7100 ></TD
7101 ></TR
7102 ></TABLE
7103 ></P
7104 ><P
7105 > It is important that <SPAN
7106 CLASS="APPLICATION"
7107 >Privoxy</SPAN
7108 > knows which
7109  URLs belong to images, so that <SPAN
7110 CLASS="emphasis"
7111 ><I
7112 CLASS="EMPHASIS"
7113 >if</I
7114 ></SPAN
7115 > they are to
7116  be blocked, a substitute image can be sent, rather than an HTML page.
7117  Contacting the remote site to find out is not an option, since it
7118  would destroy the loading time advantage of banner blocking, and it
7119  would feed the advertisers (in terms of money <SPAN
7120 CLASS="emphasis"
7121 ><I
7122 CLASS="EMPHASIS"
7123 >and</I
7124 ></SPAN
7125 >
7126  information). We can mark any URL as an image with the <TT
7127 CLASS="LITERAL"
7128 ><A
7129 HREF="actions-file.html#HANDLE-AS-IMAGE"
7130 >handle-as-image</A
7131 ></TT
7132 > action,
7133  and marking all URLs that end in a known image file extension is a
7134  good start:</P
7135 ><P
7136 > <TABLE
7137 BORDER="0"
7138 BGCOLOR="#E0E0E0"
7139 WIDTH="100%"
7140 ><TR
7141 ><TD
7142 ><PRE
7143 CLASS="SCREEN"
7144 >##########################################################################
7145 # Images:
7146 ##########################################################################
7147
7148 # Define which file types will be treated as images, in case they get
7149 # blocked further down this file:
7150 #
7151 { +<A
7152 HREF="actions-file.html#HANDLE-AS-IMAGE"
7153 >handle-as-image</A
7154 > }
7155 /.*\.(gif|jpe?g|png|bmp|ico)$</PRE
7156 ></TD
7157 ></TR
7158 ></TABLE
7159 ></P
7160 ><P
7161 > And then there are known banner sources. They often use scripts to
7162  generate the banners, so it won't be visible from the URL that the
7163  request is for an image. Hence we block them <SPAN
7164 CLASS="emphasis"
7165 ><I
7166 CLASS="EMPHASIS"
7167 >and</I
7168 ></SPAN
7169 >
7170  mark them as images in one go, with the help of our
7171  <TT
7172 CLASS="LITERAL"
7173 >block-as-image</TT
7174 > alias defined above. (We could of
7175  course just as well use <TT
7176 CLASS="LITERAL"
7177 >+<A
7178 HREF="actions-file.html#BLOCK"
7179 >block</A
7180 >
7181  +<A
7182 HREF="actions-file.html#HANDLE-AS-IMAGE"
7183 >handle-as-image</A
7184 ></TT
7185 > here.)
7186  Remember that the type of the replacement image is chosen by the
7187  <TT
7188 CLASS="LITERAL"
7189 ><A
7190 HREF="actions-file.html#SET-IMAGE-BLOCKER"
7191 >set-image-blocker</A
7192 ></TT
7193 >
7194  action. Since all URLs have matched the default section with its
7195  <TT
7196 CLASS="LITERAL"
7197 >+<A
7198 HREF="actions-file.html#SET-IMAGE-BLOCKER"
7199 >set-image-blocker</A
7200 >{pattern}</TT
7201 >
7202  action before, it still applies and needn't be repeated:</P
7203 ><P
7204 > <TABLE
7205 BORDER="0"
7206 BGCOLOR="#E0E0E0"
7207 WIDTH="100%"
7208 ><TR
7209 ><TD
7210 ><PRE
7211 CLASS="SCREEN"
7212 ># Known ad generators:
7213 #
7214 { block-as-image }
7215 ar.atwola.com 
7216 .ad.doubleclick.net
7217 .ad.*.doubleclick.net
7218 .a.yimg.com/(?:(?!/i/).)*$
7219 .a[0-9].yimg.com/(?:(?!/i/).)*$
7220 bs*.gsanet.com
7221 bs*.einets.com
7222 .qkimg.net</PRE
7223 ></TD
7224 ></TR
7225 ></TABLE
7226 ></P
7227 ><P
7228 > One of the most important jobs of <SPAN
7229 CLASS="APPLICATION"
7230 >Privoxy</SPAN
7231 >
7232  is to block banners. A huge bunch of them are already <SPAN
7233 CLASS="QUOTE"
7234 >"blocked"</SPAN
7235 >
7236  by the <TT
7237 CLASS="LITERAL"
7238 ><A
7239 HREF="actions-file.html#FILTER"
7240 >filter</A
7241 >{banners-by-size}</TT
7242 >
7243  action, which we enabled above, and which deletes the references to banner
7244  images from the pages while they are loaded, so the browser doesn't request
7245  them anymore, and hence they don't need to be blocked here. But this naturally
7246  doesn't catch all banners, and some people choose not to use filters, so we
7247  need a comprehensive list of patterns for banner URLs here, and apply the
7248  <TT
7249 CLASS="LITERAL"
7250 ><A
7251 HREF="actions-file.html#BLOCK"
7252 >block</A
7253 ></TT
7254 > action to them.</P
7255 ><P
7256 > First comes a bunch of generic patterns, which do most of the work, by
7257  matching typical domain and path name components of banners. Then comes
7258  a list of individual patterns for specific sites, which is omitted here
7259  to keep the example short:</P
7260 ><P
7261 > <TABLE
7262 BORDER="0"
7263 BGCOLOR="#E0E0E0"
7264 WIDTH="100%"
7265 ><TR
7266 ><TD
7267 ><PRE
7268 CLASS="SCREEN"
7269 >##########################################################################
7270 # Block these fine banners:
7271 ##########################################################################
7272 { <A
7273 HREF="actions-file.html#BLOCK"
7274 >+block</A
7275 > }
7276
7277 # Generic patterns:
7278
7279 ad*.
7280 .*ads.
7281 banner?.
7282 count*.
7283 /.*count(er)?\.(pl|cgi|exe|dll|asp|php[34]?)
7284 /(?:.*/)?(publicite|werbung|rekla(ma|me|am)|annonse|maino(kset|nta|s)?)/
7285
7286 # Site-specific patterns (abbreviated):
7287 #
7288 .hitbox.com</PRE
7289 ></TD
7290 ></TR
7291 ></TABLE
7292 ></P
7293 ><P
7294 > You wouldn't believe how many advertisers actually call their banner
7295  servers ads.<TT
7296 CLASS="REPLACEABLE"
7297 ><I
7298 >company</I
7299 ></TT
7300 >.com, or call the directory
7301  in which the banners are stored simply <SPAN
7302 CLASS="QUOTE"
7303 >"banners"</SPAN
7304 >. So the above
7305  generic patterns are surprisingly effective.</P
7306 ><P
7307 > But being very generic, they necessarily also catch URLs that we don't want
7308  to block. The pattern <TT
7309 CLASS="LITERAL"
7310 >.*ads.</TT
7311 > e.g. catches 
7312  <SPAN
7313 CLASS="QUOTE"
7314 >"nasty-<SPAN
7315 CLASS="emphasis"
7316 ><I
7317 CLASS="EMPHASIS"
7318 >ads</I
7319 ></SPAN
7320 >.nasty-corp.com"</SPAN
7321 > as intended,
7322  but also <SPAN
7323 CLASS="QUOTE"
7324 >"downlo<SPAN
7325 CLASS="emphasis"
7326 ><I
7327 CLASS="EMPHASIS"
7328 >ads</I
7329 ></SPAN
7330 >.sourcefroge.net"</SPAN
7331 > or
7332  <SPAN
7333 CLASS="QUOTE"
7334 >"<SPAN
7335 CLASS="emphasis"
7336 ><I
7337 CLASS="EMPHASIS"
7338 >ads</I
7339 ></SPAN
7340 >l.some-provider.net."</SPAN
7341 > So here come some
7342  well-known exceptions to the <TT
7343 CLASS="LITERAL"
7344 >+<A
7345 HREF="actions-file.html#BLOCK"
7346 >block</A
7347 ></TT
7348 >
7349  section above.</P
7350 ><P
7351 > Note that these are exceptions to exceptions from the default! Consider the URL
7352  <SPAN
7353 CLASS="QUOTE"
7354 >"downloads.sourcefroge.net"</SPAN
7355 >: Initially, all actions are deactivated,
7356  so it wouldn't get blocked. Then comes the defaults section, which matches the
7357  URL, but just deactivates the <TT
7358 CLASS="LITERAL"
7359 ><A
7360 HREF="actions-file.html#BLOCK"
7361 >block</A
7362 ></TT
7363 >
7364  action once again. Then it matches <TT
7365 CLASS="LITERAL"
7366 >.*ads.</TT
7367 >, an exception to the
7368  general non-blocking policy, and suddenly
7369  <TT
7370 CLASS="LITERAL"
7371 ><A
7372 HREF="actions-file.html#BLOCK"
7373 >+block</A
7374 ></TT
7375 > applies. And now, it'll match
7376  <TT
7377 CLASS="LITERAL"
7378 >.*loads.</TT
7379 >, where <TT
7380 CLASS="LITERAL"
7381 ><A
7382 HREF="actions-file.html#BLOCK"
7383 >-block</A
7384 ></TT
7385 >
7386  applies, so (unless it matches <SPAN
7387 CLASS="emphasis"
7388 ><I
7389 CLASS="EMPHASIS"
7390 >again</I
7391 ></SPAN
7392 > further down) it ends up
7393  with no <TT
7394 CLASS="LITERAL"
7395 ><A
7396 HREF="actions-file.html#BLOCK"
7397 >block</A
7398 ></TT
7399 > action applying.</P
7400 ><P
7401 > <TABLE
7402 BORDER="0"
7403 BGCOLOR="#E0E0E0"
7404 WIDTH="100%"
7405 ><TR
7406 ><TD
7407 ><PRE
7408 CLASS="SCREEN"
7409 >##########################################################################
7410 # Save some innocent victims of the above generic block patterns:
7411 ##########################################################################
7412
7413 # By domain:
7414
7415 { -<A
7416 HREF="actions-file.html#BLOCK"
7417 >block</A
7418 > }
7419 adv[io]*.  # (for advogato.org and advice.*)
7420 adsl.      # (has nothing to do with ads)
7421 ad[ud]*.   # (adult.* and add.*)
7422 .edu       # (universities don't host banners (yet!))
7423 .*loads.   # (downloads, uploads etc)
7424
7425 # By path:
7426 #
7427 /.*loads/
7428
7429 # Site-specific:
7430 #
7431 www.globalintersec.com/adv # (adv = advanced)
7432 www.ugu.com/sui/ugu/adv</PRE
7433 ></TD
7434 ></TR
7435 ></TABLE
7436 ></P
7437 ><P
7438 > Filtering source code can have nasty side effects,
7439  so make an exception for our friends at sourceforge.net,
7440  and all paths with <SPAN
7441 CLASS="QUOTE"
7442 >"cvs"</SPAN
7443 > in them. Note that
7444  <TT
7445 CLASS="LITERAL"
7446 >-<A
7447 HREF="actions-file.html#FILTER"
7448 >filter</A
7449 ></TT
7450 >
7451  disables <SPAN
7452 CLASS="emphasis"
7453 ><I
7454 CLASS="EMPHASIS"
7455 >all</I
7456 ></SPAN
7457 > filters in one fell swoop!</P
7458 ><P
7459 > <TABLE
7460 BORDER="0"
7461 BGCOLOR="#E0E0E0"
7462 WIDTH="100%"
7463 ><TR
7464 ><TD
7465 ><PRE
7466 CLASS="SCREEN"
7467 ># Don't filter code!
7468 #
7469 { -<A
7470 HREF="actions-file.html#FILTER"
7471 >filter</A
7472 > }
7473 /.*cvs
7474 .sourceforge.net</PRE
7475 ></TD
7476 ></TR
7477 ></TABLE
7478 ></P
7479 ><P
7480 > The actual <TT
7481 CLASS="FILENAME"
7482 >default.action</TT
7483 > is of course more
7484  comprehensive, but we hope this example made clear how it works.</P
7485 ></DIV
7486 ><DIV
7487 CLASS="SECT3"
7488 ><H3
7489 CLASS="SECT3"
7490 ><A
7491 NAME="AEN3864"
7492 ></A
7493 >8.7.2. user.action</H3
7494 ><P
7495 > So far we are painting with a broad brush by setting general policies,
7496  which would be a reasonable starting point for many people. Now, 
7497  you might want to be more specific and have customized rules that
7498  are more suitable to your personal habits and preferences. These would
7499  be for narrowly defined situations like your ISP or your bank, and should
7500  be placed in <TT
7501 CLASS="FILENAME"
7502 >user.action</TT
7503 >, which is parsed after all other 
7504  actions files and hence has the last word, over-riding any previously
7505  defined actions. <TT
7506 CLASS="FILENAME"
7507 >user.action</TT
7508 > is also a 
7509  <SPAN
7510 CLASS="emphasis"
7511 ><I
7512 CLASS="EMPHASIS"
7513 >safe</I
7514 ></SPAN
7515 > place for your personal settings, since
7516  <TT
7517 CLASS="FILENAME"
7518 >default.action</TT
7519 > is actively maintained by the
7520  <SPAN
7521 CLASS="APPLICATION"
7522 >Privoxy</SPAN
7523 > developers and you'll probably want
7524  to install updated versions from time to time.</P
7525 ><P
7526 > So let's look at a few examples of things that one might typically do in
7527  <TT
7528 CLASS="FILENAME"
7529 >user.action</TT
7530 >: </P
7531 ><P
7532 > <TABLE
7533 BORDER="0"
7534 BGCOLOR="#E0E0E0"
7535 WIDTH="100%"
7536 ><TR
7537 ><TD
7538 ><PRE
7539 CLASS="SCREEN"
7540 ># My user.action file. &#60;fred@foobar.com&#62;</PRE
7541 ></TD
7542 ></TR
7543 ></TABLE
7544 ></P
7545 ><P
7546 > As <A
7547 HREF="actions-file.html#ALIASES"
7548 >aliases</A
7549 > are local to the actions
7550  file that they are defined in, you can't use the ones from
7551  <TT
7552 CLASS="FILENAME"
7553 >default.action</TT
7554 >, unless you repeat them here:</P
7555 ><P
7556 > <TABLE
7557 BORDER="0"
7558 BGCOLOR="#E0E0E0"
7559 WIDTH="100%"
7560 ><TR
7561 ><TD
7562 ><PRE
7563 CLASS="SCREEN"
7564 ># Aliases are local to the file they are defined in.
7565 # (Re-)define aliases for this file:
7566 #
7567 {{alias}}
7568
7569 # These aliases just save typing later, and the alias names should 
7570 # be self explanatory.
7571 #
7572 +crunch-all-cookies = +crunch-incoming-cookies +crunch-outgoing-cookies
7573 -crunch-all-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies
7574  allow-all-cookies  = -crunch-all-cookies -session-cookies-only
7575  allow-popups       = -filter{all-popups} -kill-popups
7576 +block-as-image     = +block +handle-as-image
7577 -block-as-image     = -block
7578
7579 # These aliases define combinations of actions that are useful for
7580 # certain types of sites:
7581 #
7582 fragile     = -block -crunch-all-cookies -filter -fast-redirects -hide-referrer -kill-popups
7583 shop        = -crunch-all-cookies allow-popups
7584
7585 # Allow ads for selected useful free sites:
7586 #
7587 allow-ads   = -block -filter{banners-by-size} -filter{banners-by-link}</PRE
7588 ></TD
7589 ></TR
7590 ></TABLE
7591 >
7592
7593  </P
7594 ><P
7595 > Say you have accounts on some sites that you visit regularly, and
7596  you don't want to have to log in manually each time. So you'd like
7597  to allow persistent cookies for these sites. The
7598  <TT
7599 CLASS="LITERAL"
7600 >allow-all-cookies</TT
7601 > alias defined above does exactly
7602  that, i.e. it disables crunching of cookies in any direction, and the 
7603  processing of cookies to make them only temporary.</P
7604 ><P
7605 > <TABLE
7606 BORDER="0"
7607 BGCOLOR="#E0E0E0"
7608 WIDTH="100%"
7609 ><TR
7610 ><TD
7611 ><PRE
7612 CLASS="SCREEN"
7613 >{ allow-all-cookies }
7614 sourceforge.net
7615 sunsolve.sun.com
7616 .slashdot.org
7617 .yahoo.com
7618 .msdn.microsoft.com
7619 .redhat.com</PRE
7620 ></TD
7621 ></TR
7622 ></TABLE
7623 ></P
7624 ><P
7625 > Your bank is allergic to some filter, but you don't know which, so you disable them all:</P
7626 ><P
7627 > <TABLE
7628 BORDER="0"
7629 BGCOLOR="#E0E0E0"
7630 WIDTH="100%"
7631 ><TR
7632 ><TD
7633 ><PRE
7634 CLASS="SCREEN"
7635 >{ -<A
7636 HREF="actions-file.html#FILTER"
7637 >filter</A
7638 > }
7639 .your-home-banking-site.com</PRE
7640 ></TD
7641 ></TR
7642 ></TABLE
7643 ></P
7644 ><P
7645 > Some file types you may not want to filter for various reasons:</P
7646 ><P
7647 > <TABLE
7648 BORDER="0"
7649 BGCOLOR="#E0E0E0"
7650 WIDTH="100%"
7651 ><TR
7652 ><TD
7653 ><PRE
7654 CLASS="SCREEN"
7655 ># Technical documentation is likely to contain strings that might
7656 # erroneously get altered by the JavaScript-oriented filters:
7657 #
7658 .tldp.org
7659 /(.*/)?selfhtml/
7660
7661 # And this stupid host sends streaming video with a wrong MIME type,
7662 # so that Privoxy thinks it is getting HTML and starts filtering:
7663 #
7664 stupid-server.example.com/</PRE
7665 ></TD
7666 ></TR
7667 ></TABLE
7668 ></P
7669 ><P
7670 > Example of a simple <A
7671 HREF="actions-file.html#BLOCK"
7672 >block</A
7673 > action. Say you've
7674  seen an ad on your favourite page on example.com that you want to get rid of.
7675  You have right-clicked the image, selected <SPAN
7676 CLASS="QUOTE"
7677 >"copy image location"</SPAN
7678 >
7679  and pasted the URL below while removing the leading http://, into a 
7680  <TT
7681 CLASS="LITERAL"
7682 >{ +block }</TT
7683 > section. Note that <TT
7684 CLASS="LITERAL"
7685 >{ +handle-as-image
7686  }</TT
7687 > need not be specified, since all URLs ending in
7688  <TT
7689 CLASS="LITERAL"
7690 >.gif</TT
7691 > will be tagged as images by the general rules as set
7692  in default.action anyway:</P
7693 ><P
7694 > <TABLE
7695 BORDER="0"
7696 BGCOLOR="#E0E0E0"
7697 WIDTH="100%"
7698 ><TR
7699 ><TD
7700 ><PRE
7701 CLASS="SCREEN"
7702 >{ +<A
7703 HREF="actions-file.html#BLOCK"
7704 >block</A
7705 > }
7706 www.example.com/nasty-ads/sponsor.gif
7707 another.popular.site.net/more/junk/here/</PRE
7708 ></TD
7709 ></TR
7710 ></TABLE
7711 ></P
7712 ><P
7713 > The URLs of dynamically generated banners, especially from large banner
7714  farms, often don't use the well-known image file name extensions, which
7715  makes it impossible for <SPAN
7716 CLASS="APPLICATION"
7717 >Privoxy</SPAN
7718 > to guess
7719  the file type just by looking at the URL. 
7720  You can use the <TT
7721 CLASS="LITERAL"
7722 >+block-as-image</TT
7723 > alias defined above for
7724  these cases.
7725  Note that objects which match this rule but then turn out NOT to be an
7726  image are typically rendered as a <SPAN
7727 CLASS="QUOTE"
7728 >"broken image"</SPAN
7729 > icon by the
7730  browser. Use cautiously.</P
7731 ><P
7732 > <TABLE
7733 BORDER="0"
7734 BGCOLOR="#E0E0E0"
7735 WIDTH="100%"
7736 ><TR
7737 ><TD
7738 ><PRE
7739 CLASS="SCREEN"
7740 >{ +block-as-image }
7741 .doubleclick.net
7742 /Realmedia/ads/
7743 ar.atwola.com/</PRE
7744 ></TD
7745 ></TR
7746 ></TABLE
7747 ></P
7748 ><P
7749 > Now you noticed that the default configuration breaks Forbes Magazine,
7750  but you were too lazy to find out which action is the culprit, and you
7751  were again too lazy to give <A
7752 HREF="contact.html"
7753 >feedback</A
7754 >, so
7755  you just used the <TT
7756 CLASS="LITERAL"
7757 >fragile</TT
7758 > alias on the site, and
7759  -- <SPAN
7760 CLASS="emphasis"
7761 ><I
7762 CLASS="EMPHASIS"
7763 >whoa!</I
7764 ></SPAN
7765 > -- it worked. The <TT
7766 CLASS="LITERAL"
7767 >fragile</TT
7768 >
7769  aliases disables those actions that are most likely to break a site. Also,
7770  good for testing purposes to see if it is <SPAN
7771 CLASS="APPLICATION"
7772 >Privoxy</SPAN
7773 >
7774  that is causing the problem or not.</P
7775 ><P
7776 ><TABLE
7777 BORDER="0"
7778 BGCOLOR="#E0E0E0"
7779 WIDTH="100%"
7780 ><TR
7781 ><TD
7782 ><PRE
7783 CLASS="SCREEN"
7784 >{ fragile }
7785 .forbes.com</PRE
7786 ></TD
7787 ></TR
7788 ></TABLE
7789 ></P
7790 ><P
7791 > You like the <SPAN
7792 CLASS="QUOTE"
7793 >"fun"</SPAN
7794 > text replacements in <TT
7795 CLASS="FILENAME"
7796 >default.filter</TT
7797 >,
7798  but it is disabled in the distributed actions file. (My colleagues on the team just
7799  don't have a sense of humour, that's why! ;-). So you'd like to turn it on in your private,
7800  update-safe config, once and for all:</P
7801 ><P
7802 ><TABLE
7803 BORDER="0"
7804 BGCOLOR="#E0E0E0"
7805 WIDTH="100%"
7806 ><TR
7807 ><TD
7808 ><PRE
7809 CLASS="SCREEN"
7810 >{ +<A
7811 HREF="actions-file.html#FILTER-FUN"
7812 >filter{fun}</A
7813 > }
7814 / # For ALL sites!</PRE
7815 ></TD
7816 ></TR
7817 ></TABLE
7818 ></P
7819 ><P
7820 > Note that the above is not really a good idea: There are exceptions
7821  to the filters in <TT
7822 CLASS="FILENAME"
7823 >default.action</TT
7824 > for things that
7825  really shouldn't be filtered, like code on CVS-&#62;Web interfaces. Since
7826  <TT
7827 CLASS="FILENAME"
7828 >user.action</TT
7829 > has the last word, these exceptions
7830  won't be valid for the <SPAN
7831 CLASS="QUOTE"
7832 >"fun"</SPAN
7833 > filtering specified here.</P
7834 ><P
7835 > You might also worry about how your favourite free websites are
7836  funded, and find that they rely on displaying banner advertisements
7837  to survive. So you might want to specifically allow banners for those
7838  sites that you feel provide value to you:</P
7839 ><P
7840 ><TABLE
7841 BORDER="0"
7842 BGCOLOR="#E0E0E0"
7843 WIDTH="100%"
7844 ><TR
7845 ><TD
7846 ><PRE
7847 CLASS="SCREEN"
7848 >{ allow-ads }
7849 .sourceforge.net
7850 .slashdot.org
7851 .osdn.net</PRE
7852 ></TD
7853 ></TR
7854 ></TABLE
7855 >   </P
7856 ><P
7857 > Note that <TT
7858 CLASS="LITERAL"
7859 >allow-ads</TT
7860 > has been aliased to 
7861  <TT
7862 CLASS="LITERAL"
7863 >-<A
7864 HREF="actions-file.html#BLOCK"
7865 >block</A
7866 ></TT
7867 >, 
7868  <TT
7869 CLASS="LITERAL"
7870 >-<A
7871 HREF="actions-file.html#FILTER-BANNERS-BY-SIZE"
7872 >filter{banners-by-size}</A
7873 ></TT
7874 >, and 
7875  <TT
7876 CLASS="LITERAL"
7877 >-<A
7878 HREF="actions-file.html#FILTER-BANNERS-BY-LINK"
7879 >filter{banners-by-link}</A
7880 ></TT
7881 > above.</P
7882 ><P
7883 > <TT
7884 CLASS="FILENAME"
7885 >user.action</TT
7886 > is generally the best place to define
7887  exceptions and additions to the default policies of
7888  <TT
7889 CLASS="FILENAME"
7890 >default.action</TT
7891 >. Some actions are safe to have their
7892  default policies set here though. So let's set a default policy to have a
7893  <SPAN
7894 CLASS="QUOTE"
7895 >"blank"</SPAN
7896 > image as opposed to the checkerboard pattern for
7897  <SPAN
7898 CLASS="emphasis"
7899 ><I
7900 CLASS="EMPHASIS"
7901 >ALL</I
7902 ></SPAN
7903 > sites. <SPAN
7904 CLASS="QUOTE"
7905 >"/"</SPAN
7906 > of course matches all URL
7907  paths and patterns:</P
7908 ><P
7909 ><TABLE
7910 BORDER="0"
7911 BGCOLOR="#E0E0E0"
7912 WIDTH="100%"
7913 ><TR
7914 ><TD
7915 ><PRE
7916 CLASS="SCREEN"
7917 >{ +<A
7918 HREF="actions-file.html#SET-IMAGE-BLOCKER"
7919 >set-image-blocker{blank}</A
7920 > }
7921 / # ALL sites</PRE
7922 ></TD
7923 ></TR
7924 ></TABLE
7925 ></P
7926 ></DIV
7927 ></DIV
7928 ></DIV
7929 ><DIV
7930 CLASS="NAVFOOTER"
7931 ><HR
7932 ALIGN="LEFT"
7933 WIDTH="100%"><TABLE
7934 SUMMARY="Footer navigation table"
7935 WIDTH="100%"
7936 BORDER="0"
7937 CELLPADDING="0"
7938 CELLSPACING="0"
7939 ><TR
7940 ><TD
7941 WIDTH="33%"
7942 ALIGN="left"
7943 VALIGN="top"
7944 ><A
7945 HREF="config.html"
7946 ACCESSKEY="P"
7947 >Prev</A
7948 ></TD
7949 ><TD
7950 WIDTH="34%"
7951 ALIGN="center"
7952 VALIGN="top"
7953 ><A
7954 HREF="index.html"
7955 ACCESSKEY="H"
7956 >Home</A
7957 ></TD
7958 ><TD
7959 WIDTH="33%"
7960 ALIGN="right"
7961 VALIGN="top"
7962 ><A
7963 HREF="filter-file.html"
7964 ACCESSKEY="N"
7965 >Next</A
7966 ></TD
7967 ></TR
7968 ><TR
7969 ><TD
7970 WIDTH="33%"
7971 ALIGN="left"
7972 VALIGN="top"
7973 >The Main Configuration File</TD
7974 ><TD
7975 WIDTH="34%"
7976 ALIGN="center"
7977 VALIGN="top"
7978 >&nbsp;</TD
7979 ><TD
7980 WIDTH="33%"
7981 ALIGN="right"
7982 VALIGN="top"
7983 >Filter Files</TD
7984 ></TR
7985 ></TABLE
7986 ></DIV
7987 ></BODY
7988 ></HTML
7989 >