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