Re-commit to solve various last minute issues for charsets, etc.
[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.8 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.8 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 >{+client-header-filter{hide-tor-exit-notation}}
2112 .exit/
2113     </PRE
2114 ></TD
2115 ></TR
2116 ></TABLE
2117 >
2118     </P
2119 ></DD
2120 ></DL
2121 ></DIV
2122 ></DIV
2123 ><DIV
2124 CLASS="SECT3"
2125 ><H4
2126 CLASS="SECT3"
2127 ><A
2128 NAME="CLIENT-HEADER-TAGGER"
2129 >8.5.4. client-header-tagger</A
2130 ></H4
2131 ><P
2132 ></P
2133 ><DIV
2134 CLASS="VARIABLELIST"
2135 ><DL
2136 ><DT
2137 >Typical use:</DT
2138 ><DD
2139 ><P
2140 >   Block requests based on their headers.
2141    </P
2142 ></DD
2143 ><DT
2144 >Effect:</DT
2145 ><DD
2146 ><P
2147 >    Client headers to which this action applies are filtered on-the-fly through
2148     the specified regular expression based substitutions, the result is used as
2149     tag. 
2150    </P
2151 ></DD
2152 ><DT
2153 >Type:</DT
2154 ><DD
2155 ><P
2156 >Parameterized.</P
2157 ></DD
2158 ><DT
2159 >Parameter:</DT
2160 ><DD
2161 ><P
2162 >    The name of a client-header tagger, as defined in one of the
2163     <A
2164 HREF="filter-file.html"
2165 >filter files</A
2166 >.
2167    </P
2168 ></DD
2169 ><DT
2170 >Notes:</DT
2171 ><DD
2172 ><P
2173 >    Client-header taggers are applied to each header on its own,
2174     and as the header isn't modified, each tagger <SPAN
2175 CLASS="QUOTE"
2176 >"sees"</SPAN
2177 >
2178     the original.
2179    </P
2180 ><P
2181 >    Client-header taggers are the first actions that are executed
2182     and their tags can be used to control every other action.
2183    </P
2184 ></DD
2185 ><DT
2186 >Example usage (section):</DT
2187 ><DD
2188 ><P
2189 >     <TABLE
2190 BORDER="0"
2191 BGCOLOR="#E0E0E0"
2192 WIDTH="90%"
2193 ><TR
2194 ><TD
2195 ><PRE
2196 CLASS="SCREEN"
2197 ># Tag every request with the User-Agent header
2198 {+client-header-tagger{user-agent}}
2199 /
2200     </PRE
2201 ></TD
2202 ></TR
2203 ></TABLE
2204 >
2205     </P
2206 ></DD
2207 ></DL
2208 ></DIV
2209 ></DIV
2210 ><DIV
2211 CLASS="SECT3"
2212 ><H4
2213 CLASS="SECT3"
2214 ><A
2215 NAME="CONTENT-TYPE-OVERWRITE"
2216 >8.5.5. content-type-overwrite</A
2217 ></H4
2218 ><P
2219 ></P
2220 ><DIV
2221 CLASS="VARIABLELIST"
2222 ><DL
2223 ><DT
2224 >Typical use:</DT
2225 ><DD
2226 ><P
2227 >Stop useless download menus from popping up, or change the browser's rendering mode</P
2228 ></DD
2229 ><DT
2230 >Effect:</DT
2231 ><DD
2232 ><P
2233 >    Replaces the <SPAN
2234 CLASS="QUOTE"
2235 >"Content-Type:"</SPAN
2236 > HTTP server header.
2237    </P
2238 ></DD
2239 ><DT
2240 >Type:</DT
2241 ><DD
2242 ><P
2243 >Parameterized.</P
2244 ></DD
2245 ><DT
2246 >Parameter:</DT
2247 ><DD
2248 ><P
2249 >    Any string. 
2250    </P
2251 ></DD
2252 ><DT
2253 >Notes:</DT
2254 ><DD
2255 ><P
2256 >    The <SPAN
2257 CLASS="QUOTE"
2258 >"Content-Type:"</SPAN
2259 > HTTP server header is used by the
2260     browser to decide what to do with the document. The value of this
2261     header can cause the browser to open a download menu instead of
2262     displaying the document by itself, even if the document's format is
2263     supported by the browser. 
2264    </P
2265 ><P
2266 >    The declared content type can also affect which rendering mode
2267     the browser chooses. If XHTML is delivered as <SPAN
2268 CLASS="QUOTE"
2269 >"text/html"</SPAN
2270 >,
2271     many browsers treat it as yet another broken HTML document.
2272     If it is send as <SPAN
2273 CLASS="QUOTE"
2274 >"application/xml"</SPAN
2275 >, browsers with
2276     XHTML support will only display it, if the syntax is correct.
2277    </P
2278 ><P
2279 >    If you see a web site that proudly uses XHTML buttons, but sets
2280     <SPAN
2281 CLASS="QUOTE"
2282 >"Content-Type: text/html"</SPAN
2283 >, you can use <SPAN
2284 CLASS="APPLICATION"
2285 >Privoxy</SPAN
2286 >
2287     to overwrite it with <SPAN
2288 CLASS="QUOTE"
2289 >"application/xml"</SPAN
2290 > and validate
2291     the web master's claim inside your XHTML-supporting browser.
2292     If the syntax is incorrect, the browser will complain loudly. 
2293    </P
2294 ><P
2295 >    You can also go the opposite direction: if your browser prints
2296     error messages instead of rendering a document falsely declared
2297     as XHTML, you can overwrite the content type with
2298     <SPAN
2299 CLASS="QUOTE"
2300 >"text/html"</SPAN
2301 > and have it rendered as broken HTML document. 
2302    </P
2303 ><P
2304 >    By default <TT
2305 CLASS="LITERAL"
2306 >content-type-overwrite</TT
2307 > only replaces
2308     <SPAN
2309 CLASS="QUOTE"
2310 >"Content-Type:"</SPAN
2311 > headers that look like some kind of text.
2312     If you want to overwrite it unconditionally, you have to combine it with
2313     <TT
2314 CLASS="LITERAL"
2315 ><A
2316 HREF="actions-file.html#FORCE-TEXT-MODE"
2317 >force-text-mode</A
2318 ></TT
2319 >.
2320     This limitation exists for a reason, think twice before circumventing it.
2321    </P
2322 ><P
2323 >    Most of the time it's easier to replace this action with a custom
2324     <TT
2325 CLASS="LITERAL"
2326 ><A
2327 HREF="actions-file.html#SERVER-HEADER-FILTER"
2328 >server-header filter</A
2329 ></TT
2330 >.
2331     It allows you to activate it for every document of a certain site and it will still
2332     only replace the content types you aimed at.
2333    </P
2334 ><P
2335 >    Of course you can apply <TT
2336 CLASS="LITERAL"
2337 >content-type-overwrite</TT
2338 >
2339     to a whole site and then make URL based exceptions, but it's a lot
2340     more work to get the same precision. 
2341    </P
2342 ></DD
2343 ><DT
2344 >Example usage (sections):</DT
2345 ><DD
2346 ><P
2347 >     <TABLE
2348 BORDER="0"
2349 BGCOLOR="#E0E0E0"
2350 WIDTH="90%"
2351 ><TR
2352 ><TD
2353 ><PRE
2354 CLASS="SCREEN"
2355 ># Check if www.example.net/ really uses valid XHTML
2356 { +content-type-overwrite{application/xml} }
2357 www.example.net/
2358
2359 # but leave the content type unmodified if the URL looks like a style sheet
2360 {-content-type-overwrite}
2361 www.example.net/.*\.css$
2362 www.example.net/.*style</PRE
2363 ></TD
2364 ></TR
2365 ></TABLE
2366 >
2367    </P
2368 ></DD
2369 ></DL
2370 ></DIV
2371 ></DIV
2372 ><DIV
2373 CLASS="SECT3"
2374 ><H4
2375 CLASS="SECT3"
2376 ><A
2377 NAME="CRUNCH-CLIENT-HEADER"
2378 >8.5.6. crunch-client-header</A
2379 ></H4
2380 ><P
2381 ></P
2382 ><DIV
2383 CLASS="VARIABLELIST"
2384 ><DL
2385 ><DT
2386 >Typical use:</DT
2387 ><DD
2388 ><P
2389 >Remove a client header <SPAN
2390 CLASS="APPLICATION"
2391 >Privoxy</SPAN
2392 > has no dedicated action for.</P
2393 ></DD
2394 ><DT
2395 >Effect:</DT
2396 ><DD
2397 ><P
2398 >    Deletes every header sent by the client that contains the string the user supplied as parameter.
2399    </P
2400 ></DD
2401 ><DT
2402 >Type:</DT
2403 ><DD
2404 ><P
2405 >Parameterized.</P
2406 ></DD
2407 ><DT
2408 >Parameter:</DT
2409 ><DD
2410 ><P
2411 >    Any string.
2412    </P
2413 ></DD
2414 ><DT
2415 >Notes:</DT
2416 ><DD
2417 ><P
2418 >    This action allows you to block client headers for which no dedicated
2419     <SPAN
2420 CLASS="APPLICATION"
2421 >Privoxy</SPAN
2422 > action exists.
2423     <SPAN
2424 CLASS="APPLICATION"
2425 >Privoxy</SPAN
2426 > will remove every client header that
2427     contains the string you supplied as parameter.
2428    </P
2429 ><P
2430 >    Regular expressions are <SPAN
2431 CLASS="emphasis"
2432 ><I
2433 CLASS="EMPHASIS"
2434 >not supported</I
2435 ></SPAN
2436 > and you can't
2437     use this action to block different headers in the same request, unless
2438     they contain the same string.
2439    </P
2440 ><P
2441 >    <TT
2442 CLASS="LITERAL"
2443 >crunch-client-header</TT
2444 > is only meant for quick tests.
2445     If you have to block several different headers, or only want to modify
2446     parts of them, you should use a
2447     <TT
2448 CLASS="LITERAL"
2449 ><A
2450 HREF="actions-file.html#CLIENT-HEADER-FILTER"
2451 >client-header filter</A
2452 ></TT
2453 >.
2454    </P
2455 ><DIV
2456 CLASS="WARNING"
2457 ><P
2458 ></P
2459 ><TABLE
2460 CLASS="WARNING"
2461 BORDER="1"
2462 WIDTH="90%"
2463 ><TR
2464 ><TD
2465 ALIGN="CENTER"
2466 ><B
2467 >Warning</B
2468 ></TD
2469 ></TR
2470 ><TR
2471 ><TD
2472 ALIGN="LEFT"
2473 ><P
2474 >      Don't block any header without understanding the consequences.
2475      </P
2476 ></TD
2477 ></TR
2478 ></TABLE
2479 ></DIV
2480 ></DD
2481 ><DT
2482 >Example usage (section):</DT
2483 ><DD
2484 ><P
2485 >     <TABLE
2486 BORDER="0"
2487 BGCOLOR="#E0E0E0"
2488 WIDTH="90%"
2489 ><TR
2490 ><TD
2491 ><PRE
2492 CLASS="SCREEN"
2493 ># Block the non-existent "Privacy-Violation:" client header 
2494 { +crunch-client-header{Privacy-Violation:} }
2495 /
2496     </PRE
2497 ></TD
2498 ></TR
2499 ></TABLE
2500 >
2501    </P
2502 ></DD
2503 ></DL
2504 ></DIV
2505 ></DIV
2506 ><DIV
2507 CLASS="SECT3"
2508 ><H4
2509 CLASS="SECT3"
2510 ><A
2511 NAME="CRUNCH-IF-NONE-MATCH"
2512 >8.5.7. crunch-if-none-match</A
2513 ></H4
2514 ><P
2515 ></P
2516 ><DIV
2517 CLASS="VARIABLELIST"
2518 ><DL
2519 ><DT
2520 >Typical use:</DT
2521 ><DD
2522 ><P
2523 >Prevent yet another way to track the user's steps between sessions.</P
2524 ></DD
2525 ><DT
2526 >Effect:</DT
2527 ><DD
2528 ><P
2529 >    Deletes the <SPAN
2530 CLASS="QUOTE"
2531 >"If-None-Match:"</SPAN
2532 > HTTP client header.
2533    </P
2534 ></DD
2535 ><DT
2536 >Type:</DT
2537 ><DD
2538 ><P
2539 >Boolean.</P
2540 ></DD
2541 ><DT
2542 >Parameter:</DT
2543 ><DD
2544 ><P
2545 >    N/A
2546    </P
2547 ></DD
2548 ><DT
2549 >Notes:</DT
2550 ><DD
2551 ><P
2552 >    Removing the <SPAN
2553 CLASS="QUOTE"
2554 >"If-None-Match:"</SPAN
2555 > HTTP client header
2556     is useful for filter testing, where you want to force a real
2557     reload instead of getting status code <SPAN
2558 CLASS="QUOTE"
2559 >"304"</SPAN
2560 > which
2561     would cause the browser to use a cached copy of the page.
2562    </P
2563 ><P
2564 >    It is also useful to make sure the header isn't used as a cookie
2565     replacement (unlikely but possible).
2566    </P
2567 ><P
2568 >    Blocking the <SPAN
2569 CLASS="QUOTE"
2570 >"If-None-Match:"</SPAN
2571 > header shouldn't cause any
2572     caching problems, as long as the <SPAN
2573 CLASS="QUOTE"
2574 >"If-Modified-Since:"</SPAN
2575 > header
2576     isn't blocked or missing as well.
2577    </P
2578 ><P
2579 >    It is recommended to use this action together with
2580     <TT
2581 CLASS="LITERAL"
2582 ><A
2583 HREF="actions-file.html#HIDE-IF-MODIFIED-SINCE"
2584 >hide-if-modified-since</A
2585 ></TT
2586 >
2587     and
2588     <TT
2589 CLASS="LITERAL"
2590 ><A
2591 HREF="actions-file.html#OVERWRITE-LAST-MODIFIED"
2592 >overwrite-last-modified</A
2593 ></TT
2594 >.
2595    </P
2596 ></DD
2597 ><DT
2598 >Example usage (section):</DT
2599 ><DD
2600 ><P
2601 >     <TABLE
2602 BORDER="0"
2603 BGCOLOR="#E0E0E0"
2604 WIDTH="90%"
2605 ><TR
2606 ><TD
2607 ><PRE
2608 CLASS="SCREEN"
2609 ># Let the browser revalidate cached documents but don't
2610 # allow the server to use the revalidation headers for user tracking.
2611 {+hide-if-modified-since{-60} \
2612  +overwrite-last-modified{randomize} \
2613  +crunch-if-none-match}
2614 /   </PRE
2615 ></TD
2616 ></TR
2617 ></TABLE
2618 >
2619    </P
2620 ></DD
2621 ></DL
2622 ></DIV
2623 ></DIV
2624 ><DIV
2625 CLASS="SECT3"
2626 ><H4
2627 CLASS="SECT3"
2628 ><A
2629 NAME="CRUNCH-INCOMING-COOKIES"
2630 >8.5.8. crunch-incoming-cookies</A
2631 ></H4
2632 ><P
2633 ></P
2634 ><DIV
2635 CLASS="VARIABLELIST"
2636 ><DL
2637 ><DT
2638 >Typical use:</DT
2639 ><DD
2640 ><P
2641 >    Prevent the web server from setting HTTP cookies on your system
2642    </P
2643 ></DD
2644 ><DT
2645 >Effect:</DT
2646 ><DD
2647 ><P
2648 >    Deletes any <SPAN
2649 CLASS="QUOTE"
2650 >"Set-Cookie:"</SPAN
2651 > HTTP headers from server replies.
2652    </P
2653 ></DD
2654 ><DT
2655 >Type:</DT
2656 ><DD
2657 ><P
2658 >Boolean.</P
2659 ></DD
2660 ><DT
2661 >Parameter:</DT
2662 ><DD
2663 ><P
2664 >    N/A
2665    </P
2666 ></DD
2667 ><DT
2668 >Notes:</DT
2669 ><DD
2670 ><P
2671 >    This action is only concerned with <SPAN
2672 CLASS="emphasis"
2673 ><I
2674 CLASS="EMPHASIS"
2675 >incoming</I
2676 ></SPAN
2677 > HTTP cookies. For
2678     <SPAN
2679 CLASS="emphasis"
2680 ><I
2681 CLASS="EMPHASIS"
2682 >outgoing</I
2683 ></SPAN
2684 > HTTP cookies, use
2685     <TT
2686 CLASS="LITERAL"
2687 ><A
2688 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
2689 >crunch-outgoing-cookies</A
2690 ></TT
2691 >.
2692     Use <SPAN
2693 CLASS="emphasis"
2694 ><I
2695 CLASS="EMPHASIS"
2696 >both</I
2697 ></SPAN
2698 > to disable HTTP cookies completely.
2699    </P
2700 ><P
2701 >    It makes <SPAN
2702 CLASS="emphasis"
2703 ><I
2704 CLASS="EMPHASIS"
2705 >no sense at all</I
2706 ></SPAN
2707 > to use this action in conjunction
2708     with the <TT
2709 CLASS="LITERAL"
2710 ><A
2711 HREF="actions-file.html#SESSION-COOKIES-ONLY"
2712 >session-cookies-only</A
2713 ></TT
2714 > action,
2715     since it would prevent the session cookies from being set. See also 
2716     <TT
2717 CLASS="LITERAL"
2718 ><A
2719 HREF="actions-file.html#FILTER-CONTENT-COOKIES"
2720 >filter-content-cookies</A
2721 ></TT
2722 >.
2723    </P
2724 ></DD
2725 ><DT
2726 >Example usage:</DT
2727 ><DD
2728 ><P
2729 >    <TABLE
2730 BORDER="0"
2731 BGCOLOR="#E0E0E0"
2732 WIDTH="90%"
2733 ><TR
2734 ><TD
2735 ><PRE
2736 CLASS="SCREEN"
2737 >+crunch-incoming-cookies</PRE
2738 ></TD
2739 ></TR
2740 ></TABLE
2741 >
2742    </P
2743 ></DD
2744 ></DL
2745 ></DIV
2746 ></DIV
2747 ><DIV
2748 CLASS="SECT3"
2749 ><H4
2750 CLASS="SECT3"
2751 ><A
2752 NAME="CRUNCH-SERVER-HEADER"
2753 >8.5.9. crunch-server-header</A
2754 ></H4
2755 ><P
2756 ></P
2757 ><DIV
2758 CLASS="VARIABLELIST"
2759 ><DL
2760 ><DT
2761 >Typical use:</DT
2762 ><DD
2763 ><P
2764 >Remove a server header <SPAN
2765 CLASS="APPLICATION"
2766 >Privoxy</SPAN
2767 > has no dedicated action for.</P
2768 ></DD
2769 ><DT
2770 >Effect:</DT
2771 ><DD
2772 ><P
2773 >    Deletes every header sent by the server that contains the string the user supplied as parameter.
2774    </P
2775 ></DD
2776 ><DT
2777 >Type:</DT
2778 ><DD
2779 ><P
2780 >Parameterized.</P
2781 ></DD
2782 ><DT
2783 >Parameter:</DT
2784 ><DD
2785 ><P
2786 >    Any string.
2787    </P
2788 ></DD
2789 ><DT
2790 >Notes:</DT
2791 ><DD
2792 ><P
2793 >    This action allows you to block server headers for which no dedicated
2794     <SPAN
2795 CLASS="APPLICATION"
2796 >Privoxy</SPAN
2797 > action exists. <SPAN
2798 CLASS="APPLICATION"
2799 >Privoxy</SPAN
2800 >
2801     will remove every server header that contains the string you supplied as parameter.
2802    </P
2803 ><P
2804 >    Regular expressions are <SPAN
2805 CLASS="emphasis"
2806 ><I
2807 CLASS="EMPHASIS"
2808 >not supported</I
2809 ></SPAN
2810 > and you can't
2811     use this action to block different headers in the same request, unless
2812     they contain the same string.
2813    </P
2814 ><P
2815 >    <TT
2816 CLASS="LITERAL"
2817 >crunch-server-header</TT
2818 > is only meant for quick tests.
2819     If you have to block several different headers, or only want to modify
2820     parts of them, you should use a custom
2821     <TT
2822 CLASS="LITERAL"
2823 ><A
2824 HREF="actions-file.html#SERVER-HEADER-FILTER"
2825 >server-header filter</A
2826 ></TT
2827 >.
2828    </P
2829 ><DIV
2830 CLASS="WARNING"
2831 ><P
2832 ></P
2833 ><TABLE
2834 CLASS="WARNING"
2835 BORDER="1"
2836 WIDTH="90%"
2837 ><TR
2838 ><TD
2839 ALIGN="CENTER"
2840 ><B
2841 >Warning</B
2842 ></TD
2843 ></TR
2844 ><TR
2845 ><TD
2846 ALIGN="LEFT"
2847 ><P
2848 >     Don't block any header without understanding the consequences.
2849      </P
2850 ></TD
2851 ></TR
2852 ></TABLE
2853 ></DIV
2854 ></DD
2855 ><DT
2856 >Example usage (section):</DT
2857 ><DD
2858 ><P
2859 >     <TABLE
2860 BORDER="0"
2861 BGCOLOR="#E0E0E0"
2862 WIDTH="90%"
2863 ><TR
2864 ><TD
2865 ><PRE
2866 CLASS="SCREEN"
2867 ># Crunch server headers that try to prevent caching
2868 { +crunch-server-header{no-cache} }
2869 /   </PRE
2870 ></TD
2871 ></TR
2872 ></TABLE
2873 >
2874    </P
2875 ></DD
2876 ></DL
2877 ></DIV
2878 ></DIV
2879 ><DIV
2880 CLASS="SECT3"
2881 ><H4
2882 CLASS="SECT3"
2883 ><A
2884 NAME="CRUNCH-OUTGOING-COOKIES"
2885 >8.5.10. crunch-outgoing-cookies</A
2886 ></H4
2887 ><P
2888 ></P
2889 ><DIV
2890 CLASS="VARIABLELIST"
2891 ><DL
2892 ><DT
2893 >Typical use:</DT
2894 ><DD
2895 ><P
2896 >    Prevent the web server from reading any HTTP cookies from your system
2897    </P
2898 ></DD
2899 ><DT
2900 >Effect:</DT
2901 ><DD
2902 ><P
2903 >    Deletes any <SPAN
2904 CLASS="QUOTE"
2905 >"Cookie:"</SPAN
2906 > HTTP headers from client requests.
2907    </P
2908 ></DD
2909 ><DT
2910 >Type:</DT
2911 ><DD
2912 ><P
2913 >Boolean.</P
2914 ></DD
2915 ><DT
2916 >Parameter:</DT
2917 ><DD
2918 ><P
2919 >    N/A
2920    </P
2921 ></DD
2922 ><DT
2923 >Notes:</DT
2924 ><DD
2925 ><P
2926 >    This action is only concerned with <SPAN
2927 CLASS="emphasis"
2928 ><I
2929 CLASS="EMPHASIS"
2930 >outgoing</I
2931 ></SPAN
2932 > HTTP cookies. For
2933     <SPAN
2934 CLASS="emphasis"
2935 ><I
2936 CLASS="EMPHASIS"
2937 >incoming</I
2938 ></SPAN
2939 > HTTP cookies, use
2940     <TT
2941 CLASS="LITERAL"
2942 ><A
2943 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
2944 >crunch-incoming-cookies</A
2945 ></TT
2946 >.
2947     Use <SPAN
2948 CLASS="emphasis"
2949 ><I
2950 CLASS="EMPHASIS"
2951 >both</I
2952 ></SPAN
2953 > to disable HTTP cookies completely.
2954    </P
2955 ><P
2956 >    It makes <SPAN
2957 CLASS="emphasis"
2958 ><I
2959 CLASS="EMPHASIS"
2960 >no sense at all</I
2961 ></SPAN
2962 > to use this action in conjunction
2963     with the <TT
2964 CLASS="LITERAL"
2965 ><A
2966 HREF="actions-file.html#SESSION-COOKIES-ONLY"
2967 >session-cookies-only</A
2968 ></TT
2969 > action,
2970     since it would prevent the session cookies from being read.
2971    </P
2972 ></DD
2973 ><DT
2974 >Example usage:</DT
2975 ><DD
2976 ><P
2977 >    <TABLE
2978 BORDER="0"
2979 BGCOLOR="#E0E0E0"
2980 WIDTH="90%"
2981 ><TR
2982 ><TD
2983 ><PRE
2984 CLASS="SCREEN"
2985 >+crunch-outgoing-cookies</PRE
2986 ></TD
2987 ></TR
2988 ></TABLE
2989 >
2990    </P
2991 ></DD
2992 ></DL
2993 ></DIV
2994 ></DIV
2995 ><DIV
2996 CLASS="SECT3"
2997 ><H4
2998 CLASS="SECT3"
2999 ><A
3000 NAME="DEANIMATE-GIFS"
3001 >8.5.11. deanimate-gifs</A
3002 ></H4
3003 ><P
3004 ></P
3005 ><DIV
3006 CLASS="VARIABLELIST"
3007 ><DL
3008 ><DT
3009 >Typical use:</DT
3010 ><DD
3011 ><P
3012 >Stop those annoying, distracting animated GIF images.</P
3013 ></DD
3014 ><DT
3015 >Effect:</DT
3016 ><DD
3017 ><P
3018 >    De-animate GIF animations, i.e. reduce them to their first or last image.
3019    </P
3020 ></DD
3021 ><DT
3022 >Type:</DT
3023 ><DD
3024 ><P
3025 >Parameterized.</P
3026 ></DD
3027 ><DT
3028 >Parameter:</DT
3029 ><DD
3030 ><P
3031 >    <SPAN
3032 CLASS="QUOTE"
3033 >"last"</SPAN
3034 > or <SPAN
3035 CLASS="QUOTE"
3036 >"first"</SPAN
3037 >
3038    </P
3039 ></DD
3040 ><DT
3041 >Notes:</DT
3042 ><DD
3043 ><P
3044 >    This will also shrink the images considerably (in bytes, not pixels!). If
3045     the option <SPAN
3046 CLASS="QUOTE"
3047 >"first"</SPAN
3048 > is given, the first frame of the animation
3049     is used as the replacement. If <SPAN
3050 CLASS="QUOTE"
3051 >"last"</SPAN
3052 > is given, the last
3053     frame of the animation is used instead, which probably makes more sense for
3054     most banner animations, but also has the risk of not showing the entire
3055     last frame (if it is only a delta to an earlier frame).
3056    </P
3057 ><P
3058 >    You can safely use this action with patterns that will also match non-GIF
3059     objects, because no attempt will be made at anything that doesn't look like
3060     a GIF.
3061    </P
3062 ></DD
3063 ><DT
3064 >Example usage:</DT
3065 ><DD
3066 ><P
3067 >      <TABLE
3068 BORDER="0"
3069 BGCOLOR="#E0E0E0"
3070 WIDTH="90%"
3071 ><TR
3072 ><TD
3073 ><PRE
3074 CLASS="SCREEN"
3075 >+deanimate-gifs{last}</PRE
3076 ></TD
3077 ></TR
3078 ></TABLE
3079 >
3080     </P
3081 ></DD
3082 ></DL
3083 ></DIV
3084 ></DIV
3085 ><DIV
3086 CLASS="SECT3"
3087 ><H4
3088 CLASS="SECT3"
3089 ><A
3090 NAME="DOWNGRADE-HTTP-VERSION"
3091 >8.5.12. downgrade-http-version</A
3092 ></H4
3093 ><P
3094 ></P
3095 ><DIV
3096 CLASS="VARIABLELIST"
3097 ><DL
3098 ><DT
3099 >Typical use:</DT
3100 ><DD
3101 ><P
3102 >Work around (very rare) problems with HTTP/1.1</P
3103 ></DD
3104 ><DT
3105 >Effect:</DT
3106 ><DD
3107 ><P
3108 >    Downgrades HTTP/1.1 client requests and server replies to HTTP/1.0.
3109    </P
3110 ></DD
3111 ><DT
3112 >Type:</DT
3113 ><DD
3114 ><P
3115 >Boolean.</P
3116 ></DD
3117 ><DT
3118 >Parameter:</DT
3119 ><DD
3120 ><P
3121 >    N/A
3122    </P
3123 ></DD
3124 ><DT
3125 >Notes:</DT
3126 ><DD
3127 ><P
3128 >    This is a left-over from the time when <SPAN
3129 CLASS="APPLICATION"
3130 >Privoxy</SPAN
3131 >
3132     didn't support important HTTP/1.1 features well. It is left here for the
3133     unlikely case that you experience HTTP/1.1 related problems with some server
3134     out there. Not all HTTP/1.1 features and requirements are supported yet,
3135     so there is a chance you might need this action.
3136    </P
3137 ></DD
3138 ><DT
3139 >Example usage (section):</DT
3140 ><DD
3141 ><P
3142 >     <TABLE
3143 BORDER="0"
3144 BGCOLOR="#E0E0E0"
3145 WIDTH="90%"
3146 ><TR
3147 ><TD
3148 ><PRE
3149 CLASS="SCREEN"
3150 >{+downgrade-http-version}
3151 problem-host.example.com</PRE
3152 ></TD
3153 ></TR
3154 ></TABLE
3155 >
3156     </P
3157 ></DD
3158 ></DL
3159 ></DIV
3160 ></DIV
3161 ><DIV
3162 CLASS="SECT3"
3163 ><H4
3164 CLASS="SECT3"
3165 ><A
3166 NAME="FAST-REDIRECTS"
3167 >8.5.13. fast-redirects</A
3168 ></H4
3169 ><P
3170 ></P
3171 ><DIV
3172 CLASS="VARIABLELIST"
3173 ><DL
3174 ><DT
3175 >Typical use:</DT
3176 ><DD
3177 ><P
3178 >Fool some click-tracking scripts and speed up indirect links.</P
3179 ></DD
3180 ><DT
3181 >Effect:</DT
3182 ><DD
3183 ><P
3184 >    Detects redirection URLs and redirects the browser without contacting
3185     the redirection server first.
3186    </P
3187 ></DD
3188 ><DT
3189 >Type:</DT
3190 ><DD
3191 ><P
3192 >Parameterized.</P
3193 ></DD
3194 ><DT
3195 >Parameter:</DT
3196 ><DD
3197 ><P
3198 ></P
3199 ><UL
3200 ><LI
3201 ><P
3202 >      <SPAN
3203 CLASS="QUOTE"
3204 >"simple-check"</SPAN
3205 > to just search for the string <SPAN
3206 CLASS="QUOTE"
3207 >"http://"</SPAN
3208 >
3209       to detect redirection URLs.
3210      </P
3211 ></LI
3212 ><LI
3213 ><P
3214 >      <SPAN
3215 CLASS="QUOTE"
3216 >"check-decoded-url"</SPAN
3217 > to decode URLs (if necessary) before searching
3218       for redirection URLs.
3219      </P
3220 ></LI
3221 ></UL
3222 ></DD
3223 ><DT
3224 >Notes:</DT
3225 ><DD
3226 ><P
3227 >  
3228     Many sites, like yahoo.com, don't just link to other sites. Instead, they
3229     will link to some script on their own servers, giving the destination as a
3230     parameter, which will then redirect you to the final target. URLs
3231     resulting from this scheme typically look like:
3232     <SPAN
3233 CLASS="QUOTE"
3234 >"http://www.example.org/click-tracker.cgi?target=http%3a//www.example.net/"</SPAN
3235 >.
3236   </P
3237 ><P
3238 >    Sometimes, there are even multiple consecutive redirects encoded in the
3239     URL. These redirections via scripts make your web browsing more traceable,
3240     since the server from which you follow such a link can see where you go
3241     to. Apart from that, valuable bandwidth and time is wasted, while your
3242     browser asks the server for one redirect after the other. Plus, it feeds
3243     the advertisers.
3244    </P
3245 ><P
3246 >    This feature is currently not very smart and is scheduled for improvement.
3247     If it is enabled by default, you will have to create some exceptions to
3248     this action. It can lead to failures in several ways: 
3249    </P
3250 ><P
3251 >    Not every URLs with other URLs as parameters is evil.
3252     Some sites offer a real service that requires this information to work.
3253     For example a validation service needs to know, which document to validate.
3254     <TT
3255 CLASS="LITERAL"
3256 >fast-redirects</TT
3257 > assumes that every URL parameter that
3258     looks like another URL is a redirection target, and will always redirect to
3259     the last one. Most of the time the assumption is correct, but if it isn't,
3260     the user gets redirected anyway.
3261    </P
3262 ><P
3263 >    Another failure occurs if the URL contains other parameters after the URL parameter.
3264     The URL:
3265     <SPAN
3266 CLASS="QUOTE"
3267 >"http://www.example.org/?redirect=http%3a//www.example.net/&#38;foo=bar"</SPAN
3268 >.
3269     contains the redirection URL <SPAN
3270 CLASS="QUOTE"
3271 >"http://www.example.net/"</SPAN
3272 >,
3273     followed by another parameter. <TT
3274 CLASS="LITERAL"
3275 >fast-redirects</TT
3276 > doesn't know that
3277     and will cause a redirect to <SPAN
3278 CLASS="QUOTE"
3279 >"http://www.example.net/&#38;foo=bar"</SPAN
3280 >.
3281     Depending on the target server configuration, the parameter will be silently ignored
3282     or lead to a <SPAN
3283 CLASS="QUOTE"
3284 >"page not found"</SPAN
3285 > error. You can prevent this problem by
3286     first using the <TT
3287 CLASS="LITERAL"
3288 ><A
3289 HREF="actions-file.html#REDIRECT"
3290 >redirect</A
3291 ></TT
3292 > action
3293     to remove the last part of the URL, but it requires a little effort.
3294    </P
3295 ><P
3296 >    To detect a redirection URL, <TT
3297 CLASS="LITERAL"
3298 >fast-redirects</TT
3299 > only
3300     looks for the string <SPAN
3301 CLASS="QUOTE"
3302 >"http://"</SPAN
3303 >, either in plain text
3304     (invalid but often used) or encoded as <SPAN
3305 CLASS="QUOTE"
3306 >"http%3a//"</SPAN
3307 >.
3308     Some sites use their own URL encoding scheme, encrypt the address
3309     of the target server or replace it with a database id. In theses cases
3310     <TT
3311 CLASS="LITERAL"
3312 >fast-redirects</TT
3313 > is fooled and the request reaches the
3314     redirection server where it probably gets logged.
3315    </P
3316 ></DD
3317 ><DT
3318 >Example usage:</DT
3319 ><DD
3320 ><P
3321 >     <TABLE
3322 BORDER="0"
3323 BGCOLOR="#E0E0E0"
3324 WIDTH="90%"
3325 ><TR
3326 ><TD
3327 ><PRE
3328 CLASS="SCREEN"
3329 > { +fast-redirects{simple-check} }
3330    one.example.com 
3331
3332  { +fast-redirects{check-decoded-url} }
3333    another.example.com/testing</PRE
3334 ></TD
3335 ></TR
3336 ></TABLE
3337 >
3338     </P
3339 ></DD
3340 ></DL
3341 ></DIV
3342 ></DIV
3343 ><DIV
3344 CLASS="SECT3"
3345 ><H4
3346 CLASS="SECT3"
3347 ><A
3348 NAME="FILTER"
3349 >8.5.14. filter</A
3350 ></H4
3351 ><P
3352 ></P
3353 ><DIV
3354 CLASS="VARIABLELIST"
3355 ><DL
3356 ><DT
3357 >Typical use:</DT
3358 ><DD
3359 ><P
3360 >Get rid of HTML and JavaScript annoyances, banner advertisements (by size), 
3361          do fun text replacements, add personalized effects, etc.</P
3362 ></DD
3363 ><DT
3364 >Effect:</DT
3365 ><DD
3366 ><P
3367 >    All instances of text-based type, most notably HTML and JavaScript, to which
3368     this action applies, can be filtered on-the-fly through the specified regular
3369     expression based substitutions. (Note: as of version 3.0.3 plain text documents
3370     are exempted from filtering, because web servers often use the
3371    <TT
3372 CLASS="LITERAL"
3373 >text/plain</TT
3374 > MIME type for all files whose type they don't know.)
3375    </P
3376 ></DD
3377 ><DT
3378 >Type:</DT
3379 ><DD
3380 ><P
3381 >Parameterized.</P
3382 ></DD
3383 ><DT
3384 >Parameter:</DT
3385 ><DD
3386 ><P
3387 >    The name of a content filter, as defined in the <A
3388 HREF="filter-file.html"
3389 >filter file</A
3390 >.
3391     Filters can be defined in one or more  files as defined by the 
3392     <TT
3393 CLASS="LITERAL"
3394 ><A
3395 HREF="config.html#FILTERFILE"
3396 >filterfile</A
3397 ></TT
3398 >
3399     option in the <A
3400 HREF="config.html"
3401 >config file</A
3402 >. 
3403     <TT
3404 CLASS="FILENAME"
3405 >default.filter</TT
3406 > is the collection of filters 
3407     supplied by the developers. Locally defined filters should go 
3408     in their own file, such as <TT
3409 CLASS="FILENAME"
3410 >user.filter</TT
3411 >.
3412    </P
3413 ><P
3414 >     When used in its negative form,
3415      and without parameters, <SPAN
3416 CLASS="emphasis"
3417 ><I
3418 CLASS="EMPHASIS"
3419 >all</I
3420 ></SPAN
3421 > filtering is completely disabled.
3422   </P
3423 ></DD
3424 ><DT
3425 >Notes:</DT
3426 ><DD
3427 ><P
3428 >    For your convenience, there are a number of pre-defined filters available 
3429     in the distribution filter file that you can use. See the examples below for
3430     a list.
3431    </P
3432 ><P
3433 >    Filtering requires buffering the page content, which may appear to
3434     slow down page rendering since nothing is displayed until all content has
3435     passed the filters. (It does not really take longer, but seems that way
3436     since the page is not incrementally displayed.) This effect will be more
3437     noticeable on slower connections.
3438    </P
3439 ><P
3440 >   <SPAN
3441 CLASS="QUOTE"
3442 >"Rolling your own"</SPAN
3443 >
3444     filters requires a knowledge of 
3445      <A
3446 HREF="http://en.wikipedia.org/wiki/Regular_expressions"
3447 TARGET="_top"
3448 ><SPAN
3449 CLASS="QUOTE"
3450 >"Regular
3451      Expressions"</SPAN
3452 ></A
3453 > and 
3454       <A
3455 HREF="http://en.wikipedia.org/wiki/Html"
3456 TARGET="_top"
3457 ><SPAN
3458 CLASS="QUOTE"
3459 >"HTML"</SPAN
3460 ></A
3461 >.
3462     This is very powerful feature, and potentially very intrusive. 
3463     Filters should be used with caution, and where an equivalent
3464     <SPAN
3465 CLASS="QUOTE"
3466 >"action"</SPAN
3467 > is not available.
3468    </P
3469 ><P
3470 >    The amount of data that can be filtered is limited to the 
3471     <TT
3472 CLASS="LITERAL"
3473 ><A
3474 HREF="config.html#BUFFER-LIMIT"
3475 >buffer-limit</A
3476 ></TT
3477 >
3478     option in the main <A
3479 HREF="config.html"
3480 >config file</A
3481 >. The 
3482     default is 4096 KB (4 Megs). Once this limit is exceeded, the buffered
3483     data, and all pending data, is passed through unfiltered. 
3484    </P
3485 ><P
3486 >    Inappropriate MIME types, such as zipped files, are not filtered at all.
3487     (Again, only text-based types except plain text). Encrypted SSL data
3488     (from HTTPS servers) cannot be filtered either, since this would violate
3489     the integrity of the secure transaction. In some situations it might
3490     be necessary to protect certain text, like source code, from filtering
3491     by defining appropriate <TT
3492 CLASS="LITERAL"
3493 >-filter</TT
3494 > exceptions.
3495    </P
3496 ><P
3497 >    Compressed content can't be filtered either, unless <SPAN
3498 CLASS="APPLICATION"
3499 >Privoxy</SPAN
3500 >
3501     is compiled with zlib support (requires at least <SPAN
3502 CLASS="APPLICATION"
3503 >Privoxy</SPAN
3504 > 3.0.7),
3505     in which case <SPAN
3506 CLASS="APPLICATION"
3507 >Privoxy</SPAN
3508 > will decompress the content before filtering
3509     it.
3510    </P
3511 ><P
3512 >    If you use a <SPAN
3513 CLASS="APPLICATION"
3514 >Privoxy</SPAN
3515 > version without zlib support, but want filtering to work on
3516     as much documents as possible, even those that would normally be sent compressed,
3517     you must use the <TT
3518 CLASS="LITERAL"
3519 ><A
3520 HREF="actions-file.html#PREVENT-COMPRESSION"
3521 >prevent-compression</A
3522 ></TT
3523 >
3524     action in conjunction with <TT
3525 CLASS="LITERAL"
3526 >filter</TT
3527 >.
3528    </P
3529 ><P
3530 >    Content filtering can achieve some of the same effects as the 
3531     <TT
3532 CLASS="LITERAL"
3533 ><A
3534 HREF="actions-file.html#BLOCK"
3535 >block</A
3536 ></TT
3537 >
3538     action, i.e. it can be used to block ads and banners. But the mechanism 
3539     works quite differently. One effective use, is to block ad banners 
3540     based on their size (see below), since many of these seem to be somewhat 
3541     standardized.
3542    </P
3543 ><P
3544 >    <A
3545 HREF="contact.html"
3546 >Feedback</A
3547 > with suggestions for new or
3548     improved filters is particularly welcome!
3549    </P
3550 ><P
3551 >    The below list has only the names and a one-line description of each
3552     predefined filter. There are <A
3553 HREF="filter-file.html#PREDEFINED-FILTERS"
3554 >more
3555     verbose explanations</A
3556 > of what these filters do in the <A
3557 HREF="filter-file.html"
3558 >filter file chapter</A
3559 >.
3560    </P
3561 ></DD
3562 ><DT
3563 >Example usage (with filters from the distribution <TT
3564 CLASS="FILENAME"
3565 >default.filter</TT
3566 > file).
3567   See <A
3568 HREF="filter-file.html#PREDEFINED-FILTERS"
3569 >the Predefined Filters section</A
3570 > for 
3571   more explanation on each:</DT
3572 ><DD
3573 ><P
3574 >    <A
3575 NAME="FILTER-JS-ANNOYANCES"
3576 ></A
3577 >
3578     <TABLE
3579 BORDER="0"
3580 BGCOLOR="#E0E0E0"
3581 WIDTH="90%"
3582 ><TR
3583 ><TD
3584 ><PRE
3585 CLASS="SCREEN"
3586 >+filter{js-annoyances}       # Get rid of particularly annoying JavaScript abuse</PRE
3587 ></TD
3588 ></TR
3589 ></TABLE
3590 >
3591    </P
3592 ><P
3593 >    <A
3594 NAME="FILTER-JS-EVENTS"
3595 ></A
3596 >
3597     <TABLE
3598 BORDER="0"
3599 BGCOLOR="#E0E0E0"
3600 WIDTH="90%"
3601 ><TR
3602 ><TD
3603 ><PRE
3604 CLASS="SCREEN"
3605 >+filter{js-events}           # Kill all JS event bindings (Radically destructive! Only for extra nasty sites)</PRE
3606 ></TD
3607 ></TR
3608 ></TABLE
3609 >
3610    </P
3611 ><P
3612 >    <A
3613 NAME="FILTER-HTML-ANNOYANCES"
3614 ></A
3615 >
3616     <TABLE
3617 BORDER="0"
3618 BGCOLOR="#E0E0E0"
3619 WIDTH="90%"
3620 ><TR
3621 ><TD
3622 ><PRE
3623 CLASS="SCREEN"
3624 >+filter{html-annoyances}     # Get rid of particularly annoying HTML abuse</PRE
3625 ></TD
3626 ></TR
3627 ></TABLE
3628 >
3629    </P
3630 ><P
3631 >    <A
3632 NAME="FILTER-CONTENT-COOKIES"
3633 ></A
3634 >
3635     <TABLE
3636 BORDER="0"
3637 BGCOLOR="#E0E0E0"
3638 WIDTH="90%"
3639 ><TR
3640 ><TD
3641 ><PRE
3642 CLASS="SCREEN"
3643 >+filter{content-cookies}     # Kill cookies that come in the HTML or JS content</PRE
3644 ></TD
3645 ></TR
3646 ></TABLE
3647 >
3648    </P
3649 ><P
3650 >    <A
3651 NAME="FILTER-REFRESH-TAGS"
3652 ></A
3653 >
3654     <TABLE
3655 BORDER="0"
3656 BGCOLOR="#E0E0E0"
3657 WIDTH="90%"
3658 ><TR
3659 ><TD
3660 ><PRE
3661 CLASS="SCREEN"
3662 >+filter{refresh-tags}        # Kill automatic refresh tags (for dial-on-demand setups)</PRE
3663 ></TD
3664 ></TR
3665 ></TABLE
3666 >
3667    </P
3668 ><P
3669 >    <A
3670 NAME="FILTER-UNSOLICITED-POPUPS"
3671 ></A
3672 >
3673     <TABLE
3674 BORDER="0"
3675 BGCOLOR="#E0E0E0"
3676 WIDTH="90%"
3677 ><TR
3678 ><TD
3679 ><PRE
3680 CLASS="SCREEN"
3681 >+filter{unsolicited-popups}  # Disable only unsolicited pop-up windows. Useful if your browser lacks this ability.</PRE
3682 ></TD
3683 ></TR
3684 ></TABLE
3685 >
3686    </P
3687 ><P
3688 >    <A
3689 NAME="FILTER-ALL-POPUPS"
3690 ></A
3691 >
3692     <TABLE
3693 BORDER="0"
3694 BGCOLOR="#E0E0E0"
3695 WIDTH="90%"
3696 ><TR
3697 ><TD
3698 ><PRE
3699 CLASS="SCREEN"
3700 >+filter{all-popups}          # Kill all popups in JavaScript and HTML. Useful if your browser lacks this ability.</PRE
3701 ></TD
3702 ></TR
3703 ></TABLE
3704 >
3705    </P
3706 ><P
3707 >    <A
3708 NAME="FILTER-IMG-REORDER"
3709 ></A
3710 >
3711     <TABLE
3712 BORDER="0"
3713 BGCOLOR="#E0E0E0"
3714 WIDTH="90%"
3715 ><TR
3716 ><TD
3717 ><PRE
3718 CLASS="SCREEN"
3719 >+filter{img-reorder}         # Reorder attributes in &#60;img&#62; tags to make the banners-by-* filters more effective</PRE
3720 ></TD
3721 ></TR
3722 ></TABLE
3723 >
3724    </P
3725 ><P
3726 >    <A
3727 NAME="FILTER-BANNERS-BY-SIZE"
3728 ></A
3729 >
3730     <TABLE
3731 BORDER="0"
3732 BGCOLOR="#E0E0E0"
3733 WIDTH="90%"
3734 ><TR
3735 ><TD
3736 ><PRE
3737 CLASS="SCREEN"
3738 >+filter{banners-by-size}     # Kill banners by size</PRE
3739 ></TD
3740 ></TR
3741 ></TABLE
3742 >
3743    </P
3744 ><P
3745 >    <A
3746 NAME="FILTER-BANNERS-BY-LINK"
3747 ></A
3748 >
3749     <TABLE
3750 BORDER="0"
3751 BGCOLOR="#E0E0E0"
3752 WIDTH="90%"
3753 ><TR
3754 ><TD
3755 ><PRE
3756 CLASS="SCREEN"
3757 >+filter{banners-by-link}     # Kill banners by their links to known clicktrackers</PRE
3758 ></TD
3759 ></TR
3760 ></TABLE
3761 >
3762    </P
3763 ><P
3764 >    <A
3765 NAME="FILTER-WEBBUGS"
3766 ></A
3767 >
3768     <TABLE
3769 BORDER="0"
3770 BGCOLOR="#E0E0E0"
3771 WIDTH="90%"
3772 ><TR
3773 ><TD
3774 ><PRE
3775 CLASS="SCREEN"
3776 >+filter{webbugs}             # Squish WebBugs (1x1 invisible GIFs used for user tracking)</PRE
3777 ></TD
3778 ></TR
3779 ></TABLE
3780 >
3781    </P
3782 ><P
3783 >    <A
3784 NAME="FILTER-TINY-TEXTFORMS"
3785 ></A
3786 >
3787     <TABLE
3788 BORDER="0"
3789 BGCOLOR="#E0E0E0"
3790 WIDTH="90%"
3791 ><TR
3792 ><TD
3793 ><PRE
3794 CLASS="SCREEN"
3795 >+filter{tiny-textforms}      # Extend those tiny textareas up to 40x80 and kill the hard wrap</PRE
3796 ></TD
3797 ></TR
3798 ></TABLE
3799 >
3800    </P
3801 ><P
3802 >    <A
3803 NAME="FILTER-JUMPING-WINDOWS"
3804 ></A
3805 >
3806     <TABLE
3807 BORDER="0"
3808 BGCOLOR="#E0E0E0"
3809 WIDTH="90%"
3810 ><TR
3811 ><TD
3812 ><PRE
3813 CLASS="SCREEN"
3814 >+filter{jumping-windows}     # Prevent windows from resizing and moving themselves</PRE
3815 ></TD
3816 ></TR
3817 ></TABLE
3818 >
3819    </P
3820 ><P
3821 >    <A
3822 NAME="FILTER-FRAMESET-BORDERS"
3823 ></A
3824 >
3825     <TABLE
3826 BORDER="0"
3827 BGCOLOR="#E0E0E0"
3828 WIDTH="90%"
3829 ><TR
3830 ><TD
3831 ><PRE
3832 CLASS="SCREEN"
3833 >+filter{frameset-borders}    # Give frames a border and make them resizeable</PRE
3834 ></TD
3835 ></TR
3836 ></TABLE
3837 >
3838    </P
3839 ><P
3840 >    <A
3841 NAME="FILTER-DEMORONIZER"
3842 ></A
3843 >
3844     <TABLE
3845 BORDER="0"
3846 BGCOLOR="#E0E0E0"
3847 WIDTH="90%"
3848 ><TR
3849 ><TD
3850 ><PRE
3851 CLASS="SCREEN"
3852 >+filter{demoronizer}         # Fix MS's non-standard use of standard charsets</PRE
3853 ></TD
3854 ></TR
3855 ></TABLE
3856 >
3857    </P
3858 ><P
3859 >    <A
3860 NAME="FILTER-SHOCKWAVE-FLASH"
3861 ></A
3862 >
3863     <TABLE
3864 BORDER="0"
3865 BGCOLOR="#E0E0E0"
3866 WIDTH="90%"
3867 ><TR
3868 ><TD
3869 ><PRE
3870 CLASS="SCREEN"
3871 >+filter{shockwave-flash}     # Kill embedded Shockwave Flash objects</PRE
3872 ></TD
3873 ></TR
3874 ></TABLE
3875 >
3876    </P
3877 ><P
3878 >    <A
3879 NAME="FILTER-QUICKTIME-KIOSKMODE"
3880 ></A
3881 >
3882     <TABLE
3883 BORDER="0"
3884 BGCOLOR="#E0E0E0"
3885 WIDTH="90%"
3886 ><TR
3887 ><TD
3888 ><PRE
3889 CLASS="SCREEN"
3890 >+filter{quicktime-kioskmode} # Make Quicktime movies savable</PRE
3891 ></TD
3892 ></TR
3893 ></TABLE
3894 >
3895    </P
3896 ><P
3897 >    <A
3898 NAME="FILTER-FUN"
3899 ></A
3900 >
3901     <TABLE
3902 BORDER="0"
3903 BGCOLOR="#E0E0E0"
3904 WIDTH="90%"
3905 ><TR
3906 ><TD
3907 ><PRE
3908 CLASS="SCREEN"
3909 >+filter{fun}                 # Text replacements for subversive browsing fun!</PRE
3910 ></TD
3911 ></TR
3912 ></TABLE
3913 >
3914    </P
3915 ><P
3916 >    <A
3917 NAME="FILTER-CRUDE-PARENTAL"
3918 ></A
3919 >
3920     <TABLE
3921 BORDER="0"
3922 BGCOLOR="#E0E0E0"
3923 WIDTH="90%"
3924 ><TR
3925 ><TD
3926 ><PRE
3927 CLASS="SCREEN"
3928 >+filter{crude-parental}      # Crude parental filtering (demo only)</PRE
3929 ></TD
3930 ></TR
3931 ></TABLE
3932 >
3933    </P
3934 ><P
3935 >    <A
3936 NAME="FILTER-IE-EXPLOITS"
3937 ></A
3938 >
3939     <TABLE
3940 BORDER="0"
3941 BGCOLOR="#E0E0E0"
3942 WIDTH="90%"
3943 ><TR
3944 ><TD
3945 ><PRE
3946 CLASS="SCREEN"
3947 >+filter{ie-exploits}         # Disable a known Internet Explorer bug exploits</PRE
3948 ></TD
3949 ></TR
3950 ></TABLE
3951 >
3952    </P
3953 ><P
3954 >    <A
3955 NAME="FILTER-SITE-SPECIFICS"
3956 ></A
3957 >
3958     <TABLE
3959 BORDER="0"
3960 BGCOLOR="#E0E0E0"
3961 WIDTH="90%"
3962 ><TR
3963 ><TD
3964 ><PRE
3965 CLASS="SCREEN"
3966 >+filter{site-specifics}      # Custom filters for specific site related problems</PRE
3967 ></TD
3968 ></TR
3969 ></TABLE
3970 >
3971    </P
3972 ><P
3973 >    <A
3974 NAME="FILTER-GOOGLE"
3975 ></A
3976 >
3977     <TABLE
3978 BORDER="0"
3979 BGCOLOR="#E0E0E0"
3980 WIDTH="90%"
3981 ><TR
3982 ><TD
3983 ><PRE
3984 CLASS="SCREEN"
3985 >+filter{google}              # Removes text ads and other Google specific improvements</PRE
3986 ></TD
3987 ></TR
3988 ></TABLE
3989 >
3990    </P
3991 ><P
3992 >    <A
3993 NAME="FILTER-YAHOO"
3994 ></A
3995 >
3996     <TABLE
3997 BORDER="0"
3998 BGCOLOR="#E0E0E0"
3999 WIDTH="90%"
4000 ><TR
4001 ><TD
4002 ><PRE
4003 CLASS="SCREEN"
4004 >+filter{yahoo}               # Removes text ads and other Yahoo specific improvements</PRE
4005 ></TD
4006 ></TR
4007 ></TABLE
4008 >
4009    </P
4010 ><P
4011 >    <A
4012 NAME="FILTER-MSN"
4013 ></A
4014 >
4015     <TABLE
4016 BORDER="0"
4017 BGCOLOR="#E0E0E0"
4018 WIDTH="90%"
4019 ><TR
4020 ><TD
4021 ><PRE
4022 CLASS="SCREEN"
4023 >+filter{msn}                 # Removes text ads and other MSN specific improvements</PRE
4024 ></TD
4025 ></TR
4026 ></TABLE
4027 >
4028    </P
4029 ><P
4030 >    <A
4031 NAME="FILTER-BLOGSPOT"
4032 ></A
4033 >
4034     <TABLE
4035 BORDER="0"
4036 BGCOLOR="#E0E0E0"
4037 WIDTH="90%"
4038 ><TR
4039 ><TD
4040 ><PRE
4041 CLASS="SCREEN"
4042 >+filter{blogspot}            # Cleans up Blogspot blogs</PRE
4043 ></TD
4044 ></TR
4045 ></TABLE
4046 >
4047    </P
4048 ><P
4049 >    <A
4050 NAME="FILTER-NO-PING"
4051 ></A
4052 >
4053     <TABLE
4054 BORDER="0"
4055 BGCOLOR="#E0E0E0"
4056 WIDTH="90%"
4057 ><TR
4058 ><TD
4059 ><PRE
4060 CLASS="SCREEN"
4061 >+filter{no-ping}             # Removes non-standard ping attributes from anchor and area tags</PRE
4062 ></TD
4063 ></TR
4064 ></TABLE
4065 >
4066    </P
4067 ></DD
4068 ></DL
4069 ></DIV
4070 ></DIV
4071 ><DIV
4072 CLASS="SECT3"
4073 ><H4
4074 CLASS="SECT3"
4075 ><A
4076 NAME="FORCE-TEXT-MODE"
4077 >8.5.15. force-text-mode</A
4078 ></H4
4079 ><P
4080 ></P
4081 ><DIV
4082 CLASS="VARIABLELIST"
4083 ><DL
4084 ><DT
4085 >Typical use:</DT
4086 ><DD
4087 ><P
4088 >Force <SPAN
4089 CLASS="APPLICATION"
4090 >Privoxy</SPAN
4091 > to treat a document as if it was in some kind of <SPAN
4092 CLASS="emphasis"
4093 ><I
4094 CLASS="EMPHASIS"
4095 >text</I
4096 ></SPAN
4097 > format.   </P
4098 ></DD
4099 ><DT
4100 >Effect:</DT
4101 ><DD
4102 ><P
4103 >    Declares a document as text, even if the <SPAN
4104 CLASS="QUOTE"
4105 >"Content-Type:"</SPAN
4106 > isn't detected as such.
4107    </P
4108 ></DD
4109 ><DT
4110 >Type:</DT
4111 ><DD
4112 ><P
4113 >Boolean.</P
4114 ></DD
4115 ><DT
4116 >Parameter:</DT
4117 ><DD
4118 ><P
4119 >    N/A
4120    </P
4121 ></DD
4122 ><DT
4123 >Notes:</DT
4124 ><DD
4125 ><P
4126 >    As explained <TT
4127 CLASS="LITERAL"
4128 ><A
4129 HREF="actions-file.html#FILTER"
4130 >above</A
4131 ></TT
4132 >,
4133     <SPAN
4134 CLASS="APPLICATION"
4135 >Privoxy</SPAN
4136 > tries to only filter files that are
4137     in some kind of text format. The same restrictions apply to
4138     <TT
4139 CLASS="LITERAL"
4140 ><A
4141 HREF="actions-file.html#CONTENT-TYPE-OVERWRITE"
4142 >content-type-overwrite</A
4143 ></TT
4144 >.
4145     <TT
4146 CLASS="LITERAL"
4147 >force-text-mode</TT
4148 > declares a document as text,
4149     without looking at the <SPAN
4150 CLASS="QUOTE"
4151 >"Content-Type:"</SPAN
4152 > first.
4153    </P
4154 ><DIV
4155 CLASS="WARNING"
4156 ><P
4157 ></P
4158 ><TABLE
4159 CLASS="WARNING"
4160 BORDER="1"
4161 WIDTH="90%"
4162 ><TR
4163 ><TD
4164 ALIGN="CENTER"
4165 ><B
4166 >Warning</B
4167 ></TD
4168 ></TR
4169 ><TR
4170 ><TD
4171 ALIGN="LEFT"
4172 ><P
4173 >     Think twice before activating this action. Filtering binary data
4174      with regular expressions can cause file damage.
4175     </P
4176 ></TD
4177 ></TR
4178 ></TABLE
4179 ></DIV
4180 ></DD
4181 ><DT
4182 >Example usage:</DT
4183 ><DD
4184 ><P
4185 >     <TABLE
4186 BORDER="0"
4187 BGCOLOR="#E0E0E0"
4188 WIDTH="90%"
4189 ><TR
4190 ><TD
4191 ><PRE
4192 CLASS="SCREEN"
4193 >+force-text-mode
4194      </PRE
4195 ></TD
4196 ></TR
4197 ></TABLE
4198 >
4199    </P
4200 ></DD
4201 ></DL
4202 ></DIV
4203 ></DIV
4204 ><DIV
4205 CLASS="SECT3"
4206 ><H4
4207 CLASS="SECT3"
4208 ><A
4209 NAME="FORWARD-OVERRIDE"
4210 >8.5.16. forward-override</A
4211 ></H4
4212 ><P
4213 ></P
4214 ><DIV
4215 CLASS="VARIABLELIST"
4216 ><DL
4217 ><DT
4218 >Typical use:</DT
4219 ><DD
4220 ><P
4221 >Change the forwarding settings based on User-Agent or request origin</P
4222 ></DD
4223 ><DT
4224 >Effect:</DT
4225 ><DD
4226 ><P
4227 >    Overrules the forward directives in the configuration file.
4228    </P
4229 ></DD
4230 ><DT
4231 >Type:</DT
4232 ><DD
4233 ><P
4234 >Multi-value.</P
4235 ></DD
4236 ><DT
4237 >Parameter:</DT
4238 ><DD
4239 ><P
4240 ></P
4241 ><UL
4242 ><LI
4243 ><P
4244 ><SPAN
4245 CLASS="QUOTE"
4246 >"forward ."</SPAN
4247 > to use a direct connection without any additional proxies.</P
4248 ></LI
4249 ><LI
4250 ><P
4251 >      <SPAN
4252 CLASS="QUOTE"
4253 >"forward 127.0.0.1:8123"</SPAN
4254 > to use the HTTP proxy listening at 127.0.0.1 port 8123.
4255      </P
4256 ></LI
4257 ><LI
4258 ><P
4259 >      <SPAN
4260 CLASS="QUOTE"
4261 >"forward-socks4a 127.0.0.1:9050 ."</SPAN
4262 > to use the socks4a proxy listening at
4263       127.0.0.1 port 9050. Replace <SPAN
4264 CLASS="QUOTE"
4265 >"forward-socks4a"</SPAN
4266 > with <SPAN
4267 CLASS="QUOTE"
4268 >"forward-socks4"</SPAN
4269 >
4270       to use a socks4 connection  (with local DNS resolution) instead.
4271      </P
4272 ></LI
4273 ><LI
4274 ><P
4275 >      <SPAN
4276 CLASS="QUOTE"
4277 >"forward-socks4a 127.0.0.1:9050 proxy.example.org:8000"</SPAN
4278 > to use the socks4a proxy
4279       listening at 127.0.0.1 port 9050 to reach the HTTP proxy listening at proxy.example.org port 8000.
4280       Replace <SPAN
4281 CLASS="QUOTE"
4282 >"forward-socks4a"</SPAN
4283 > with <SPAN
4284 CLASS="QUOTE"
4285 >"forward-socks4"</SPAN
4286 > to use a socks4 connection
4287       (with local DNS resolution) instead.
4288      </P
4289 ></LI
4290 ></UL
4291 ></DD
4292 ><DT
4293 >Notes:</DT
4294 ><DD
4295 ><P
4296 >    This action takes parameters similar to the 
4297     <A
4298 HREF="config.html#FORWARDING"
4299 >forward</A
4300 > directives in the configuration
4301     file, but without the URL pattern. It can be used as replacement, but normally it's only
4302     used in cases where matching based on the request URL isn't sufficient.
4303    </P
4304 ><DIV
4305 CLASS="WARNING"
4306 ><P
4307 ></P
4308 ><TABLE
4309 CLASS="WARNING"
4310 BORDER="1"
4311 WIDTH="90%"
4312 ><TR
4313 ><TD
4314 ALIGN="CENTER"
4315 ><B
4316 >Warning</B
4317 ></TD
4318 ></TR
4319 ><TR
4320 ><TD
4321 ALIGN="LEFT"
4322 ><P
4323 >     Please read the description for the <A
4324 HREF="config.html#FORWARDING"
4325 >forward</A
4326 > directives before
4327      using this action. Forwarding to the wrong people will reduce your privacy and increase the
4328      chances of man-in-the-middle attacks.
4329     </P
4330 ><P
4331 >     If the ports are missing or invalid, default values will be used. This might change
4332      in the future and you shouldn't rely on it. Otherwise incorrect syntax causes Privoxy
4333      to exit.
4334     </P
4335 ><P
4336 >     Use the <A
4337 HREF="http://config.privoxy.org/show-url-info"
4338 TARGET="_top"
4339 >show-url-info CGI page</A
4340 >
4341      to verify that your forward settings do what you thought the do.
4342     </P
4343 ></TD
4344 ></TR
4345 ></TABLE
4346 ></DIV
4347 ></DD
4348 ><DT
4349 >Example usage:</DT
4350 ><DD
4351 ><P
4352 >     <TABLE
4353 BORDER="0"
4354 BGCOLOR="#E0E0E0"
4355 WIDTH="90%"
4356 ><TR
4357 ><TD
4358 ><PRE
4359 CLASS="SCREEN"
4360 ># Always use direct connections for requests previously tagged as
4361 # <SPAN
4362 CLASS="QUOTE"
4363 >"User-Agent: fetch libfetch/2.0"</SPAN
4364 > and make sure
4365 # resuming downloads continues to work.
4366 # This way you can continue to use Tor for your normal browsing,
4367 # without overloading the Tor network with your FreeBSD ports updates
4368 # or downloads of bigger files like ISOs.
4369 # Note that HTTP headers are easy to fake and therefore their
4370 # values are as (un)trustworthy as your clients and users.
4371 {+forward-override{forward .} \
4372  -hide-if-modified-since      \
4373  -overwrite-last-modified     \
4374 }
4375 TAG:^User-Agent: fetch libfetch/2\.0$
4376      </PRE
4377 ></TD
4378 ></TR
4379 ></TABLE
4380 >
4381    </P
4382 ></DD
4383 ></DL
4384 ></DIV
4385 ></DIV
4386 ><DIV
4387 CLASS="SECT3"
4388 ><H4
4389 CLASS="SECT3"
4390 ><A
4391 NAME="HANDLE-AS-EMPTY-DOCUMENT"
4392 >8.5.17. handle-as-empty-document</A
4393 ></H4
4394 ><P
4395 ></P
4396 ><DIV
4397 CLASS="VARIABLELIST"
4398 ><DL
4399 ><DT
4400 >Typical use:</DT
4401 ><DD
4402 ><P
4403 >Mark URLs that should be replaced by empty documents <SPAN
4404 CLASS="emphasis"
4405 ><I
4406 CLASS="EMPHASIS"
4407 >if they get blocked</I
4408 ></SPAN
4409 ></P
4410 ></DD
4411 ><DT
4412 >Effect:</DT
4413 ><DD
4414 ><P
4415 >    This action alone doesn't do anything noticeable. It just marks URLs.
4416     If the <TT
4417 CLASS="LITERAL"
4418 ><A
4419 HREF="actions-file.html#BLOCK"
4420 >block</A
4421 ></TT
4422 > action <SPAN
4423 CLASS="emphasis"
4424 ><I
4425 CLASS="EMPHASIS"
4426 >also applies</I
4427 ></SPAN
4428 >,
4429     the presence or absence of this mark decides whether an HTML <SPAN
4430 CLASS="QUOTE"
4431 >"BLOCKED"</SPAN
4432 >
4433     page, or an empty document will be sent to the client as a substitute for the blocked content.
4434     The <SPAN
4435 CLASS="emphasis"
4436 ><I
4437 CLASS="EMPHASIS"
4438 >empty</I
4439 ></SPAN
4440 > document isn't literally empty, but actually contains a single space.
4441    </P
4442 ></DD
4443 ><DT
4444 >Type:</DT
4445 ><DD
4446 ><P
4447 >Boolean.</P
4448 ></DD
4449 ><DT
4450 >Parameter:</DT
4451 ><DD
4452 ><P
4453 >    N/A
4454    </P
4455 ></DD
4456 ><DT
4457 >Notes:</DT
4458 ><DD
4459 ><P
4460 >    Some browsers complain about syntax errors if JavaScript documents
4461     are blocked with <SPAN
4462 CLASS="APPLICATION"
4463 >Privoxy's</SPAN
4464 >
4465     default HTML page; this option can be used to silence them.
4466     And of course this action can also be used to eliminate the <SPAN
4467 CLASS="APPLICATION"
4468 >Privoxy</SPAN
4469 >
4470     BLOCKED message in frames.
4471    </P
4472 ><P
4473 >    The content type for the empty document can be specified with
4474     <TT
4475 CLASS="LITERAL"
4476 ><A
4477 HREF="actions-file.html#CONTENT-TYPE-OVERWRITE"
4478 >content-type-overwrite{}</A
4479 ></TT
4480 >,
4481     but usually this isn't necessary.
4482    </P
4483 ></DD
4484 ><DT
4485 >Example usage:</DT
4486 ><DD
4487 ><P
4488 >     <TABLE
4489 BORDER="0"
4490 BGCOLOR="#E0E0E0"
4491 WIDTH="90%"
4492 ><TR
4493 ><TD
4494 ><PRE
4495 CLASS="SCREEN"
4496 ># Block all documents on example.org that end with ".js",
4497 # but send an empty document instead of the usual HTML message. 
4498 {+block +handle-as-empty-document}
4499 example.org/.*\.js$
4500      </PRE
4501 ></TD
4502 ></TR
4503 ></TABLE
4504 >
4505    </P
4506 ></DD
4507 ></DL
4508 ></DIV
4509 ></DIV
4510 ><DIV
4511 CLASS="SECT3"
4512 ><H4
4513 CLASS="SECT3"
4514 ><A
4515 NAME="HANDLE-AS-IMAGE"
4516 >8.5.18. handle-as-image</A
4517 ></H4
4518 ><P
4519 ></P
4520 ><DIV
4521 CLASS="VARIABLELIST"
4522 ><DL
4523 ><DT
4524 >Typical use:</DT
4525 ><DD
4526 ><P
4527 >Mark URLs as belonging to images (so they'll be replaced by images <SPAN
4528 CLASS="emphasis"
4529 ><I
4530 CLASS="EMPHASIS"
4531 >if they do get blocked</I
4532 ></SPAN
4533 >, rather than HTML pages)</P
4534 ></DD
4535 ><DT
4536 >Effect:</DT
4537 ><DD
4538 ><P
4539 >    This action alone doesn't do anything noticeable. It just marks URLs as images.
4540     If the <TT
4541 CLASS="LITERAL"
4542 ><A
4543 HREF="actions-file.html#BLOCK"
4544 >block</A
4545 ></TT
4546 > action <SPAN
4547 CLASS="emphasis"
4548 ><I
4549 CLASS="EMPHASIS"
4550 >also applies</I
4551 ></SPAN
4552 >,
4553     the presence or absence of this mark decides whether an HTML <SPAN
4554 CLASS="QUOTE"
4555 >"blocked"</SPAN
4556 >
4557     page, or a replacement image (as determined by the <TT
4558 CLASS="LITERAL"
4559 ><A
4560 HREF="actions-file.html#SET-IMAGE-BLOCKER"
4561 >set-image-blocker</A
4562 ></TT
4563 > action) will be sent to the
4564     client as a substitute for the blocked content.
4565    </P
4566 ></DD
4567 ><DT
4568 >Type:</DT
4569 ><DD
4570 ><P
4571 >Boolean.</P
4572 ></DD
4573 ><DT
4574 >Parameter:</DT
4575 ><DD
4576 ><P
4577 >    N/A
4578    </P
4579 ></DD
4580 ><DT
4581 >Notes:</DT
4582 ><DD
4583 ><P
4584 >    The below generic example section is actually part of <TT
4585 CLASS="FILENAME"
4586 >default.action</TT
4587 >.
4588     It marks all URLs with well-known image file name extensions as images and should
4589     be left intact. 
4590    </P
4591 ><P
4592 >    Users will probably only want to use the handle-as-image action in conjunction with
4593     <TT
4594 CLASS="LITERAL"
4595 ><A
4596 HREF="actions-file.html#BLOCK"
4597 >block</A
4598 ></TT
4599 >, to block sources of banners, whose URLs don't
4600     reflect the file type, like in the second example section.
4601    </P
4602 ><P
4603 >    Note that you cannot treat HTML pages as images in most cases. For instance, (in-line) ad
4604     frames require an HTML page to be sent, or they won't display properly.
4605     Forcing <TT
4606 CLASS="LITERAL"
4607 >handle-as-image</TT
4608 > in this situation will not replace the
4609     ad frame with an image, but lead to error messages.
4610    </P
4611 ></DD
4612 ><DT
4613 >Example usage (sections):</DT
4614 ><DD
4615 ><P
4616 >     <TABLE
4617 BORDER="0"
4618 BGCOLOR="#E0E0E0"
4619 WIDTH="90%"
4620 ><TR
4621 ><TD
4622 ><PRE
4623 CLASS="SCREEN"
4624 ># Generic image extensions:
4625 #
4626 {+handle-as-image}
4627 /.*\.(gif|jpg|jpeg|png|bmp|ico)$
4628
4629 # These don't look like images, but they're banners and should be
4630 # blocked as images:
4631 #
4632 {+block +handle-as-image}
4633 some.nasty-banner-server.com/junk.cgi\?output=trash
4634
4635 # Banner source! Who cares if they also have non-image content?
4636 ad.doubleclick.net </PRE
4637 ></TD
4638 ></TR
4639 ></TABLE
4640 >
4641    </P
4642 ></DD
4643 ></DL
4644 ></DIV
4645 ></DIV
4646 ><DIV
4647 CLASS="SECT3"
4648 ><H4
4649 CLASS="SECT3"
4650 ><A
4651 NAME="HIDE-ACCEPT-LANGUAGE"
4652 >8.5.19. hide-accept-language</A
4653 ></H4
4654 ><P
4655 ></P
4656 ><DIV
4657 CLASS="VARIABLELIST"
4658 ><DL
4659 ><DT
4660 >Typical use:</DT
4661 ><DD
4662 ><P
4663 >Pretend to use different language settings.</P
4664 ></DD
4665 ><DT
4666 >Effect:</DT
4667 ><DD
4668 ><P
4669 >    Deletes or replaces the <SPAN
4670 CLASS="QUOTE"
4671 >"Accept-Language:"</SPAN
4672 > HTTP header in client requests.
4673    </P
4674 ></DD
4675 ><DT
4676 >Type:</DT
4677 ><DD
4678 ><P
4679 >Parameterized.</P
4680 ></DD
4681 ><DT
4682 >Parameter:</DT
4683 ><DD
4684 ><P
4685 >    Keyword: <SPAN
4686 CLASS="QUOTE"
4687 >"block"</SPAN
4688 >, or any user defined value.
4689    </P
4690 ></DD
4691 ><DT
4692 >Notes:</DT
4693 ><DD
4694 ><P
4695 >    Faking the browser's language settings can be useful to make a
4696     foreign User-Agent set with
4697     <TT
4698 CLASS="LITERAL"
4699 ><A
4700 HREF="actions-file.html#HIDE-USER-AGENT"
4701 >hide-user-agent</A
4702 ></TT
4703 >
4704     more believable.
4705    </P
4706 ><P
4707 >    However some sites with content in different languages check the
4708     <SPAN
4709 CLASS="QUOTE"
4710 >"Accept-Language:"</SPAN
4711 > to decide which one to take by default.
4712     Sometimes it isn't possible to later switch to another language without
4713     changing the <SPAN
4714 CLASS="QUOTE"
4715 >"Accept-Language:"</SPAN
4716 > header first.
4717    </P
4718 ><P
4719 >    Therefore it's a good idea to either only change the
4720     <SPAN
4721 CLASS="QUOTE"
4722 >"Accept-Language:"</SPAN
4723 > header to languages you understand,
4724     or to languages that aren't wide spread.
4725    </P
4726 ><P
4727 >    Before setting the <SPAN
4728 CLASS="QUOTE"
4729 >"Accept-Language:"</SPAN
4730 > header
4731     to a rare language, you should consider that it helps to
4732     make your requests unique and thus easier to trace.
4733     If you don't plan to change this header frequently,
4734     you should stick to a common language. 
4735    </P
4736 ></DD
4737 ><DT
4738 >Example usage (section):</DT
4739 ><DD
4740 ><P
4741 >     <TABLE
4742 BORDER="0"
4743 BGCOLOR="#E0E0E0"
4744 WIDTH="90%"
4745 ><TR
4746 ><TD
4747 ><PRE
4748 CLASS="SCREEN"
4749 ># Pretend to use Canadian language settings.
4750 {+hide-accept-language{en-ca} \
4751 +hide-user-agent{Mozilla/5.0 (X11; U; OpenBSD i386; en-CA; rv:1.8.0.4) Gecko/20060628 Firefox/1.5.0.4} \
4752 }
4753 /   </PRE
4754 ></TD
4755 ></TR
4756 ></TABLE
4757 >
4758    </P
4759 ></DD
4760 ></DL
4761 ></DIV
4762 ></DIV
4763 ><DIV
4764 CLASS="SECT3"
4765 ><H4
4766 CLASS="SECT3"
4767 ><A
4768 NAME="HIDE-CONTENT-DISPOSITION"
4769 >8.5.20. hide-content-disposition</A
4770 ></H4
4771 ><P
4772 ></P
4773 ><DIV
4774 CLASS="VARIABLELIST"
4775 ><DL
4776 ><DT
4777 >Typical use:</DT
4778 ><DD
4779 ><P
4780 >Prevent download menus for content you prefer to view inside the browser.</P
4781 ></DD
4782 ><DT
4783 >Effect:</DT
4784 ><DD
4785 ><P
4786 >    Deletes or replaces the <SPAN
4787 CLASS="QUOTE"
4788 >"Content-Disposition:"</SPAN
4789 > HTTP header set by some servers.
4790    </P
4791 ></DD
4792 ><DT
4793 >Type:</DT
4794 ><DD
4795 ><P
4796 >Parameterized.</P
4797 ></DD
4798 ><DT
4799 >Parameter:</DT
4800 ><DD
4801 ><P
4802 >    Keyword: <SPAN
4803 CLASS="QUOTE"
4804 >"block"</SPAN
4805 >, or any user defined value.
4806    </P
4807 ></DD
4808 ><DT
4809 >Notes:</DT
4810 ><DD
4811 ><P
4812 >    Some servers set the <SPAN
4813 CLASS="QUOTE"
4814 >"Content-Disposition:"</SPAN
4815 > HTTP header for
4816     documents they assume you want to save locally before viewing them.
4817     The <SPAN
4818 CLASS="QUOTE"
4819 >"Content-Disposition:"</SPAN
4820 > header contains the file name
4821     the browser is supposed to use by default.
4822    </P
4823 ><P
4824 >    In most browsers that understand this header, it makes it impossible to
4825     <SPAN
4826 CLASS="emphasis"
4827 ><I
4828 CLASS="EMPHASIS"
4829 >just view</I
4830 ></SPAN
4831 > the document, without downloading it first,
4832     even if it's just a simple text file or an image.
4833    </P
4834 ><P
4835 >    Removing the <SPAN
4836 CLASS="QUOTE"
4837 >"Content-Disposition:"</SPAN
4838 > header helps
4839     to prevent this annoyance, but some browsers additionally check the
4840     <SPAN
4841 CLASS="QUOTE"
4842 >"Content-Type:"</SPAN
4843 > header, before they decide if they can
4844     display a document without saving it first. In these cases, you have
4845     to change this header as well, before the browser stops displaying
4846     download menus.
4847    </P
4848 ><P
4849 >    It is also possible to change the server's file name suggestion
4850     to another one, but in most cases it isn't worth the time to set
4851     it up.
4852    </P
4853 ><P
4854 >    This action will probably be removed in the future,
4855     use server-header filters instead.
4856    </P
4857 ></DD
4858 ><DT
4859 >Example usage:</DT
4860 ><DD
4861 ><P
4862 >     <TABLE
4863 BORDER="0"
4864 BGCOLOR="#E0E0E0"
4865 WIDTH="90%"
4866 ><TR
4867 ><TD
4868 ><PRE
4869 CLASS="SCREEN"
4870 ># Disarm the download link in Sourceforge's patch tracker
4871 { -filter \
4872  +content-type-overwrite{text/plain}\
4873  +hide-content-disposition{block} }
4874  .sourceforge.net/tracker/download\.php</PRE
4875 ></TD
4876 ></TR
4877 ></TABLE
4878 >
4879    </P
4880 ></DD
4881 ></DL
4882 ></DIV
4883 ></DIV
4884 ><DIV
4885 CLASS="SECT3"
4886 ><H4
4887 CLASS="SECT3"
4888 ><A
4889 NAME="HIDE-IF-MODIFIED-SINCE"
4890 >8.5.21. hide-if-modified-since</A
4891 ></H4
4892 ><P
4893 ></P
4894 ><DIV
4895 CLASS="VARIABLELIST"
4896 ><DL
4897 ><DT
4898 >Typical use:</DT
4899 ><DD
4900 ><P
4901 >Prevent yet another way to track the user's steps between sessions.</P
4902 ></DD
4903 ><DT
4904 >Effect:</DT
4905 ><DD
4906 ><P
4907 >    Deletes the <SPAN
4908 CLASS="QUOTE"
4909 >"If-Modified-Since:"</SPAN
4910 > HTTP client header or modifies its value. 
4911    </P
4912 ></DD
4913 ><DT
4914 >Type:</DT
4915 ><DD
4916 ><P
4917 >Parameterized.</P
4918 ></DD
4919 ><DT
4920 >Parameter:</DT
4921 ><DD
4922 ><P
4923 >    Keyword: <SPAN
4924 CLASS="QUOTE"
4925 >"block"</SPAN
4926 >, or a user defined value that specifies a range of hours.
4927    </P
4928 ></DD
4929 ><DT
4930 >Notes:</DT
4931 ><DD
4932 ><P
4933 >    Removing this header is useful for filter testing, where you want to force a real
4934     reload instead of getting status code <SPAN
4935 CLASS="QUOTE"
4936 >"304"</SPAN
4937 >, which would cause the
4938     browser to use a cached copy of the page.
4939    </P
4940 ><P
4941 >    Instead of removing the header, <TT
4942 CLASS="LITERAL"
4943 >hide-if-modified-since</TT
4944 > can
4945     also add or subtract a random amount of time to/from the header's value.
4946     You specify a range of minutes where the random factor should be chosen from and
4947     <SPAN
4948 CLASS="APPLICATION"
4949 >Privoxy</SPAN
4950 > does the rest. A negative value means
4951     subtracting, a positive value adding.
4952    </P
4953 ><P
4954 >    Randomizing the value of the <SPAN
4955 CLASS="QUOTE"
4956 >"If-Modified-Since:"</SPAN
4957 > makes
4958     it less likely that the server can use the time as a cookie replacement,
4959     but you will run into caching problems if the random range is too high.
4960    </P
4961 ><P
4962 >    It is a good idea to only use a small negative value and let
4963     <TT
4964 CLASS="LITERAL"
4965 ><A
4966 HREF="actions-file.html#OVERWRITE-LAST-MODIFIED"
4967 >overwrite-last-modified</A
4968 ></TT
4969 >
4970     handle the greater changes.
4971    </P
4972 ><P
4973 >    It is also recommended to use this action together with
4974     <TT
4975 CLASS="LITERAL"
4976 ><A
4977 HREF="actions-file.html#CRUNCH-IF-NONE-MATCH"
4978 >crunch-if-none-match</A
4979 ></TT
4980 >,
4981     otherwise it's more or less pointless.
4982    </P
4983 ></DD
4984 ><DT
4985 >Example usage (section):</DT
4986 ><DD
4987 ><P
4988 >     <TABLE
4989 BORDER="0"
4990 BGCOLOR="#E0E0E0"
4991 WIDTH="90%"
4992 ><TR
4993 ><TD
4994 ><PRE
4995 CLASS="SCREEN"
4996 ># Let the browser revalidate but make tracking based on the time less likely.
4997 {+hide-if-modified-since{-60} \
4998  +overwrite-last-modified{randomize} \
4999  +crunch-if-none-match}
5000 /</PRE
5001 ></TD
5002 ></TR
5003 ></TABLE
5004 >
5005    </P
5006 ></DD
5007 ></DL
5008 ></DIV
5009 ></DIV
5010 ><DIV
5011 CLASS="SECT3"
5012 ><H4
5013 CLASS="SECT3"
5014 ><A
5015 NAME="HIDE-FORWARDED-FOR-HEADERS"
5016 >8.5.22. hide-forwarded-for-headers</A
5017 ></H4
5018 ><P
5019 ></P
5020 ><DIV
5021 CLASS="VARIABLELIST"
5022 ><DL
5023 ><DT
5024 >Typical use:</DT
5025 ><DD
5026 ><P
5027 >Improve privacy by not forwarding the source of the request in the HTTP headers.</P
5028 ></DD
5029 ><DT
5030 >Effect:</DT
5031 ><DD
5032 ><P
5033 >    Deletes any existing <SPAN
5034 CLASS="QUOTE"
5035 >"X-Forwarded-for:"</SPAN
5036 > HTTP header from client requests.
5037    </P
5038 ></DD
5039 ><DT
5040 >Type:</DT
5041 ><DD
5042 ><P
5043 >Boolean.</P
5044 ></DD
5045 ><DT
5046 >Parameter:</DT
5047 ><DD
5048 ><P
5049 >    N/A
5050    </P
5051 ></DD
5052 ><DT
5053 >Notes:</DT
5054 ><DD
5055 ><P
5056 >    It is safe and recommended to leave this on.
5057    </P
5058 ></DD
5059 ><DT
5060 >Example usage:</DT
5061 ><DD
5062 ><P
5063 >     <TABLE
5064 BORDER="0"
5065 BGCOLOR="#E0E0E0"
5066 WIDTH="90%"
5067 ><TR
5068 ><TD
5069 ><PRE
5070 CLASS="SCREEN"
5071 >+hide-forwarded-for-headers</PRE
5072 ></TD
5073 ></TR
5074 ></TABLE
5075 >
5076    </P
5077 ></DD
5078 ></DL
5079 ></DIV
5080 ></DIV
5081 ><DIV
5082 CLASS="SECT3"
5083 ><H4
5084 CLASS="SECT3"
5085 ><A
5086 NAME="HIDE-FROM-HEADER"
5087 >8.5.23. hide-from-header</A
5088 ></H4
5089 ><P
5090 ></P
5091 ><DIV
5092 CLASS="VARIABLELIST"
5093 ><DL
5094 ><DT
5095 >Typical use:</DT
5096 ><DD
5097 ><P
5098 >Keep your (old and ill) browser from telling web servers your email address</P
5099 ></DD
5100 ><DT
5101 >Effect:</DT
5102 ><DD
5103 ><P
5104 >    Deletes any existing <SPAN
5105 CLASS="QUOTE"
5106 >"From:"</SPAN
5107 > HTTP header, or replaces it with the
5108     specified string.
5109    </P
5110 ></DD
5111 ><DT
5112 >Type:</DT
5113 ><DD
5114 ><P
5115 >Parameterized.</P
5116 ></DD
5117 ><DT
5118 >Parameter:</DT
5119 ><DD
5120 ><P
5121 >    Keyword: <SPAN
5122 CLASS="QUOTE"
5123 >"block"</SPAN
5124 >, or any user defined value.
5125    </P
5126 ></DD
5127 ><DT
5128 >Notes:</DT
5129 ><DD
5130 ><P
5131 >    The keyword <SPAN
5132 CLASS="QUOTE"
5133 >"block"</SPAN
5134 > will completely remove the header 
5135     (not to be confused with the <TT
5136 CLASS="LITERAL"
5137 ><A
5138 HREF="actions-file.html#BLOCK"
5139 >block</A
5140 ></TT
5141 >
5142     action).
5143    </P
5144 ><P
5145 >    Alternately, you can specify any value you prefer to be sent to the web
5146     server. If you do, it is a matter of fairness not to use any address that
5147     is actually used by a real person.
5148    </P
5149 ><P
5150 >    This action is rarely needed, as modern web browsers don't send
5151     <SPAN
5152 CLASS="QUOTE"
5153 >"From:"</SPAN
5154 > headers anymore.
5155    </P
5156 ></DD
5157 ><DT
5158 >Example usage:</DT
5159 ><DD
5160 ><P
5161 >    <TABLE
5162 BORDER="0"
5163 BGCOLOR="#E0E0E0"
5164 WIDTH="90%"
5165 ><TR
5166 ><TD
5167 ><PRE
5168 CLASS="SCREEN"
5169 >+hide-from-header{block}</PRE
5170 ></TD
5171 ></TR
5172 ></TABLE
5173 > or
5174     <TABLE
5175 BORDER="0"
5176 BGCOLOR="#E0E0E0"
5177 WIDTH="90%"
5178 ><TR
5179 ><TD
5180 ><PRE
5181 CLASS="SCREEN"
5182 >+hide-from-header{spam-me-senseless@sittingduck.example.com}</PRE
5183 ></TD
5184 ></TR
5185 ></TABLE
5186 >
5187    </P
5188 ></DD
5189 ></DL
5190 ></DIV
5191 ></DIV
5192 ><DIV
5193 CLASS="SECT3"
5194 ><H4
5195 CLASS="SECT3"
5196 ><A
5197 NAME="HIDE-REFERRER"
5198 >8.5.24. hide-referrer</A
5199 ></H4
5200 ><A
5201 NAME="HIDE-REFERER"
5202 ></A
5203 ><P
5204 ></P
5205 ><DIV
5206 CLASS="VARIABLELIST"
5207 ><DL
5208 ><DT
5209 >Typical use:</DT
5210 ><DD
5211 ><P
5212 >Conceal which link you followed to get to a particular site</P
5213 ></DD
5214 ><DT
5215 >Effect:</DT
5216 ><DD
5217 ><P
5218 >    Deletes the <SPAN
5219 CLASS="QUOTE"
5220 >"Referer:"</SPAN
5221 > (sic) HTTP header from the client request,
5222     or replaces it with a forged one.
5223    </P
5224 ></DD
5225 ><DT
5226 >Type:</DT
5227 ><DD
5228 ><P
5229 >Parameterized.</P
5230 ></DD
5231 ><DT
5232 >Parameter:</DT
5233 ><DD
5234 ><P
5235 ></P
5236 ><UL
5237 ><LI
5238 ><P
5239 ><SPAN
5240 CLASS="QUOTE"
5241 >"conditional-block"</SPAN
5242 > to delete the header completely if the host has changed.</P
5243 ></LI
5244 ><LI
5245 ><P
5246 ><SPAN
5247 CLASS="QUOTE"
5248 >"conditional-forge"</SPAN
5249 > to forge the header if the host has changed.</P
5250 ></LI
5251 ><LI
5252 ><P
5253 ><SPAN
5254 CLASS="QUOTE"
5255 >"block"</SPAN
5256 > to delete the header unconditionally.</P
5257 ></LI
5258 ><LI
5259 ><P
5260 ><SPAN
5261 CLASS="QUOTE"
5262 >"forge"</SPAN
5263 > to pretend to be coming from the homepage of the server we are talking to.</P
5264 ></LI
5265 ><LI
5266 ><P
5267 >Any other string to set a user defined referrer.</P
5268 ></LI
5269 ></UL
5270 ></DD
5271 ><DT
5272 >Notes:</DT
5273 ><DD
5274 ><P
5275 >    <TT
5276 CLASS="LITERAL"
5277 >conditional-block</TT
5278 > is the only parameter,
5279     that isn't easily detected in the server's log file. If it blocks the
5280     referrer, the request will look like the visitor used a bookmark or
5281     typed in the address directly.
5282    </P
5283 ><P
5284 >    Leaving the referrer unmodified for requests on the same host
5285     allows the server owner to see the visitor's <SPAN
5286 CLASS="QUOTE"
5287 >"click path"</SPAN
5288 >,
5289     but in most cases she could also get that information by comparing
5290     other parts of the log file: for example the User-Agent if it isn't
5291     a very common one, or the user's IP address if it doesn't change between
5292     different requests.
5293    </P
5294 ><P
5295 >    Always blocking the referrer, or using a custom one, can lead to
5296     failures on servers that check the referrer before they answer any
5297     requests, in an attempt to prevent their content from being
5298     embedded or linked to elsewhere.
5299    </P
5300 ><P
5301 >    Both <TT
5302 CLASS="LITERAL"
5303 >conditional-block</TT
5304 > and <TT
5305 CLASS="LITERAL"
5306 >forge</TT
5307 >
5308     will work with referrer checks, as long as content and valid referring page
5309     are on the same host. Most of the time that's the case.
5310    </P
5311 ><P
5312 >  
5313     <TT
5314 CLASS="LITERAL"
5315 >hide-referer</TT
5316 > is an alternate spelling of
5317     <TT
5318 CLASS="LITERAL"
5319 >hide-referrer</TT
5320 > and the two can be can be freely
5321     substituted with each other. (<SPAN
5322 CLASS="QUOTE"
5323 >"referrer"</SPAN
5324 > is the
5325     correct English spelling, however the HTTP specification has a bug - it
5326     requires it to be spelled as <SPAN
5327 CLASS="QUOTE"
5328 >"referer"</SPAN
5329 >.) 
5330    </P
5331 ></DD
5332 ><DT
5333 >Example usage:</DT
5334 ><DD
5335 ><P
5336 >     <TABLE
5337 BORDER="0"
5338 BGCOLOR="#E0E0E0"
5339 WIDTH="90%"
5340 ><TR
5341 ><TD
5342 ><PRE
5343 CLASS="SCREEN"
5344 >+hide-referrer{forge}</PRE
5345 ></TD
5346 ></TR
5347 ></TABLE
5348 > or
5349      <TABLE
5350 BORDER="0"
5351 BGCOLOR="#E0E0E0"
5352 WIDTH="90%"
5353 ><TR
5354 ><TD
5355 ><PRE
5356 CLASS="SCREEN"
5357 >+hide-referrer{http://www.yahoo.com/}</PRE
5358 ></TD
5359 ></TR
5360 ></TABLE
5361 >
5362    </P
5363 ></DD
5364 ></DL
5365 ></DIV
5366 ></DIV
5367 ><DIV
5368 CLASS="SECT3"
5369 ><H4
5370 CLASS="SECT3"
5371 ><A
5372 NAME="HIDE-USER-AGENT"
5373 >8.5.25. hide-user-agent</A
5374 ></H4
5375 ><P
5376 ></P
5377 ><DIV
5378 CLASS="VARIABLELIST"
5379 ><DL
5380 ><DT
5381 >Typical use:</DT
5382 ><DD
5383 ><P
5384 >Try to conceal your type of browser and client operating system</P
5385 ></DD
5386 ><DT
5387 >Effect:</DT
5388 ><DD
5389 ><P
5390 >    Replaces the value of the <SPAN
5391 CLASS="QUOTE"
5392 >"User-Agent:"</SPAN
5393 > HTTP header
5394     in client requests with the specified value.
5395    </P
5396 ></DD
5397 ><DT
5398 >Type:</DT
5399 ><DD
5400 ><P
5401 >Parameterized.</P
5402 ></DD
5403 ><DT
5404 >Parameter:</DT
5405 ><DD
5406 ><P
5407 >    Any user-defined string.
5408    </P
5409 ></DD
5410 ><DT
5411 >Notes:</DT
5412 ><DD
5413 ><DIV
5414 CLASS="WARNING"
5415 ><P
5416 ></P
5417 ><TABLE
5418 CLASS="WARNING"
5419 BORDER="1"
5420 WIDTH="90%"
5421 ><TR
5422 ><TD
5423 ALIGN="CENTER"
5424 ><B
5425 >Warning</B
5426 ></TD
5427 ></TR
5428 ><TR
5429 ><TD
5430 ALIGN="LEFT"
5431 ><P
5432 >     This can lead to problems on web sites that depend on looking at this header in
5433      order to customize their content for different browsers (which, by the
5434      way, is <SPAN
5435 CLASS="emphasis"
5436 ><I
5437 CLASS="EMPHASIS"
5438 >NOT</I
5439 ></SPAN
5440 > the right thing to do: good web sites
5441      work browser-independently). 
5442     </P
5443 ></TD
5444 ></TR
5445 ></TABLE
5446 ></DIV
5447 ><P
5448 >    Using this action in multi-user setups or wherever different types of
5449     browsers will access the same <SPAN
5450 CLASS="APPLICATION"
5451 >Privoxy</SPAN
5452 > is
5453     <SPAN
5454 CLASS="emphasis"
5455 ><I
5456 CLASS="EMPHASIS"
5457 >not recommended</I
5458 ></SPAN
5459 >. In single-user, single-browser
5460     setups, you might use it to delete your OS version information from
5461     the headers, because it is an invitation to exploit known bugs for your
5462     OS. It is also occasionally useful to forge this in order to access 
5463     sites that won't let you in otherwise (though there may be a good 
5464     reason in some cases). Example of this: some MSN sites will not 
5465     let <SPAN
5466 CLASS="APPLICATION"
5467 >Mozilla</SPAN
5468 > enter, yet forging to a 
5469     <SPAN
5470 CLASS="APPLICATION"
5471 >Netscape 6.1</SPAN
5472 > user-agent works just fine.
5473     (Must be just a silly MS goof, I'm sure :-).
5474    </P
5475 ><P
5476 >     More information on known user-agent strings can be found at 
5477      <A
5478 HREF="http://www.user-agents.org/"
5479 TARGET="_top"
5480 >http://www.user-agents.org/</A
5481 >
5482      and 
5483      <A
5484 HREF="http://en.wikipedia.org/wiki/User_agent"
5485 TARGET="_top"
5486 >http://en.wikipedia.org/wiki/User_agent</A
5487 >.
5488    </P
5489 ></DD
5490 ><DT
5491 >Example usage:</DT
5492 ><DD
5493 ><P
5494 >     <TABLE
5495 BORDER="0"
5496 BGCOLOR="#E0E0E0"
5497 WIDTH="90%"
5498 ><TR
5499 ><TD
5500 ><PRE
5501 CLASS="SCREEN"
5502 >+hide-user-agent{Netscape 6.1 (X11; I; Linux 2.4.18 i686)}</PRE
5503 ></TD
5504 ></TR
5505 ></TABLE
5506 >
5507    </P
5508 ></DD
5509 ></DL
5510 ></DIV
5511 ></DIV
5512 ><DIV
5513 CLASS="SECT3"
5514 ><H4
5515 CLASS="SECT3"
5516 ><A
5517 NAME="INSPECT-JPEGS"
5518 >8.5.26. inspect-jpegs</A
5519 ></H4
5520 ><P
5521 ></P
5522 ><DIV
5523 CLASS="VARIABLELIST"
5524 ><DL
5525 ><DT
5526 >Typical use:</DT
5527 ><DD
5528 ><P
5529 >Try to protect against a MS buffer over-run in JPEG processing</P
5530 ></DD
5531 ><DT
5532 >Effect:</DT
5533 ><DD
5534 ><P
5535 >    Protect against a known exploit
5536    </P
5537 ></DD
5538 ><DT
5539 >Type:</DT
5540 ><DD
5541 ><P
5542 >Boolean.</P
5543 ></DD
5544 ><DT
5545 >Parameter:</DT
5546 ><DD
5547 ><P
5548 >    N/A
5549    </P
5550 ></DD
5551 ><DT
5552 >Notes:</DT
5553 ><DD
5554 ><P
5555 >    See Microsoft Security Bulletin MS04-028. JPEG images are one of the most 
5556     common image types found across the Internet. The exploit as described can 
5557     allow execution of code on the target system, giving an attacker access 
5558     to the system in question by merely planting an altered JPEG image, which 
5559     would have no obvious indications of what lurks inside. This action
5560     tries to prevent this exploit if delivered through unencrypted HTTP.
5561    </P
5562 ><P
5563 >    Note that the exploit mentioned is several years old
5564     and it's unlikely that your client is still vulnerable
5565     against it. This action may be removed in one of the
5566     next releases.
5567    </P
5568 ></DD
5569 ><DT
5570 >Example usage:</DT
5571 ><DD
5572 ><P
5573 ><TABLE
5574 BORDER="0"
5575 BGCOLOR="#E0E0E0"
5576 WIDTH="90%"
5577 ><TR
5578 ><TD
5579 ><PRE
5580 CLASS="SCREEN"
5581 >+inspect-jpegs</PRE
5582 ></TD
5583 ></TR
5584 ></TABLE
5585 ></P
5586 ></DD
5587 ></DL
5588 ></DIV
5589 ></DIV
5590 ><DIV
5591 CLASS="SECT3"
5592 ><H4
5593 CLASS="SECT3"
5594 ><A
5595 NAME="KILL-POPUPS"
5596 >8.5.27. kill-popups<A
5597 NAME="KILL-POPUP"
5598 ></A
5599 ></A
5600 ></H4
5601 ><P
5602 ></P
5603 ><DIV
5604 CLASS="VARIABLELIST"
5605 ><DL
5606 ><DT
5607 >Typical use:</DT
5608 ><DD
5609 ><P
5610 >Eliminate those annoying pop-up windows (deprecated)</P
5611 ></DD
5612 ><DT
5613 >Effect:</DT
5614 ><DD
5615 ><P
5616 >    While loading the document, replace JavaScript code that opens
5617     pop-up windows with (syntactically neutral) dummy code on the fly.
5618    </P
5619 ></DD
5620 ><DT
5621 >Type:</DT
5622 ><DD
5623 ><P
5624 >Boolean.</P
5625 ></DD
5626 ><DT
5627 >Parameter:</DT
5628 ><DD
5629 ><P
5630 >    N/A
5631    </P
5632 ></DD
5633 ><DT
5634 >Notes:</DT
5635 ><DD
5636 ><P
5637 >    This action is basically a built-in, hardwired special-purpose filter
5638     action, but there are important differences: For <TT
5639 CLASS="LITERAL"
5640 >kill-popups</TT
5641 >,
5642     the document need not be buffered, so it can be incrementally rendered while
5643     downloading. But <TT
5644 CLASS="LITERAL"
5645 >kill-popups</TT
5646 > doesn't catch as many pop-ups as
5647     <TT
5648 CLASS="LITERAL"
5649 ><A
5650 HREF="actions-file.html#FILTER-ALL-POPUPS"
5651 >filter{<TT
5652 CLASS="REPLACEABLE"
5653 ><I
5654 >all-popups</I
5655 ></TT
5656 >}</A
5657 ></TT
5658 >
5659     does and is not as smart as <TT
5660 CLASS="LITERAL"
5661 ><A
5662 HREF="actions-file.html#FILTER-UNSOLICITED-POPUPS"
5663 >filter{<TT
5664 CLASS="REPLACEABLE"
5665 ><I
5666 >unsolicited-popups</I
5667 ></TT
5668 >}</A
5669 >
5670     </TT
5671 >is.
5672    </P
5673 ><P
5674 >    Think of it as a fast and efficient replacement for a filter that you
5675     can use if you don't want any filtering at all. Note that it doesn't make
5676     sense to combine it with any <TT
5677 CLASS="LITERAL"
5678 ><A
5679 HREF="actions-file.html#FILTER"
5680 >filter</A
5681 ></TT
5682 > action,
5683     since as soon as one <TT
5684 CLASS="LITERAL"
5685 ><A
5686 HREF="actions-file.html#FILTER"
5687 >filter</A
5688 ></TT
5689 > applies,
5690     the whole document needs to be buffered anyway, which destroys the advantage of
5691     the <TT
5692 CLASS="LITERAL"
5693 >kill-popups</TT
5694 > action over its filter equivalent.
5695    </P
5696 ><P
5697 >    Killing all pop-ups unconditionally is problematic. Many shops and banks rely on
5698     pop-ups to display forms, shopping carts etc, and the <TT
5699 CLASS="LITERAL"
5700 ><A
5701 HREF="actions-file.html#FILTER-UNSOLICITED-POPUPS"
5702 >filter{<TT
5703 CLASS="REPLACEABLE"
5704 ><I
5705 >unsolicited-popups</I
5706 ></TT
5707 >}</A
5708 >
5709     </TT
5710 > does a better job of catching only the unwanted ones.
5711    </P
5712 ><P
5713 >    If the only kind of pop-ups that you want to kill are exit consoles (those
5714     <SPAN
5715 CLASS="emphasis"
5716 ><I
5717 CLASS="EMPHASIS"
5718 >really nasty</I
5719 ></SPAN
5720 > windows that appear when you close an other
5721     one), you might want to use
5722     <TT
5723 CLASS="LITERAL"
5724 ><A
5725 HREF="actions-file.html#FILTER"
5726 >filter</A
5727 >{<TT
5728 CLASS="REPLACEABLE"
5729 ><I
5730 >js-annoyances</I
5731 ></TT
5732 >}</TT
5733 >
5734     instead. 
5735    </P
5736 ><P
5737 >    This action is most appropriate for browsers that don't have any controls 
5738     for unwanted pop-ups. Not recommended for general usage.
5739    </P
5740 ><P
5741 >    This action doesn't work very reliable and may be removed in future releases.
5742    </P
5743 ></DD
5744 ><DT
5745 >Example usage:</DT
5746 ><DD
5747 ><P
5748 ><TABLE
5749 BORDER="0"
5750 BGCOLOR="#E0E0E0"
5751 WIDTH="90%"
5752 ><TR
5753 ><TD
5754 ><PRE
5755 CLASS="SCREEN"
5756 >+kill-popups</PRE
5757 ></TD
5758 ></TR
5759 ></TABLE
5760 ></P
5761 ></DD
5762 ></DL
5763 ></DIV
5764 ></DIV
5765 ><DIV
5766 CLASS="SECT3"
5767 ><H4
5768 CLASS="SECT3"
5769 ><A
5770 NAME="LIMIT-CONNECT"
5771 >8.5.28. limit-connect</A
5772 ></H4
5773 ><P
5774 ></P
5775 ><DIV
5776 CLASS="VARIABLELIST"
5777 ><DL
5778 ><DT
5779 >Typical use:</DT
5780 ><DD
5781 ><P
5782 >Prevent abuse of <SPAN
5783 CLASS="APPLICATION"
5784 >Privoxy</SPAN
5785 > as a TCP proxy relay or disable SSL for untrusted sites</P
5786 ></DD
5787 ><DT
5788 >Effect:</DT
5789 ><DD
5790 ><P
5791 >    Specifies to which ports HTTP CONNECT requests are allowable.
5792    </P
5793 ></DD
5794 ><DT
5795 >Type:</DT
5796 ><DD
5797 ><P
5798 >Parameterized.</P
5799 ></DD
5800 ><DT
5801 >Parameter:</DT
5802 ><DD
5803 ><P
5804 >    A comma-separated list of ports or port ranges (the latter using dashes, with the minimum
5805     defaulting to 0 and the maximum to 65K).
5806    </P
5807 ></DD
5808 ><DT
5809 >Notes:</DT
5810 ><DD
5811 ><P
5812 >    By default, i.e. if no <TT
5813 CLASS="LITERAL"
5814 >limit-connect</TT
5815 > action applies,
5816     <SPAN
5817 CLASS="APPLICATION"
5818 >Privoxy</SPAN
5819 > only allows HTTP CONNECT
5820     requests to port 443 (the standard, secure HTTPS port). Use 
5821     <TT
5822 CLASS="LITERAL"
5823 >limit-connect</TT
5824 > if more fine-grained control is desired
5825     for some or all destinations.
5826    </P
5827 ><P
5828 >    The CONNECT methods exists in HTTP to allow access to secure websites
5829     (<SPAN
5830 CLASS="QUOTE"
5831 >"https://"</SPAN
5832 > URLs) through proxies. It works very simply:
5833     the proxy connects to the server on the specified port, and then
5834     short-circuits its connections to the client and to the remote server.
5835     This means CONNECT-enabled proxies can be used as TCP relays very easily.
5836   </P
5837 ><P
5838 >   <SPAN
5839 CLASS="APPLICATION"
5840 >Privoxy</SPAN
5841 > relays HTTPS traffic without seeing
5842    the decoded content. Websites can leverage this limitation to circumvent <SPAN
5843 CLASS="APPLICATION"
5844 >Privoxy</SPAN
5845 >'s
5846    filters. By specifying an invalid port range you can disable HTTPS entirely.
5847    If you plan to disable SSL by default, consider enabling 
5848    <TT
5849 CLASS="LITERAL"
5850 ><A
5851 HREF="actions-file.html#TREAT-FORBIDDEN-CONNECTS-LIKE-BLOCKS"
5852 >treat-forbidden-connects-like-blocks</A
5853 ></TT
5854 >
5855    as well, to be able to quickly create exceptions.
5856   </P
5857 ></DD
5858 ><DT
5859 >Example usages:</DT
5860 ><DD
5861 ><P
5862 >     <TABLE
5863 BORDER="0"
5864 BGCOLOR="#E0E0E0"
5865 WIDTH="90%"
5866 ><TR
5867 ><TD
5868 ><PRE
5869 CLASS="SCREEN"
5870 >+limit-connect{443}                   # This is the default and need not be specified.
5871 +limit-connect{80,443}                # Ports 80 and 443 are OK.
5872 +limit-connect{-3, 7, 20-100, 500-}   # Ports less than 3, 7, 20 to 100 and above 500 are OK.
5873 +limit-connect{-}                     # All ports are OK
5874 +limit-connect{,}                     # No HTTPS/SSL traffic is allowed</PRE
5875 ></TD
5876 ></TR
5877 ></TABLE
5878 >
5879    </P
5880 ></DD
5881 ></DL
5882 ></DIV
5883 ></DIV
5884 ><DIV
5885 CLASS="SECT3"
5886 ><H4
5887 CLASS="SECT3"
5888 ><A
5889 NAME="PREVENT-COMPRESSION"
5890 >8.5.29. prevent-compression</A
5891 ></H4
5892 ><P
5893 ></P
5894 ><DIV
5895 CLASS="VARIABLELIST"
5896 ><DL
5897 ><DT
5898 >Typical use:</DT
5899 ><DD
5900 ><P
5901 >    Ensure that servers send the content uncompressed, so it can be
5902     passed through <TT
5903 CLASS="LITERAL"
5904 ><A
5905 HREF="actions-file.html#FILTER"
5906 >filter</A
5907 ></TT
5908 >s.
5909    </P
5910 ></DD
5911 ><DT
5912 >Effect:</DT
5913 ><DD
5914 ><P
5915 >    Removes the Accept-Encoding header which can be used to ask for compressed transfer.
5916    </P
5917 ></DD
5918 ><DT
5919 >Type:</DT
5920 ><DD
5921 ><P
5922 >Boolean.</P
5923 ></DD
5924 ><DT
5925 >Parameter:</DT
5926 ><DD
5927 ><P
5928 >    N/A
5929    </P
5930 ></DD
5931 ><DT
5932 >Notes:</DT
5933 ><DD
5934 ><P
5935 >    More and more websites send their content compressed by default, which
5936     is generally a good idea and saves bandwidth. But the <TT
5937 CLASS="LITERAL"
5938 ><A
5939 HREF="actions-file.html#FILTER"
5940 >filter</A
5941 ></TT
5942 >, <TT
5943 CLASS="LITERAL"
5944 ><A
5945 HREF="actions-file.html#DEANIMATE-GIFS"
5946 >deanimate-gifs</A
5947 ></TT
5948 >
5949     and <TT
5950 CLASS="LITERAL"
5951 ><A
5952 HREF="actions-file.html#KILL-POPUPS"
5953 >kill-popups</A
5954 ></TT
5955 > actions need
5956     access to the uncompressed data.
5957    </P
5958 ><P
5959 >    When compiled with zlib support (available since <SPAN
5960 CLASS="APPLICATION"
5961 >Privoxy</SPAN
5962 > 3.0.7), content that should be
5963     filtered is decompressed on-the-fly and you don't have to worry about this action.
5964     If you are using an older <SPAN
5965 CLASS="APPLICATION"
5966 >Privoxy</SPAN
5967 > version, or one that hasn't been compiled with zlib
5968     support, this action can be used to convince the server to send the content uncompressed.
5969    </P
5970 ><P
5971 >    Most text-based instances compress very well, the size is seldom decreased by less than 50%,
5972     for markup-heavy instances like news feeds saving more than 90% of the original size isn't
5973     unusual. 
5974    </P
5975 ><P
5976 >    Not using compression will therefore slow down the transfer, and you should only
5977     enable this action if you really need it. As of <SPAN
5978 CLASS="APPLICATION"
5979 >Privoxy</SPAN
5980 > 3.0.7 it's disabled in all
5981     predefined action settings.
5982    </P
5983 ><P
5984 >    Note that some (rare) ill-configured sites don't handle requests for uncompressed
5985     documents correctly. Broken PHP applications tend to send an empty document body,
5986     some IIS versions only send the beginning of the content. If you enable
5987     <TT
5988 CLASS="LITERAL"
5989 >prevent-compression</TT
5990 > per default, you might want to add
5991     exceptions for those sites. See the example for how to do that.
5992    </P
5993 ></DD
5994 ><DT
5995 >Example usage (sections):</DT
5996 ><DD
5997 ><P
5998 >    <TABLE
5999 BORDER="0"
6000 BGCOLOR="#E0E0E0"
6001 WIDTH="90%"
6002 ><TR
6003 ><TD
6004 ><PRE
6005 CLASS="SCREEN"
6006 ># Selectively turn off compression, and enable a filter
6007 #
6008 { +filter{tiny-textforms} +prevent-compression }
6009 # Match only these sites
6010  .google.
6011  sourceforge.net
6012  sf.net
6013
6014 # Or instead, we could set a universal default:
6015 #
6016 { +prevent-compression }
6017  / # Match all sites
6018
6019 # Then maybe make exceptions for broken sites:
6020 #
6021 { -prevent-compression }
6022 .compusa.com/</PRE
6023 ></TD
6024 ></TR
6025 ></TABLE
6026 >
6027    </P
6028 ></DD
6029 ></DL
6030 ></DIV
6031 ></DIV
6032 ><DIV
6033 CLASS="SECT3"
6034 ><H4
6035 CLASS="SECT3"
6036 ><A
6037 NAME="OVERWRITE-LAST-MODIFIED"
6038 >8.5.30. overwrite-last-modified</A
6039 ></H4
6040 ><P
6041 ></P
6042 ><DIV
6043 CLASS="VARIABLELIST"
6044 ><DL
6045 ><DT
6046 >Typical use:</DT
6047 ><DD
6048 ><P
6049 >Prevent yet another way to track the user's steps between sessions.</P
6050 ></DD
6051 ><DT
6052 >Effect:</DT
6053 ><DD
6054 ><P
6055 >    Deletes the <SPAN
6056 CLASS="QUOTE"
6057 >"Last-Modified:"</SPAN
6058 > HTTP server header or modifies its value. 
6059    </P
6060 ></DD
6061 ><DT
6062 >Type:</DT
6063 ><DD
6064 ><P
6065 >Parameterized.</P
6066 ></DD
6067 ><DT
6068 >Parameter:</DT
6069 ><DD
6070 ><P
6071 >    One of the keywords: <SPAN
6072 CLASS="QUOTE"
6073 >"block"</SPAN
6074 >, <SPAN
6075 CLASS="QUOTE"
6076 >"reset-to-request-time"</SPAN
6077 >
6078     and <SPAN
6079 CLASS="QUOTE"
6080 >"randomize"</SPAN
6081 >
6082    </P
6083 ></DD
6084 ><DT
6085 >Notes:</DT
6086 ><DD
6087 ><P
6088 >    Removing the <SPAN
6089 CLASS="QUOTE"
6090 >"Last-Modified:"</SPAN
6091 > header is useful for filter
6092     testing, where you want to force a real reload instead of getting status
6093     code <SPAN
6094 CLASS="QUOTE"
6095 >"304"</SPAN
6096 >, which would cause the browser to reuse the old
6097     version of the page.
6098    </P
6099 ><P
6100 >    The <SPAN
6101 CLASS="QUOTE"
6102 >"randomize"</SPAN
6103 > option overwrites the value of the
6104     <SPAN
6105 CLASS="QUOTE"
6106 >"Last-Modified:"</SPAN
6107 > header with a randomly chosen time
6108     between the original value and the current time. In theory the server
6109     could send each document with a different <SPAN
6110 CLASS="QUOTE"
6111 >"Last-Modified:"</SPAN
6112 >
6113     header to track visits without using cookies. <SPAN
6114 CLASS="QUOTE"
6115 >"Randomize"</SPAN
6116 >
6117     makes it impossible and the browser can still revalidate cached documents. 
6118    </P
6119 ><P
6120 >    <SPAN
6121 CLASS="QUOTE"
6122 >"reset-to-request-time"</SPAN
6123 > overwrites the value of the
6124     <SPAN
6125 CLASS="QUOTE"
6126 >"Last-Modified:"</SPAN
6127 > header with the current time. You could use
6128     this option together with
6129     <TT
6130 CLASS="LITERAL"
6131 ><A
6132 HREF="actions-file.html#HIDE-IF-MODIFIED-SINCE"
6133 >hided-if-modified-since</A
6134 ></TT
6135 >
6136     to further customize your random range.
6137    </P
6138 ><P
6139 >    The preferred parameter here is <SPAN
6140 CLASS="QUOTE"
6141 >"randomize"</SPAN
6142 >. It is safe
6143     to use, as long as the time settings are more or less correct.
6144     If the server sets the <SPAN
6145 CLASS="QUOTE"
6146 >"Last-Modified:"</SPAN
6147 > header to the time
6148     of the request, the random range becomes zero and the value stays the same.
6149     Therefore you should later randomize it a second time with
6150     <TT
6151 CLASS="LITERAL"
6152 ><A
6153 HREF="actions-file.html#HIDE-IF-MODIFIED-SINCE"
6154 >hided-if-modified-since</A
6155 ></TT
6156 >,
6157     just to be sure. 
6158    </P
6159 ><P
6160 >    It is also recommended to use this action together with
6161     <TT
6162 CLASS="LITERAL"
6163 ><A
6164 HREF="actions-file.html#CRUNCH-IF-NONE-MATCH"
6165 >crunch-if-none-match</A
6166 ></TT
6167 >.
6168    </P
6169 ></DD
6170 ><DT
6171 >Example usage:</DT
6172 ><DD
6173 ><P
6174 >     <TABLE
6175 BORDER="0"
6176 BGCOLOR="#E0E0E0"
6177 WIDTH="90%"
6178 ><TR
6179 ><TD
6180 ><PRE
6181 CLASS="SCREEN"
6182 ># Let the browser revalidate without being tracked across sessions
6183 { +hide-if-modified-since{-60} \
6184  +overwrite-last-modified{randomize} \
6185  +crunch-if-none-match}
6186 /</PRE
6187 ></TD
6188 ></TR
6189 ></TABLE
6190 >
6191    </P
6192 ></DD
6193 ></DL
6194 ></DIV
6195 ></DIV
6196 ><DIV
6197 CLASS="SECT3"
6198 ><H4
6199 CLASS="SECT3"
6200 ><A
6201 NAME="REDIRECT"
6202 >8.5.31. redirect</A
6203 ></H4
6204 ><P
6205 ></P
6206 ><DIV
6207 CLASS="VARIABLELIST"
6208 ><DL
6209 ><DT
6210 >Typical use:</DT
6211 ><DD
6212 ><P
6213 >    Redirect requests to other sites.
6214    </P
6215 ></DD
6216 ><DT
6217 >Effect:</DT
6218 ><DD
6219 ><P
6220 >    Convinces the browser that the requested document has been moved
6221     to another location and the browser should get it from there.
6222    </P
6223 ></DD
6224 ><DT
6225 >Type:</DT
6226 ><DD
6227 ><P
6228 >Parameterized</P
6229 ></DD
6230 ><DT
6231 >Parameter:</DT
6232 ><DD
6233 ><P
6234 >    An absolute URL or a single pcrs command.
6235    </P
6236 ></DD
6237 ><DT
6238 >Notes:</DT
6239 ><DD
6240 ><P
6241 >    Requests to which this action applies are answered with a
6242     HTTP redirect to URLs of your choosing. The new URL is
6243     either provided as parameter, or derived by applying a
6244     single pcrs command to the original URL.
6245    </P
6246 ><P
6247 >    This action will be ignored if you use it together with
6248     <TT
6249 CLASS="LITERAL"
6250 ><A
6251 HREF="actions-file.html#BLOCK"
6252 >block</A
6253 ></TT
6254 >.
6255     It can be combined with
6256     <TT
6257 CLASS="LITERAL"
6258 ><A
6259 HREF="actions-file.html#FAST-REDIRECTS"
6260 >fast-redirects{check-decoded-url}</A
6261 ></TT
6262 >
6263     to redirect to a decoded version of a rewritten URL.
6264    </P
6265 ><P
6266 >    Use this action carefully, make sure not to create redirection loops
6267     and be aware that using your own redirects might make it
6268     possible to fingerprint your requests.
6269    </P
6270 ></DD
6271 ><DT
6272 >Example usages:</DT
6273 ><DD
6274 ><P
6275 >    <TABLE
6276 BORDER="0"
6277 BGCOLOR="#E0E0E0"
6278 WIDTH="90%"
6279 ><TR
6280 ><TD
6281 ><PRE
6282 CLASS="SCREEN"
6283 ># Replace example.com's style sheet with another one
6284 { +redirect{http://localhost/css-replacements/example.com.css} }
6285  example.com/stylesheet\.css
6286
6287 # Create a short, easy to remember nickname for a favorite site
6288 # (relies on the browser accept and forward invalid URLs to <SPAN
6289 CLASS="APPLICATION"
6290 >Privoxy</SPAN
6291 >)
6292 { +redirect{http://www.privoxy.org/user-manual/actions-file.html} }
6293  a
6294
6295 # Always use the expanded view for Undeadly.org articles
6296 # (Note the $ at the end of the URL pattern to make sure
6297 # the request for the rewritten URL isn't redirected as well)
6298 {+redirect{s@$@&#38;mode=expanded@}}
6299 undeadly.org/cgi\?action=article&#38;sid=\d*$</PRE
6300 ></TD
6301 ></TR
6302 ></TABLE
6303 >
6304    </P
6305 ></DD
6306 ></DL
6307 ></DIV
6308 ></DIV
6309 ><DIV
6310 CLASS="SECT3"
6311 ><H4
6312 CLASS="SECT3"
6313 ><A
6314 NAME="SEND-VANILLA-WAFER"
6315 >8.5.32. send-vanilla-wafer</A
6316 ></H4
6317 ><P
6318 ></P
6319 ><DIV
6320 CLASS="VARIABLELIST"
6321 ><DL
6322 ><DT
6323 >Typical use:</DT
6324 ><DD
6325 ><P
6326 >    Feed log analysis scripts with useless data.
6327    </P
6328 ></DD
6329 ><DT
6330 >Effect:</DT
6331 ><DD
6332 ><P
6333 >    Sends a cookie with each request stating that you do not accept any copyright
6334     on cookies sent to you, and asking the site operator not to track you.
6335    </P
6336 ></DD
6337 ><DT
6338 >Type:</DT
6339 ><DD
6340 ><P
6341 >Boolean.</P
6342 ></DD
6343 ><DT
6344 >Parameter:</DT
6345 ><DD
6346 ><P
6347 >    N/A
6348    </P
6349 ></DD
6350 ><DT
6351 >Notes:</DT
6352 ><DD
6353 ><P
6354 >    The vanilla wafer is a (relatively) unique header and could conceivably be used to track you.
6355    </P
6356 ><P
6357 >    This action is rarely used and not enabled in the default configuration.
6358    </P
6359 ></DD
6360 ><DT
6361 >Example usage:</DT
6362 ><DD
6363 ><P
6364 >     <TABLE
6365 BORDER="0"
6366 BGCOLOR="#E0E0E0"
6367 WIDTH="90%"
6368 ><TR
6369 ><TD
6370 ><PRE
6371 CLASS="SCREEN"
6372 >+send-vanilla-wafer</PRE
6373 ></TD
6374 ></TR
6375 ></TABLE
6376 >
6377    </P
6378 ></DD
6379 ></DL
6380 ></DIV
6381 ></DIV
6382 ><DIV
6383 CLASS="SECT3"
6384 ><H4
6385 CLASS="SECT3"
6386 ><A
6387 NAME="SEND-WAFER"
6388 >8.5.33. send-wafer</A
6389 ></H4
6390 ><P
6391 ></P
6392 ><DIV
6393 CLASS="VARIABLELIST"
6394 ><DL
6395 ><DT
6396 >Typical use:</DT
6397 ><DD
6398 ><P
6399 >    Send custom cookies or feed log analysis scripts with even more useless data.
6400    </P
6401 ></DD
6402 ><DT
6403 >Effect:</DT
6404 ><DD
6405 ><P
6406 >    Sends a custom, user-defined cookie with each request.
6407    </P
6408 ></DD
6409 ><DT
6410 >Type:</DT
6411 ><DD
6412 ><P
6413 >Multi-value.</P
6414 ></DD
6415 ><DT
6416 >Parameter:</DT
6417 ><DD
6418 ><P
6419 >    A string of the form <SPAN
6420 CLASS="QUOTE"
6421 >"<TT
6422 CLASS="REPLACEABLE"
6423 ><I
6424 >name</I
6425 ></TT
6426 >=<TT
6427 CLASS="REPLACEABLE"
6428 ><I
6429 >value</I
6430 ></TT
6431 >"</SPAN
6432 >.
6433    </P
6434 ></DD
6435 ><DT
6436 >Notes:</DT
6437 ><DD
6438 ><P
6439 >    Being multi-valued, multiple instances of this action can apply to the same request,
6440     resulting in multiple cookies being sent.
6441    </P
6442 ><P
6443 >    This action is rarely used and not enabled in the default configuration.
6444    </P
6445 ></DD
6446 ><DT
6447 >Example usage (section):</DT
6448 ><DD
6449 ><P
6450 >    <TABLE
6451 BORDER="0"
6452 BGCOLOR="#E0E0E0"
6453 WIDTH="90%"
6454 ><TR
6455 ><TD
6456 ><PRE
6457 CLASS="SCREEN"
6458 >{+send-wafer{UsingPrivoxy=true}}
6459 my-internal-testing-server.void</PRE
6460 ></TD
6461 ></TR
6462 ></TABLE
6463 >
6464    </P
6465 ></DD
6466 ></DL
6467 ></DIV
6468 ></DIV
6469 ><DIV
6470 CLASS="SECT3"
6471 ><H4
6472 CLASS="SECT3"
6473 ><A
6474 NAME="SERVER-HEADER-FILTER"
6475 >8.5.34. server-header-filter</A
6476 ></H4
6477 ><P
6478 ></P
6479 ><DIV
6480 CLASS="VARIABLELIST"
6481 ><DL
6482 ><DT
6483 >Typical use:</DT
6484 ><DD
6485 ><P
6486 >   Rewrite or remove single server headers.
6487    </P
6488 ></DD
6489 ><DT
6490 >Effect:</DT
6491 ><DD
6492 ><P
6493 >    All server headers to which this action applies are filtered on-the-fly
6494     through the specified regular expression based substitutions.
6495    </P
6496 ></DD
6497 ><DT
6498 >Type:</DT
6499 ><DD
6500 ><P
6501 >Parameterized.</P
6502 ></DD
6503 ><DT
6504 >Parameter:</DT
6505 ><DD
6506 ><P
6507 >    The name of a server-header filter, as defined in one of the
6508     <A
6509 HREF="filter-file.html"
6510 >filter files</A
6511 >.
6512    </P
6513 ></DD
6514 ><DT
6515 >Notes:</DT
6516 ><DD
6517 ><P
6518 >    Server-header filters are applied to each header on its own, not to
6519     all at once. This makes it easier to diagnose problems, but on the downside
6520     you can't write filters that only change header x if header y's value is z.
6521     You can do that by using tags though.
6522    </P
6523 ><P
6524 >    Server-header filters are executed after the other header actions have finished
6525     and use their output as input.
6526    </P
6527 ><P
6528 >    Please refer to the <A
6529 HREF="filter-file.html"
6530 >filter file chapter</A
6531 >
6532     to learn which server-header filters are available by default, and how to
6533     create your own.
6534    </P
6535 ></DD
6536 ><DT
6537 >Example usage (section):</DT
6538 ><DD
6539 ><P
6540 >     <TABLE
6541 BORDER="0"
6542 BGCOLOR="#E0E0E0"
6543 WIDTH="90%"
6544 ><TR
6545 ><TD
6546 ><PRE
6547 CLASS="SCREEN"
6548 >{+server-header-filter{html-to-xml}}
6549 example.org/xml-instance-that-is-delivered-as-html
6550
6551 {+server-header-filter{xml-to-html}}
6552 example.org/instance-that-is-delivered-as-xml-but-is-not
6553     </PRE
6554 ></TD
6555 ></TR
6556 ></TABLE
6557 >
6558     </P
6559 ></DD
6560 ></DL
6561 ></DIV
6562 ></DIV
6563 ><DIV
6564 CLASS="SECT3"
6565 ><H4
6566 CLASS="SECT3"
6567 ><A
6568 NAME="SERVER-HEADER-TAGGER"
6569 >8.5.35. server-header-tagger</A
6570 ></H4
6571 ><P
6572 ></P
6573 ><DIV
6574 CLASS="VARIABLELIST"
6575 ><DL
6576 ><DT
6577 >Typical use:</DT
6578 ><DD
6579 ><P
6580 >   Enable or disable filters based on the Content-Type header.
6581    </P
6582 ></DD
6583 ><DT
6584 >Effect:</DT
6585 ><DD
6586 ><P
6587 >    Server headers to which this action applies are filtered on-the-fly through
6588     the specified regular expression based substitutions, the result is used as
6589     tag.
6590    </P
6591 ></DD
6592 ><DT
6593 >Type:</DT
6594 ><DD
6595 ><P
6596 >Parameterized.</P
6597 ></DD
6598 ><DT
6599 >Parameter:</DT
6600 ><DD
6601 ><P
6602 >    The name of a server-header tagger, as defined in one of the
6603     <A
6604 HREF="filter-file.html"
6605 >filter files</A
6606 >.
6607    </P
6608 ></DD
6609 ><DT
6610 >Notes:</DT
6611 ><DD
6612 ><P
6613 >    Server-header taggers are applied to each header on its own,
6614     and as the header isn't modified, each tagger <SPAN
6615 CLASS="QUOTE"
6616 >"sees"</SPAN
6617 >
6618     the original.
6619    </P
6620 ><P
6621 >    Server-header taggers are executed before all other header actions
6622     that modify server headers. Their tags can be used to control
6623     all of the other server-header actions, the content filters
6624     and the crunch actions (<A
6625 HREF="actions-file.html#REDIRECT"
6626 >redirect</A
6627 >
6628     and <A
6629 HREF="actions-file.html#BLOCK"
6630 >block</A
6631 >).
6632    </P
6633 ><P
6634 >    Obviously crunching based on tags created by server-header taggers
6635     doesn't prevent the request from showing up in the server's log file.
6636    </P
6637 ></DD
6638 ><DT
6639 >Example usage (section):</DT
6640 ><DD
6641 ><P
6642 >     <TABLE
6643 BORDER="0"
6644 BGCOLOR="#E0E0E0"
6645 WIDTH="90%"
6646 ><TR
6647 ><TD
6648 ><PRE
6649 CLASS="SCREEN"
6650 ># Tag every request with the content type declared by the server
6651 {+server-header-tagger{content-type}}
6652 /
6653     </PRE
6654 ></TD
6655 ></TR
6656 ></TABLE
6657 >
6658     </P
6659 ></DD
6660 ></DL
6661 ></DIV
6662 ></DIV
6663 ><DIV
6664 CLASS="SECT3"
6665 ><H4
6666 CLASS="SECT3"
6667 ><A
6668 NAME="SESSION-COOKIES-ONLY"
6669 >8.5.36. session-cookies-only</A
6670 ></H4
6671 ><P
6672 ></P
6673 ><DIV
6674 CLASS="VARIABLELIST"
6675 ><DL
6676 ><DT
6677 >Typical use:</DT
6678 ><DD
6679 ><P
6680 >    Allow only temporary <SPAN
6681 CLASS="QUOTE"
6682 >"session"</SPAN
6683 > cookies (for the current
6684     browser session <SPAN
6685 CLASS="emphasis"
6686 ><I
6687 CLASS="EMPHASIS"
6688 >only</I
6689 ></SPAN
6690 >). 
6691    </P
6692 ></DD
6693 ><DT
6694 >Effect:</DT
6695 ><DD
6696 ><P
6697 >    Deletes the <SPAN
6698 CLASS="QUOTE"
6699 >"expires"</SPAN
6700 > field from <SPAN
6701 CLASS="QUOTE"
6702 >"Set-Cookie:"</SPAN
6703 >
6704     server headers. Most browsers will not store such cookies permanently and
6705     forget them in between sessions.
6706    </P
6707 ></DD
6708 ><DT
6709 >Type:</DT
6710 ><DD
6711 ><P
6712 >Boolean.</P
6713 ></DD
6714 ><DT
6715 >Parameter:</DT
6716 ><DD
6717 ><P
6718 >    N/A
6719    </P
6720 ></DD
6721 ><DT
6722 >Notes:</DT
6723 ><DD
6724 ><P
6725 >    This is less strict than <TT
6726 CLASS="LITERAL"
6727 ><A
6728 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
6729 >crunch-incoming-cookies</A
6730 ></TT
6731 > / 
6732     <TT
6733 CLASS="LITERAL"
6734 ><A
6735 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
6736 >crunch-outgoing-cookies</A
6737 ></TT
6738 > and allows you to browse
6739     websites that insist or rely on setting cookies, without compromising your privacy too badly.
6740    </P
6741 ><P
6742 >    Most browsers will not permanently store cookies that have been processed by
6743     <TT
6744 CLASS="LITERAL"
6745 >session-cookies-only</TT
6746 > and will forget about them between sessions.
6747     This makes profiling cookies useless, but won't break sites which require cookies so
6748     that you can log in for transactions. This is generally turned on for all 
6749     sites, and is the recommended setting.
6750    </P
6751 ><P
6752 >    It makes <SPAN
6753 CLASS="emphasis"
6754 ><I
6755 CLASS="EMPHASIS"
6756 >no sense at all</I
6757 ></SPAN
6758 > to use <TT
6759 CLASS="LITERAL"
6760 >session-cookies-only</TT
6761 >
6762     together with <TT
6763 CLASS="LITERAL"
6764 ><A
6765 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
6766 >crunch-incoming-cookies</A
6767 ></TT
6768 > or
6769     <TT
6770 CLASS="LITERAL"
6771 ><A
6772 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
6773 >crunch-outgoing-cookies</A
6774 ></TT
6775 >. If you do, cookies
6776     will be plainly killed.
6777    </P
6778 ><P
6779 >    Note that it is up to the browser how it handles such cookies without an <SPAN
6780 CLASS="QUOTE"
6781 >"expires"</SPAN
6782 >
6783     field. If you use an exotic browser, you might want to try it out to be sure.
6784    </P
6785 ><P
6786 >    This setting also has no effect on cookies that may have been stored
6787     previously by the browser before starting <SPAN
6788 CLASS="APPLICATION"
6789 >Privoxy</SPAN
6790 >.
6791     These would have to be removed manually.
6792    </P
6793 ><P
6794 >     <SPAN
6795 CLASS="APPLICATION"
6796 >Privoxy</SPAN
6797 > also uses  
6798      the <A
6799 HREF="actions-file.html#FILTER-CONTENT-COOKIES"
6800 >content-cookies filter</A
6801
6802      to block some types of cookies. Content cookies are not effected by 
6803      <TT
6804 CLASS="LITERAL"
6805 >session-cookies-only</TT
6806 >.
6807    </P
6808 ></DD
6809 ><DT
6810 >Example usage:</DT
6811 ><DD
6812 ><P
6813 >     <TABLE
6814 BORDER="0"
6815 BGCOLOR="#E0E0E0"
6816 WIDTH="90%"
6817 ><TR
6818 ><TD
6819 ><PRE
6820 CLASS="SCREEN"
6821 >+session-cookies-only</PRE
6822 ></TD
6823 ></TR
6824 ></TABLE
6825 >
6826    </P
6827 ></DD
6828 ></DL
6829 ></DIV
6830 ></DIV
6831 ><DIV
6832 CLASS="SECT3"
6833 ><H4
6834 CLASS="SECT3"
6835 ><A
6836 NAME="SET-IMAGE-BLOCKER"
6837 >8.5.37. set-image-blocker</A
6838 ></H4
6839 ><P
6840 ></P
6841 ><DIV
6842 CLASS="VARIABLELIST"
6843 ><DL
6844 ><DT
6845 >Typical use:</DT
6846 ><DD
6847 ><P
6848 >Choose the replacement for blocked images</P
6849 ></DD
6850 ><DT
6851 >Effect:</DT
6852 ><DD
6853 ><P
6854 >     This action alone doesn't do anything noticeable. If <SPAN
6855 CLASS="emphasis"
6856 ><I
6857 CLASS="EMPHASIS"
6858 >both</I
6859 ></SPAN
6860 >
6861      <TT
6862 CLASS="LITERAL"
6863 ><A
6864 HREF="actions-file.html#BLOCK"
6865 >block</A
6866 ></TT
6867 > <SPAN
6868 CLASS="emphasis"
6869 ><I
6870 CLASS="EMPHASIS"
6871 >and</I
6872 ></SPAN
6873 > <TT
6874 CLASS="LITERAL"
6875 ><A
6876 HREF="actions-file.html#HANDLE-AS-IMAGE"
6877 >handle-as-image</A
6878 ></TT
6879 > <SPAN
6880 CLASS="emphasis"
6881 ><I
6882 CLASS="EMPHASIS"
6883 >also</I
6884 ></SPAN
6885 >
6886      apply, i.e. if the request is to be blocked as an image,
6887      <SPAN
6888 CLASS="emphasis"
6889 ><I
6890 CLASS="EMPHASIS"
6891 >then</I
6892 ></SPAN
6893 > the parameter of this action decides what will be
6894      sent as a replacement.
6895    </P
6896 ></DD
6897 ><DT
6898 >Type:</DT
6899 ><DD
6900 ><P
6901 >Parameterized.</P
6902 ></DD
6903 ><DT
6904 >Parameter:</DT
6905 ><DD
6906 ><P
6907 ></P
6908 ><UL
6909 ><LI
6910 ><P
6911 >      <SPAN
6912 CLASS="QUOTE"
6913 >"pattern"</SPAN
6914 > to send a built-in checkerboard pattern image. The image is visually
6915       decent, scales very well, and makes it obvious where banners were busted.
6916      </P
6917 ></LI
6918 ><LI
6919 ><P
6920 >      <SPAN
6921 CLASS="QUOTE"
6922 >"blank"</SPAN
6923 > to send a built-in transparent image. This makes banners disappear
6924       completely, but makes it hard to detect where <SPAN
6925 CLASS="APPLICATION"
6926 >Privoxy</SPAN
6927 > has blocked
6928       images on a given page and complicates troubleshooting if <SPAN
6929 CLASS="APPLICATION"
6930 >Privoxy</SPAN
6931 >
6932       has blocked innocent images, like navigation icons.
6933      </P
6934 ></LI
6935 ><LI
6936 ><P
6937 >      <SPAN
6938 CLASS="QUOTE"
6939 >"<TT
6940 CLASS="REPLACEABLE"
6941 ><I
6942 >target-url</I
6943 ></TT
6944 >"</SPAN
6945 > to
6946       send a redirect to <TT
6947 CLASS="REPLACEABLE"
6948 ><I
6949 >target-url</I
6950 ></TT
6951 >. You can redirect
6952       to any image anywhere, even in your local filesystem via <SPAN
6953 CLASS="QUOTE"
6954 >"file:///"</SPAN
6955 > URL. 
6956       (But note that not all browsers support redirecting to a local file system).
6957      </P
6958 ><P
6959 >      A good application of redirects is to use special <SPAN
6960 CLASS="APPLICATION"
6961 >Privoxy</SPAN
6962 >-built-in
6963       URLs, which send the built-in images, as <TT
6964 CLASS="REPLACEABLE"
6965 ><I
6966 >target-url</I
6967 ></TT
6968 >.
6969       This has the same visual effect as specifying <SPAN
6970 CLASS="QUOTE"
6971 >"blank"</SPAN
6972 > or <SPAN
6973 CLASS="QUOTE"
6974 >"pattern"</SPAN
6975 > in
6976       the first place, but enables your browser to cache the replacement image, instead of requesting
6977       it over and over again.
6978      </P
6979 ></LI
6980 ></UL
6981 ></DD
6982 ><DT
6983 >Notes:</DT
6984 ><DD
6985 ><P
6986 >    The URLs for the built-in images are <SPAN
6987 CLASS="QUOTE"
6988 >"http://config.privoxy.org/send-banner?type=<TT
6989 CLASS="REPLACEABLE"
6990 ><I
6991 >type</I
6992 ></TT
6993 >"</SPAN
6994 >, where <TT
6995 CLASS="REPLACEABLE"
6996 ><I
6997 >type</I
6998 ></TT
6999 > is
7000     either <SPAN
7001 CLASS="QUOTE"
7002 >"blank"</SPAN
7003 > or <SPAN
7004 CLASS="QUOTE"
7005 >"pattern"</SPAN
7006 >.
7007    </P
7008 ><P
7009 >    There is a third (advanced) type, called <SPAN
7010 CLASS="QUOTE"
7011 >"auto"</SPAN
7012 >. It is <SPAN
7013 CLASS="emphasis"
7014 ><I
7015 CLASS="EMPHASIS"
7016 >NOT</I
7017 ></SPAN
7018 > to be
7019     used in <TT
7020 CLASS="LITERAL"
7021 >set-image-blocker</TT
7022 >, but meant for use from <A
7023 HREF="filter-file.html"
7024 >filters</A
7025 >.
7026     Auto will select the type of image that would have applied to the referring page, had it been an image.
7027    </P
7028 ></DD
7029 ><DT
7030 >Example usage:</DT
7031 ><DD
7032 ><P
7033 >    Built-in pattern:
7034    </P
7035 ><P
7036 >    <TABLE
7037 BORDER="0"
7038 BGCOLOR="#E0E0E0"
7039 WIDTH="90%"
7040 ><TR
7041 ><TD
7042 ><PRE
7043 CLASS="SCREEN"
7044 >+set-image-blocker{pattern}</PRE
7045 ></TD
7046 ></TR
7047 ></TABLE
7048 >
7049    </P
7050 ><P
7051 >    Redirect to the BSD daemon:
7052    </P
7053 ><P
7054 >    <TABLE
7055 BORDER="0"
7056 BGCOLOR="#E0E0E0"
7057 WIDTH="90%"
7058 ><TR
7059 ><TD
7060 ><PRE
7061 CLASS="SCREEN"
7062 >+set-image-blocker{http://www.freebsd.org/gifs/dae_up3.gif}</PRE
7063 ></TD
7064 ></TR
7065 ></TABLE
7066 >
7067    </P
7068 ><P
7069 >    Redirect to the built-in pattern for better caching:
7070    </P
7071 ><P
7072 >    <TABLE
7073 BORDER="0"
7074 BGCOLOR="#E0E0E0"
7075 WIDTH="90%"
7076 ><TR
7077 ><TD
7078 ><PRE
7079 CLASS="SCREEN"
7080 >+set-image-blocker{http://config.privoxy.org/send-banner?type=pattern}</PRE
7081 ></TD
7082 ></TR
7083 ></TABLE
7084 >
7085    </P
7086 ></DD
7087 ></DL
7088 ></DIV
7089 ></DIV
7090 ><DIV
7091 CLASS="SECT3"
7092 ><H4
7093 CLASS="SECT3"
7094 ><A
7095 NAME="TREAT-FORBIDDEN-CONNECTS-LIKE-BLOCKS"
7096 >8.5.38. treat-forbidden-connects-like-blocks</A
7097 ></H4
7098 ><P
7099 ></P
7100 ><DIV
7101 CLASS="VARIABLELIST"
7102 ><DL
7103 ><DT
7104 >Typical use:</DT
7105 ><DD
7106 ><P
7107 >Block forbidden connects with an easy to find error message.</P
7108 ></DD
7109 ><DT
7110 >Effect:</DT
7111 ><DD
7112 ><P
7113 >    If this action is enabled, <SPAN
7114 CLASS="APPLICATION"
7115 >Privoxy</SPAN
7116 > no longer
7117     makes a difference between forbidden connects and ordinary blocks. 
7118    </P
7119 ></DD
7120 ><DT
7121 >Type:</DT
7122 ><DD
7123 ><P
7124 >Boolean</P
7125 ></DD
7126 ><DT
7127 >Parameter:</DT
7128 ><DD
7129 ><P
7130 >N/A</P
7131 ></DD
7132 ><DT
7133 >Notes:</DT
7134 ><DD
7135 ><P
7136 >    By default <SPAN
7137 CLASS="APPLICATION"
7138 >Privoxy</SPAN
7139 > answers
7140     <A
7141 HREF="actions-file.html#LIMIT-CONNECT"
7142 >forbidden <SPAN
7143 CLASS="QUOTE"
7144 >"Connect"</SPAN
7145 > requests</A
7146 >
7147     with a short error message inside the headers. If the browser doesn't display
7148     headers (most don't), you just see an empty page.
7149    </P
7150 ><P
7151 >    With this action enabled, <SPAN
7152 CLASS="APPLICATION"
7153 >Privoxy</SPAN
7154 > displays
7155     the message that is used for ordinary blocks instead. If you decide
7156     to make an exception for the page in question, you can do so by
7157     following the <SPAN
7158 CLASS="QUOTE"
7159 >"See why"</SPAN
7160 > link.
7161    </P
7162 ><P
7163 >    For <SPAN
7164 CLASS="QUOTE"
7165 >"Connect"</SPAN
7166 > requests the clients tell
7167     <SPAN
7168 CLASS="APPLICATION"
7169 >Privoxy</SPAN
7170 > which host they are interested
7171     in, but not which document they plan to get later. As a result, the
7172     <SPAN
7173 CLASS="QUOTE"
7174 >"Go there anyway"</SPAN
7175 > wouldn't work and is therefore suppressed.
7176    </P
7177 ></DD
7178 ><DT
7179 >Example usage:</DT
7180 ><DD
7181 ><P
7182 >    <TABLE
7183 BORDER="0"
7184 BGCOLOR="#E0E0E0"
7185 WIDTH="90%"
7186 ><TR
7187 ><TD
7188 ><PRE
7189 CLASS="SCREEN"
7190 >+treat-forbidden-connects-like-blocks</PRE
7191 ></TD
7192 ></TR
7193 ></TABLE
7194 >
7195    </P
7196 ></DD
7197 ></DL
7198 ></DIV
7199 ></DIV
7200 ><DIV
7201 CLASS="SECT3"
7202 ><H3
7203 CLASS="SECT3"
7204 ><A
7205 NAME="AEN4261"
7206 >8.5.39. Summary</A
7207 ></H3
7208 ><P
7209 > Note that many of these actions have the potential to cause a page to
7210  misbehave, possibly even not to display at all. There are many ways 
7211  a site designer may choose to design his site, and what HTTP header 
7212  content, and other criteria, he may depend on. There is no way to have hard
7213  and fast rules for all sites. See the <A
7214 HREF="appendix.html#ACTIONSANAT"
7215 >Appendix</A
7216 > for a brief example on troubleshooting
7217  actions.</P
7218 ></DIV
7219 ></DIV
7220 ><DIV
7221 CLASS="SECT2"
7222 ><H2
7223 CLASS="SECT2"
7224 ><A
7225 NAME="ALIASES"
7226 >8.6. Aliases</A
7227 ></H2
7228 ><P
7229 > Custom <SPAN
7230 CLASS="QUOTE"
7231 >"actions"</SPAN
7232 >, known to <SPAN
7233 CLASS="APPLICATION"
7234 >Privoxy</SPAN
7235 >
7236  as <SPAN
7237 CLASS="QUOTE"
7238 >"aliases"</SPAN
7239 >, can be defined by combining other actions.
7240  These can in turn be invoked just like the built-in actions.
7241  Currently, an alias name can contain any character except space, tab,
7242  <SPAN
7243 CLASS="QUOTE"
7244 >"="</SPAN
7245 >,
7246  <SPAN
7247 CLASS="QUOTE"
7248 >"{"</SPAN
7249 > and <SPAN
7250 CLASS="QUOTE"
7251 >"}"</SPAN
7252 >, but we <SPAN
7253 CLASS="emphasis"
7254 ><I
7255 CLASS="EMPHASIS"
7256 >strongly 
7257  recommend</I
7258 ></SPAN
7259 > that you only use <SPAN
7260 CLASS="QUOTE"
7261 >"a"</SPAN
7262 > to <SPAN
7263 CLASS="QUOTE"
7264 >"z"</SPAN
7265 >,
7266  <SPAN
7267 CLASS="QUOTE"
7268 >"0"</SPAN
7269 > to <SPAN
7270 CLASS="QUOTE"
7271 >"9"</SPAN
7272 >, <SPAN
7273 CLASS="QUOTE"
7274 >"+"</SPAN
7275 >, and <SPAN
7276 CLASS="QUOTE"
7277 >"-"</SPAN
7278 >.
7279  Alias names are not case sensitive, and are not required to start with a
7280  <SPAN
7281 CLASS="QUOTE"
7282 >"+"</SPAN
7283 > or <SPAN
7284 CLASS="QUOTE"
7285 >"-"</SPAN
7286 > sign, since they are merely textually
7287  expanded.</P
7288 ><P
7289 > Aliases can be used throughout the actions file, but they <SPAN
7290 CLASS="emphasis"
7291 ><I
7292 CLASS="EMPHASIS"
7293 >must be
7294  defined in a special section at the top of the file!</I
7295 ></SPAN
7296 >
7297  And there can only be one such section per actions file. Each actions file may
7298  have its own alias section, and the aliases defined in it are only visible
7299  within that file.</P
7300 ><P
7301 > There are two main reasons to use aliases: One is to save typing for frequently
7302  used combinations of actions, the other one is a gain in flexibility: If you
7303  decide once how you want to handle shops by defining an alias called
7304  <SPAN
7305 CLASS="QUOTE"
7306 >"shop"</SPAN
7307 >, you can later change your policy on shops in
7308  <SPAN
7309 CLASS="emphasis"
7310 ><I
7311 CLASS="EMPHASIS"
7312 >one</I
7313 ></SPAN
7314 > place, and your changes will take effect everywhere
7315  in the actions file where the <SPAN
7316 CLASS="QUOTE"
7317 >"shop"</SPAN
7318 > alias is used. Calling aliases
7319  by their purpose also makes your actions files more readable.</P
7320 ><P
7321 > Currently, there is one big drawback to using aliases, though:
7322  <SPAN
7323 CLASS="APPLICATION"
7324 >Privoxy</SPAN
7325 >'s built-in web-based action file
7326  editor honors aliases when reading the actions files, but it expands
7327  them before writing. So the effects of your aliases are of course preserved,
7328  but the aliases themselves are lost when you edit sections that use aliases
7329  with it.</P
7330 ><P
7331 > Now let's define some aliases...</P
7332 ><P
7333 > <TABLE
7334 BORDER="0"
7335 BGCOLOR="#E0E0E0"
7336 WIDTH="100%"
7337 ><TR
7338 ><TD
7339 ><PRE
7340 CLASS="SCREEN"
7341 > # Useful custom aliases we can use later.
7342  #
7343  # Note the (required!) section header line and that this section
7344  # must be at the top of the actions file!
7345  #
7346  {{alias}}
7347
7348  # These aliases just save typing later:
7349  # (Note that some already use other aliases!)
7350  #
7351  +crunch-all-cookies = +<A
7352 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
7353 >crunch-incoming-cookies</A
7354 > +<A
7355 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
7356 >crunch-outgoing-cookies</A
7357 >
7358  -crunch-all-cookies = -<A
7359 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
7360 >crunch-incoming-cookies</A
7361 > -<A
7362 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
7363 >crunch-outgoing-cookies</A
7364 >
7365  +block-as-image      = +block +handle-as-image
7366  allow-all-cookies   = -crunch-all-cookies -<A
7367 HREF="actions-file.html#SESSION-COOKIES-ONLY"
7368 >session-cookies-only</A
7369 > -<A
7370 HREF="actions-file.html#FILTER-CONTENT-COOKIES"
7371 >filter{content-cookies}</A
7372 >
7373
7374  # These aliases define combinations of actions
7375  # that are useful for certain types of sites:
7376  #
7377  fragile     = -<A
7378 HREF="actions-file.html#BLOCK"
7379 >block</A
7380 > -<A
7381 HREF="actions-file.html#FILTER"
7382 >filter</A
7383 > -crunch-all-cookies -<A
7384 HREF="actions-file.html#FAST-REDIRECTS"
7385 >fast-redirects</A
7386 > -<A
7387 HREF="actions-file.html#HIDE-REFERER"
7388 >hide-referrer</A
7389 > -<A
7390 HREF="actions-file.html#KILL-POPUPS"
7391 >kill-popups</A
7392 > -<A
7393 HREF="actions-file.html#PREVENT-COMPRESSION"
7394 >prevent-compression</A
7395 >
7396
7397  shop        = -crunch-all-cookies -<A
7398 HREF="actions-file.html#FILTER-ALL-POPUPS"
7399 >filter{all-popups}</A
7400 > -<A
7401 HREF="actions-file.html#KILL-POPUPS"
7402 >kill-popups</A
7403 >
7404
7405  # Short names for other aliases, for really lazy people ;-)
7406  #
7407  c0 = +crunch-all-cookies
7408  c1 = -crunch-all-cookies</PRE
7409 ></TD
7410 ></TR
7411 ></TABLE
7412 ></P
7413 ><P
7414 > ...and put them to use. These sections would appear in the lower part of an 
7415  actions file and define exceptions to the default actions (as specified further
7416  up for the <SPAN
7417 CLASS="QUOTE"
7418 >"/"</SPAN
7419 > pattern):</P
7420 ><P
7421 > <TABLE
7422 BORDER="0"
7423 BGCOLOR="#E0E0E0"
7424 WIDTH="100%"
7425 ><TR
7426 ><TD
7427 ><PRE
7428 CLASS="SCREEN"
7429 > # These sites are either very complex or very keen on
7430  # user data and require minimal interference to work:
7431  #
7432  {fragile}
7433  .office.microsoft.com
7434  .windowsupdate.microsoft.com
7435  # Gmail is really mail.google.com, not gmail.com
7436  mail.google.com
7437
7438  # Shopping sites:
7439  # Allow cookies (for setting and retrieving your customer data)
7440  #           
7441  {shop}
7442  .quietpc.com
7443  .worldpay.com   # for quietpc.com
7444  mybank.example.com
7445
7446  # These shops require pop-ups:
7447  #
7448  {-kill-popups -filter{all-popups} -filter{unsolicited-popups}}
7449   .dabs.com
7450   .overclockers.co.uk</PRE
7451 ></TD
7452 ></TR
7453 ></TABLE
7454 ></P
7455 ><P
7456 > Aliases like <SPAN
7457 CLASS="QUOTE"
7458 >"shop"</SPAN
7459 > and <SPAN
7460 CLASS="QUOTE"
7461 >"fragile"</SPAN
7462 > are typically used for 
7463  <SPAN
7464 CLASS="QUOTE"
7465 >"problem"</SPAN
7466 > sites that require more than one action to be disabled 
7467  in order to function properly.</P
7468 ></DIV
7469 ><DIV
7470 CLASS="SECT2"
7471 ><H2
7472 CLASS="SECT2"
7473 ><A
7474 NAME="ACT-EXAMPLES"
7475 >8.7. Actions Files Tutorial</A
7476 ></H2
7477 ><P
7478 > The above chapters have shown <A
7479 HREF="actions-file.html"
7480 >which actions files
7481  there are and how they are organized</A
7482 >, how actions are <A
7483 HREF="actions-file.html#ACTIONS"
7484 >specified</A
7485 > and <A
7486 HREF="actions-file.html#ACTIONS-APPLY"
7487 >applied
7488  to URLs</A
7489 >, how <A
7490 HREF="actions-file.html#AF-PATTERNS"
7491 >patterns</A
7492 > work, and how to
7493  define and use <A
7494 HREF="actions-file.html#ALIASES"
7495 >aliases</A
7496 >. Now, let's look at an
7497  example <TT
7498 CLASS="FILENAME"
7499 >default.action</TT
7500 > and <TT
7501 CLASS="FILENAME"
7502 >user.action</TT
7503 >
7504  file and see how all these pieces come together:</P
7505 ><DIV
7506 CLASS="SECT3"
7507 ><H3
7508 CLASS="SECT3"
7509 ><A
7510 NAME="AEN4326"
7511 >8.7.1. default.action</A
7512 ></H3
7513 ><P
7514 >Every config file should start with a short comment stating its purpose:</P
7515 ><P
7516 > <TABLE
7517 BORDER="0"
7518 BGCOLOR="#E0E0E0"
7519 WIDTH="100%"
7520 ><TR
7521 ><TD
7522 ><PRE
7523 CLASS="SCREEN"
7524 ># Sample default.action file &#60;ijbswa-developers@lists.sourceforge.net&#62;</PRE
7525 ></TD
7526 ></TR
7527 ></TABLE
7528 ></P
7529 ><P
7530 >Then, since this is the <TT
7531 CLASS="FILENAME"
7532 >default.action</TT
7533 > file, the
7534 first section is a special section for internal use that you needn't
7535 change or worry about:</P
7536 ><P
7537 > <TABLE
7538 BORDER="0"
7539 BGCOLOR="#E0E0E0"
7540 WIDTH="100%"
7541 ><TR
7542 ><TD
7543 ><PRE
7544 CLASS="SCREEN"
7545 >##########################################################################
7546 # Settings -- Don't change! For internal Privoxy use ONLY.
7547 ##########################################################################
7548
7549 {{settings}}
7550 for-privoxy-version=3.0</PRE
7551 ></TD
7552 ></TR
7553 ></TABLE
7554 ></P
7555 ><P
7556 >After that comes the (optional) alias section. We'll use the example
7557 section from the above <A
7558 HREF="actions-file.html#ALIASES"
7559 >chapter on aliases</A
7560 >,
7561 that also explains why and how aliases are used:</P
7562 ><P
7563 > <TABLE
7564 BORDER="0"
7565 BGCOLOR="#E0E0E0"
7566 WIDTH="100%"
7567 ><TR
7568 ><TD
7569 ><PRE
7570 CLASS="SCREEN"
7571 >##########################################################################
7572 # Aliases
7573 ##########################################################################
7574 {{alias}}
7575
7576  # These aliases just save typing later:
7577  # (Note that some already use other aliases!)
7578  #
7579  +crunch-all-cookies = +<A
7580 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
7581 >crunch-incoming-cookies</A
7582 > +<A
7583 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
7584 >crunch-outgoing-cookies</A
7585 >
7586  -crunch-all-cookies = -<A
7587 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
7588 >crunch-incoming-cookies</A
7589 > -<A
7590 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
7591 >crunch-outgoing-cookies</A
7592 >
7593  +block-as-image      = +block +handle-as-image
7594  mercy-for-cookies   = -crunch-all-cookies -<A
7595 HREF="actions-file.html#SESSION-COOKIES-ONLY"
7596 >session-cookies-only</A
7597 > -<A
7598 HREF="actions-file.html#FILTER-CONTENT-COOKIES"
7599 >filter{content-cookies}</A
7600 >
7601
7602  # These aliases define combinations of actions
7603  # that are useful for certain types of sites:
7604  #
7605  fragile     = -<A
7606 HREF="actions-file.html#BLOCK"
7607 >block</A
7608 > -<A
7609 HREF="actions-file.html#FILTER"
7610 >filter</A
7611 > -crunch-all-cookies -<A
7612 HREF="actions-file.html#FAST-REDIRECTS"
7613 >fast-redirects</A
7614 > -<A
7615 HREF="actions-file.html#HIDE-REFERER"
7616 >hide-referrer</A
7617 > -<A
7618 HREF="actions-file.html#KILL-POPUPS"
7619 >kill-popups</A
7620 >
7621  shop        = -crunch-all-cookies -<A
7622 HREF="actions-file.html#FILTER-ALL-POPUPS"
7623 >filter{all-popups}</A
7624 > -<A
7625 HREF="actions-file.html#KILL-POPUPS"
7626 >kill-popups</A
7627 ></PRE
7628 ></TD
7629 ></TR
7630 ></TABLE
7631 ></P
7632 ><P
7633 > Now come the regular sections, i.e. sets of actions, accompanied
7634  by URL patterns to which they apply. Remember <SPAN
7635 CLASS="emphasis"
7636 ><I
7637 CLASS="EMPHASIS"
7638 >all actions
7639  are disabled when matching starts</I
7640 ></SPAN
7641 >, so we have to explicitly
7642  enable the ones we want.</P
7643 ><P
7644 > The first regular section is probably the most important. It has only
7645  one pattern, <SPAN
7646 CLASS="QUOTE"
7647 >"<TT
7648 CLASS="LITERAL"
7649 >/</TT
7650 >"</SPAN
7651 >, but this pattern
7652  <A
7653 HREF="actions-file.html#AF-PATTERNS"
7654 >matches all URLs</A
7655 >. Therefore, the
7656  set of actions used in this <SPAN
7657 CLASS="QUOTE"
7658 >"default"</SPAN
7659 > section <SPAN
7660 CLASS="emphasis"
7661 ><I
7662 CLASS="EMPHASIS"
7663 >will
7664  be applied to all requests as a start</I
7665 ></SPAN
7666 >. It can  be partly or
7667  wholly overridden by later matches further down this file, or in user.action,
7668  but it will still be largely responsible for your overall browsing
7669  experience.</P
7670 ><P
7671 > Again, at the start of matching, all actions are disabled, so there is
7672  no need to disable any actions here. (Remember: a <SPAN
7673 CLASS="QUOTE"
7674 >"+"</SPAN
7675 >
7676  preceding the action name enables the action, a <SPAN
7677 CLASS="QUOTE"
7678 >"-"</SPAN
7679 > disables!).
7680  Also note how this long line has been made more readable by splitting it into
7681  multiple lines with line continuation.</P
7682 ><P
7683 > <TABLE
7684 BORDER="0"
7685 BGCOLOR="#E0E0E0"
7686 WIDTH="100%"
7687 ><TR
7688 ><TD
7689 ><PRE
7690 CLASS="SCREEN"
7691 >##########################################################################
7692 # "Defaults" section:
7693 ##########################################################################
7694  { \
7695  +<A
7696 HREF="actions-file.html#DEANIMATE-GIFS"
7697 >deanimate-gifs</A
7698 > \
7699  +<A
7700 HREF="actions-file.html#FILTER-HTML-ANNOYANCES"
7701 >filter{html-annoyances}</A
7702 > \
7703  +<A
7704 HREF="actions-file.html#FILTER-REFRESH-TAGS"
7705 >filter{refresh-tags}</A
7706 > \
7707  +<A
7708 HREF="actions-file.html#FILTER-WEBBUGS"
7709 >filter{webbugs}</A
7710 > \
7711  +<A
7712 HREF="actions-file.html#FILTER-IE-EXPLOITS"
7713 >filter{ie-exploits}</A
7714 > \     
7715  +<A
7716 HREF="actions-file.html#HIDE-FORWARDED-FOR-HEADERS"
7717 >hide-forwarded-for-headers</A
7718 > \
7719  +<A
7720 HREF="actions-file.html#HIDE-FROM-HEADER"
7721 >hide-from-header{block}</A
7722 > \
7723  +<A
7724 HREF="actions-file.html#HIDE-REFERER"
7725 >hide-referrer{forge}</A
7726 > \
7727  +<A
7728 HREF="actions-file.html#PREVENT-COMPRESSION"
7729 >prevent-compression</A
7730 > \
7731  +<A
7732 HREF="actions-file.html#SESSION-COOKIES-ONLY"
7733 >session-cookies-only</A
7734 > \
7735  +<A
7736 HREF="actions-file.html#SET-IMAGE-BLOCKER"
7737 >set-image-blocker{pattern}</A
7738 > \
7739  }
7740  / # forward slash will match *all* potential URL patterns.</PRE
7741 ></TD
7742 ></TR
7743 ></TABLE
7744 ></P
7745 ><P
7746 > The default behavior is now set.
7747  </P
7748 ><P
7749 > The first of our specialized sections is concerned with <SPAN
7750 CLASS="QUOTE"
7751 >"fragile"</SPAN
7752 >
7753  sites, i.e. sites that require minimum interference, because they are either
7754  very complex or very keen on tracking you (and have mechanisms in place that
7755  make them unusable for people who avoid being tracked). We will simply use
7756  our pre-defined <TT
7757 CLASS="LITERAL"
7758 >fragile</TT
7759 > alias instead of stating the list
7760  of actions explicitly:</P
7761 ><P
7762 > <TABLE
7763 BORDER="0"
7764 BGCOLOR="#E0E0E0"
7765 WIDTH="100%"
7766 ><TR
7767 ><TD
7768 ><PRE
7769 CLASS="SCREEN"
7770 >##########################################################################
7771 # Exceptions for sites that'll break under the default action set:
7772 ##########################################################################
7773
7774 # "Fragile" Use a minimum set of actions for these sites (see alias above):
7775 #
7776 { fragile }
7777 .office.microsoft.com           # surprise, surprise!
7778 .windowsupdate.microsoft.com
7779 mail.google.com</PRE
7780 ></TD
7781 ></TR
7782 ></TABLE
7783 ></P
7784 ><P
7785 > Shopping sites are not as fragile, but they typically
7786  require cookies to log in, and pop-up windows for shopping
7787  carts or item details. Again, we'll use a pre-defined alias:</P
7788 ><P
7789 > <TABLE
7790 BORDER="0"
7791 BGCOLOR="#E0E0E0"
7792 WIDTH="100%"
7793 ><TR
7794 ><TD
7795 ><PRE
7796 CLASS="SCREEN"
7797 ># Shopping sites:
7798 #
7799 { shop }
7800 .quietpc.com 
7801 .worldpay.com   # for quietpc.com
7802 .jungle.com
7803 .scan.co.uk</PRE
7804 ></TD
7805 ></TR
7806 ></TABLE
7807 ></P
7808 ><P
7809 > The <TT
7810 CLASS="LITERAL"
7811 ><A
7812 HREF="actions-file.html#FAST-REDIRECTS"
7813 >fast-redirects</A
7814 ></TT
7815 >
7816  action, which we enabled per default above,  breaks some sites. So disable
7817  it for popular sites where we know it misbehaves:</P
7818 ><P
7819 > <TABLE
7820 BORDER="0"
7821 BGCOLOR="#E0E0E0"
7822 WIDTH="100%"
7823 ><TR
7824 ><TD
7825 ><PRE
7826 CLASS="SCREEN"
7827 >{ -<A
7828 HREF="actions-file.html#FAST-REDIRECTS"
7829 >fast-redirects</A
7830 > }
7831 login.yahoo.com
7832 edit.*.yahoo.com
7833 .google.com
7834 .altavista.com/.*(like|url|link):http
7835 .altavista.com/trans.*urltext=http
7836 .nytimes.com</PRE
7837 ></TD
7838 ></TR
7839 ></TABLE
7840 ></P
7841 ><P
7842 > It is important that <SPAN
7843 CLASS="APPLICATION"
7844 >Privoxy</SPAN
7845 > knows which
7846  URLs belong to images, so that <SPAN
7847 CLASS="emphasis"
7848 ><I
7849 CLASS="EMPHASIS"
7850 >if</I
7851 ></SPAN
7852 > they are to
7853  be blocked, a substitute image can be sent, rather than an HTML page.
7854  Contacting the remote site to find out is not an option, since it
7855  would destroy the loading time advantage of banner blocking, and it
7856  would feed the advertisers (in terms of money <SPAN
7857 CLASS="emphasis"
7858 ><I
7859 CLASS="EMPHASIS"
7860 >and</I
7861 ></SPAN
7862 >
7863  information). We can mark any URL as an image with the <TT
7864 CLASS="LITERAL"
7865 ><A
7866 HREF="actions-file.html#HANDLE-AS-IMAGE"
7867 >handle-as-image</A
7868 ></TT
7869 > action,
7870  and marking all URLs that end in a known image file extension is a
7871  good start:</P
7872 ><P
7873 > <TABLE
7874 BORDER="0"
7875 BGCOLOR="#E0E0E0"
7876 WIDTH="100%"
7877 ><TR
7878 ><TD
7879 ><PRE
7880 CLASS="SCREEN"
7881 >##########################################################################
7882 # Images:
7883 ##########################################################################
7884
7885 # Define which file types will be treated as images, in case they get
7886 # blocked further down this file:
7887 #
7888 { +<A
7889 HREF="actions-file.html#HANDLE-AS-IMAGE"
7890 >handle-as-image</A
7891 > }
7892 /.*\.(gif|jpe?g|png|bmp|ico)$</PRE
7893 ></TD
7894 ></TR
7895 ></TABLE
7896 ></P
7897 ><P
7898 > And then there are known banner sources. They often use scripts to
7899  generate the banners, so it won't be visible from the URL that the
7900  request is for an image. Hence we block them <SPAN
7901 CLASS="emphasis"
7902 ><I
7903 CLASS="EMPHASIS"
7904 >and</I
7905 ></SPAN
7906 >
7907  mark them as images in one go, with the help of our
7908  <TT
7909 CLASS="LITERAL"
7910 >+block-as-image</TT
7911 > alias defined above. (We could of
7912  course just as well use <TT
7913 CLASS="LITERAL"
7914 >+<A
7915 HREF="actions-file.html#BLOCK"
7916 >block</A
7917 >
7918  +<A
7919 HREF="actions-file.html#HANDLE-AS-IMAGE"
7920 >handle-as-image</A
7921 ></TT
7922 > here.)
7923  Remember that the type of the replacement image is chosen by the
7924  <TT
7925 CLASS="LITERAL"
7926 ><A
7927 HREF="actions-file.html#SET-IMAGE-BLOCKER"
7928 >set-image-blocker</A
7929 ></TT
7930 >
7931  action. Since all URLs have matched the default section with its
7932  <TT
7933 CLASS="LITERAL"
7934 >+<A
7935 HREF="actions-file.html#SET-IMAGE-BLOCKER"
7936 >set-image-blocker</A
7937 >{pattern}</TT
7938 >
7939  action before, it still applies and needn't be repeated:</P
7940 ><P
7941 > <TABLE
7942 BORDER="0"
7943 BGCOLOR="#E0E0E0"
7944 WIDTH="100%"
7945 ><TR
7946 ><TD
7947 ><PRE
7948 CLASS="SCREEN"
7949 ># Known ad generators:
7950 #
7951 { +block-as-image }
7952 ar.atwola.com 
7953 .ad.doubleclick.net
7954 .ad.*.doubleclick.net
7955 .a.yimg.com/(?:(?!/i/).)*$
7956 .a[0-9].yimg.com/(?:(?!/i/).)*$
7957 bs*.gsanet.com
7958 .qkimg.net</PRE
7959 ></TD
7960 ></TR
7961 ></TABLE
7962 ></P
7963 ><P
7964 > One of the most important jobs of <SPAN
7965 CLASS="APPLICATION"
7966 >Privoxy</SPAN
7967 >
7968  is to block banners. Many of these can be <SPAN
7969 CLASS="QUOTE"
7970 >"blocked"</SPAN
7971 >
7972  by the <TT
7973 CLASS="LITERAL"
7974 ><A
7975 HREF="actions-file.html#FILTER"
7976 >filter</A
7977 >{banners-by-size}</TT
7978 >
7979  action, which we enabled above, and which deletes the references to banner
7980  images from the pages while they are loaded, so the browser doesn't request
7981  them anymore, and hence they don't need to be blocked here. But this naturally
7982  doesn't catch all banners, and some people choose not to use filters, so we
7983  need a comprehensive list of patterns for banner URLs here, and apply the
7984  <TT
7985 CLASS="LITERAL"
7986 ><A
7987 HREF="actions-file.html#BLOCK"
7988 >block</A
7989 ></TT
7990 > action to them.</P
7991 ><P
7992 > First comes many generic patterns, which do most of the work, by
7993  matching typical domain and path name components of banners. Then comes
7994  a list of individual patterns for specific sites, which is omitted here
7995  to keep the example short:</P
7996 ><P
7997 > <TABLE
7998 BORDER="0"
7999 BGCOLOR="#E0E0E0"
8000 WIDTH="100%"
8001 ><TR
8002 ><TD
8003 ><PRE
8004 CLASS="SCREEN"
8005 >##########################################################################
8006 # Block these fine banners:
8007 ##########################################################################
8008 { <A
8009 HREF="actions-file.html#BLOCK"
8010 >+block</A
8011 > }
8012
8013 # Generic patterns:
8014
8015 ad*.
8016 .*ads.
8017 banner?.
8018 count*.
8019 /.*count(er)?\.(pl|cgi|exe|dll|asp|php[34]?)
8020 /(?:.*/)?(publicite|werbung|rekla(ma|me|am)|annonse|maino(kset|nta|s)?)/
8021
8022 # Site-specific patterns (abbreviated):
8023 #
8024 .hitbox.com</PRE
8025 ></TD
8026 ></TR
8027 ></TABLE
8028 ></P
8029 ><P
8030 > It's quite remarkable how many advertisers actually call their banner
8031  servers ads.<TT
8032 CLASS="REPLACEABLE"
8033 ><I
8034 >company</I
8035 ></TT
8036 >.com, or call the directory
8037  in which the banners are stored simply <SPAN
8038 CLASS="QUOTE"
8039 >"banners"</SPAN
8040 >. So the above
8041  generic patterns are surprisingly effective.</P
8042 ><P
8043 > But being very generic, they necessarily also catch URLs that we don't want
8044  to block. The pattern <TT
8045 CLASS="LITERAL"
8046 >.*ads.</TT
8047 > e.g. catches 
8048  <SPAN
8049 CLASS="QUOTE"
8050 >"nasty-<SPAN
8051 CLASS="emphasis"
8052 ><I
8053 CLASS="EMPHASIS"
8054 >ads</I
8055 ></SPAN
8056 >.nasty-corp.com"</SPAN
8057 > as intended,
8058  but also <SPAN
8059 CLASS="QUOTE"
8060 >"downlo<SPAN
8061 CLASS="emphasis"
8062 ><I
8063 CLASS="EMPHASIS"
8064 >ads</I
8065 ></SPAN
8066 >.sourcefroge.net"</SPAN
8067 > or
8068  <SPAN
8069 CLASS="QUOTE"
8070 >"<SPAN
8071 CLASS="emphasis"
8072 ><I
8073 CLASS="EMPHASIS"
8074 >ads</I
8075 ></SPAN
8076 >l.some-provider.net."</SPAN
8077 > So here come some
8078  well-known exceptions to the <TT
8079 CLASS="LITERAL"
8080 >+<A
8081 HREF="actions-file.html#BLOCK"
8082 >block</A
8083 ></TT
8084 >
8085  section above.</P
8086 ><P
8087 > Note that these are exceptions to exceptions from the default! Consider the URL
8088  <SPAN
8089 CLASS="QUOTE"
8090 >"downloads.sourcefroge.net"</SPAN
8091 >: Initially, all actions are deactivated,
8092  so it wouldn't get blocked. Then comes the defaults section, which matches the
8093  URL, but just deactivates the <TT
8094 CLASS="LITERAL"
8095 ><A
8096 HREF="actions-file.html#BLOCK"
8097 >block</A
8098 ></TT
8099 >
8100  action once again. Then it matches <TT
8101 CLASS="LITERAL"
8102 >.*ads.</TT
8103 >, an exception to the
8104  general non-blocking policy, and suddenly
8105  <TT
8106 CLASS="LITERAL"
8107 ><A
8108 HREF="actions-file.html#BLOCK"
8109 >+block</A
8110 ></TT
8111 > applies. And now, it'll match
8112  <TT
8113 CLASS="LITERAL"
8114 >.*loads.</TT
8115 >, where <TT
8116 CLASS="LITERAL"
8117 ><A
8118 HREF="actions-file.html#BLOCK"
8119 >-block</A
8120 ></TT
8121 >
8122  applies, so (unless it matches <SPAN
8123 CLASS="emphasis"
8124 ><I
8125 CLASS="EMPHASIS"
8126 >again</I
8127 ></SPAN
8128 > further down) it ends up
8129  with no <TT
8130 CLASS="LITERAL"
8131 ><A
8132 HREF="actions-file.html#BLOCK"
8133 >block</A
8134 ></TT
8135 > action applying.</P
8136 ><P
8137 > <TABLE
8138 BORDER="0"
8139 BGCOLOR="#E0E0E0"
8140 WIDTH="100%"
8141 ><TR
8142 ><TD
8143 ><PRE
8144 CLASS="SCREEN"
8145 >##########################################################################
8146 # Save some innocent victims of the above generic block patterns:
8147 ##########################################################################
8148
8149 # By domain:
8150
8151 { -<A
8152 HREF="actions-file.html#BLOCK"
8153 >block</A
8154 > }
8155 adv[io]*.  # (for advogato.org and advice.*)
8156 adsl.      # (has nothing to do with ads)
8157 adobe.     # (has nothing to do with ads either)
8158 ad[ud]*.   # (adult.* and add.*)
8159 .edu       # (universities don't host banners (yet!))
8160 .*loads.   # (downloads, uploads etc)
8161
8162 # By path:
8163 #
8164 /.*loads/
8165
8166 # Site-specific:
8167 #
8168 www.globalintersec.com/adv # (adv = advanced)
8169 www.ugu.com/sui/ugu/adv</PRE
8170 ></TD
8171 ></TR
8172 ></TABLE
8173 ></P
8174 ><P
8175 > Filtering source code can have nasty side effects,
8176  so make an exception for our friends at sourceforge.net,
8177  and all paths with <SPAN
8178 CLASS="QUOTE"
8179 >"cvs"</SPAN
8180 > in them. Note that
8181  <TT
8182 CLASS="LITERAL"
8183 >-<A
8184 HREF="actions-file.html#FILTER"
8185 >filter</A
8186 ></TT
8187 >
8188  disables <SPAN
8189 CLASS="emphasis"
8190 ><I
8191 CLASS="EMPHASIS"
8192 >all</I
8193 ></SPAN
8194 > filters in one fell swoop!</P
8195 ><P
8196 > <TABLE
8197 BORDER="0"
8198 BGCOLOR="#E0E0E0"
8199 WIDTH="100%"
8200 ><TR
8201 ><TD
8202 ><PRE
8203 CLASS="SCREEN"
8204 ># Don't filter code!
8205 #
8206 { -<A
8207 HREF="actions-file.html#FILTER"
8208 >filter</A
8209 > }
8210 /(.*/)?cvs
8211 bugzilla.
8212 developer.
8213 wiki.
8214 .sourceforge.net</PRE
8215 ></TD
8216 ></TR
8217 ></TABLE
8218 ></P
8219 ><P
8220 > The actual <TT
8221 CLASS="FILENAME"
8222 >default.action</TT
8223 > is of course much more
8224  comprehensive, but we hope this example made clear how it works.</P
8225 ></DIV
8226 ><DIV
8227 CLASS="SECT3"
8228 ><H3
8229 CLASS="SECT3"
8230 ><A
8231 NAME="AEN4462"
8232 >8.7.2. user.action</A
8233 ></H3
8234 ><P
8235 > So far we are painting with a broad brush by setting general policies,
8236  which would be a reasonable starting point for many people. Now, 
8237  you might want to be more specific and have customized rules that
8238  are more suitable to your personal habits and preferences. These would
8239  be for narrowly defined situations like your ISP or your bank, and should
8240  be placed in <TT
8241 CLASS="FILENAME"
8242 >user.action</TT
8243 >, which is parsed after all other 
8244  actions files and hence has the last word, over-riding any previously
8245  defined actions. <TT
8246 CLASS="FILENAME"
8247 >user.action</TT
8248 > is also a 
8249  <SPAN
8250 CLASS="emphasis"
8251 ><I
8252 CLASS="EMPHASIS"
8253 >safe</I
8254 ></SPAN
8255 > place for your personal settings, since
8256  <TT
8257 CLASS="FILENAME"
8258 >default.action</TT
8259 > is actively maintained by the
8260  <SPAN
8261 CLASS="APPLICATION"
8262 >Privoxy</SPAN
8263 > developers and you'll probably want
8264  to install updated versions from time to time.</P
8265 ><P
8266 > So let's look at a few examples of things that one might typically do in
8267  <TT
8268 CLASS="FILENAME"
8269 >user.action</TT
8270 >: </P
8271 ><P
8272 > <TABLE
8273 BORDER="0"
8274 BGCOLOR="#E0E0E0"
8275 WIDTH="100%"
8276 ><TR
8277 ><TD
8278 ><PRE
8279 CLASS="SCREEN"
8280 ># My user.action file. &#60;fred@example.com&#62;</PRE
8281 ></TD
8282 ></TR
8283 ></TABLE
8284 ></P
8285 ><P
8286 > As <A
8287 HREF="actions-file.html#ALIASES"
8288 >aliases</A
8289 > are local to the actions
8290  file that they are defined in, you can't use the ones from
8291  <TT
8292 CLASS="FILENAME"
8293 >default.action</TT
8294 >, unless you repeat them here:</P
8295 ><P
8296 > <TABLE
8297 BORDER="0"
8298 BGCOLOR="#E0E0E0"
8299 WIDTH="100%"
8300 ><TR
8301 ><TD
8302 ><PRE
8303 CLASS="SCREEN"
8304 ># Aliases are local to the file they are defined in.
8305 # (Re-)define aliases for this file:
8306 #
8307 {{alias}}
8308
8309 # These aliases just save typing later, and the alias names should 
8310 # be self explanatory.
8311 #
8312 +crunch-all-cookies = +crunch-incoming-cookies +crunch-outgoing-cookies
8313 -crunch-all-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies
8314  allow-all-cookies  = -crunch-all-cookies -session-cookies-only
8315  allow-popups       = -filter{all-popups} -kill-popups
8316 +block-as-image     = +block +handle-as-image
8317 -block-as-image     = -block
8318
8319 # These aliases define combinations of actions that are useful for
8320 # certain types of sites:
8321 #
8322 fragile     = -block -crunch-all-cookies -filter -fast-redirects -hide-referrer -kill-popups
8323 shop        = -crunch-all-cookies allow-popups
8324
8325 # Allow ads for selected useful free sites:
8326 #
8327 allow-ads   = -block -filter{banners-by-size} -filter{banners-by-link}
8328
8329 # Alias for specific file types that are text, but might have conflicting
8330 # MIME types. We want the browser to force these to be text documents.
8331 handle-as-text = -<A
8332 HREF="actions-file.html#FILTER"
8333 >filter</A
8334 > +-<A
8335 HREF="actions-file.html#CONTENT-TYPE-OVERWRITE"
8336 >content-type-overwrite{text/plain}</A
8337 > +-<A
8338 HREF="actions-file.html#FORCE-TEXT-MODE"
8339 >force-text-mode</A
8340 > -<A
8341 HREF="actions-file.html#HIDE-CONTENT-DISPOSITION"
8342 >hide-content-disposition</A
8343 ></PRE
8344 ></TD
8345 ></TR
8346 ></TABLE
8347 >&#13;</P
8348 ><P
8349 > Say you have accounts on some sites that you visit regularly, and
8350  you don't want to have to log in manually each time. So you'd like
8351  to allow persistent cookies for these sites. The
8352  <TT
8353 CLASS="LITERAL"
8354 >allow-all-cookies</TT
8355 > alias defined above does exactly
8356  that, i.e. it disables crunching of cookies in any direction, and the 
8357  processing of cookies to make them only temporary.</P
8358 ><P
8359 > <TABLE
8360 BORDER="0"
8361 BGCOLOR="#E0E0E0"
8362 WIDTH="100%"
8363 ><TR
8364 ><TD
8365 ><PRE
8366 CLASS="SCREEN"
8367 >{ allow-all-cookies }
8368  sourceforge.net
8369  .yahoo.com
8370  .msdn.microsoft.com
8371  .redhat.com</PRE
8372 ></TD
8373 ></TR
8374 ></TABLE
8375 ></P
8376 ><P
8377 > Your bank is allergic to some filter, but you don't know which, so you disable them all:</P
8378 ><P
8379 > <TABLE
8380 BORDER="0"
8381 BGCOLOR="#E0E0E0"
8382 WIDTH="100%"
8383 ><TR
8384 ><TD
8385 ><PRE
8386 CLASS="SCREEN"
8387 >{ -<A
8388 HREF="actions-file.html#FILTER"
8389 >filter</A
8390 > }
8391  .your-home-banking-site.com</PRE
8392 ></TD
8393 ></TR
8394 ></TABLE
8395 ></P
8396 ><P
8397 > Some file types you may not want to filter for various reasons:</P
8398 ><P
8399 > <TABLE
8400 BORDER="0"
8401 BGCOLOR="#E0E0E0"
8402 WIDTH="100%"
8403 ><TR
8404 ><TD
8405 ><PRE
8406 CLASS="SCREEN"
8407 ># Technical documentation is likely to contain strings that might
8408 # erroneously get altered by the JavaScript-oriented filters:
8409 #
8410 .tldp.org
8411 /(.*/)?selfhtml/
8412
8413 # And this stupid host sends streaming video with a wrong MIME type,
8414 # so that Privoxy thinks it is getting HTML and starts filtering:
8415 #
8416 stupid-server.example.com/</PRE
8417 ></TD
8418 ></TR
8419 ></TABLE
8420 ></P
8421 ><P
8422 > Example of a simple <A
8423 HREF="actions-file.html#BLOCK"
8424 >block</A
8425 > action. Say you've
8426  seen an ad on your favourite page on example.com that you want to get rid of.
8427  You have right-clicked the image, selected <SPAN
8428 CLASS="QUOTE"
8429 >"copy image location"</SPAN
8430 >
8431  and pasted the URL below while removing the leading http://, into a 
8432  <TT
8433 CLASS="LITERAL"
8434 >{ +block }</TT
8435 > section. Note that <TT
8436 CLASS="LITERAL"
8437 >{ +handle-as-image
8438  }</TT
8439 > need not be specified, since all URLs ending in
8440  <TT
8441 CLASS="LITERAL"
8442 >.gif</TT
8443 > will be tagged as images by the general rules as set
8444  in default.action anyway:</P
8445 ><P
8446 > <TABLE
8447 BORDER="0"
8448 BGCOLOR="#E0E0E0"
8449 WIDTH="100%"
8450 ><TR
8451 ><TD
8452 ><PRE
8453 CLASS="SCREEN"
8454 >{ +<A
8455 HREF="actions-file.html#BLOCK"
8456 >block</A
8457 > }
8458  www.example.com/nasty-ads/sponsor\.gif
8459  another.example.net/more/junk/here/</PRE
8460 ></TD
8461 ></TR
8462 ></TABLE
8463 ></P
8464 ><P
8465 > The URLs of dynamically generated banners, especially from large banner
8466  farms, often don't use the well-known image file name extensions, which
8467  makes it impossible for <SPAN
8468 CLASS="APPLICATION"
8469 >Privoxy</SPAN
8470 > to guess
8471  the file type just by looking at the URL. 
8472  You can use the <TT
8473 CLASS="LITERAL"
8474 >+block-as-image</TT
8475 > alias defined above for
8476  these cases.
8477  Note that objects which match this rule but then turn out NOT to be an
8478  image are typically rendered as a <SPAN
8479 CLASS="QUOTE"
8480 >"broken image"</SPAN
8481 > icon by the
8482  browser. Use cautiously.</P
8483 ><P
8484 > <TABLE
8485 BORDER="0"
8486 BGCOLOR="#E0E0E0"
8487 WIDTH="100%"
8488 ><TR
8489 ><TD
8490 ><PRE
8491 CLASS="SCREEN"
8492 >{ +block-as-image }
8493  .doubleclick.net
8494  .fastclick.net
8495  /Realmedia/ads/
8496  ar.atwola.com/</PRE
8497 ></TD
8498 ></TR
8499 ></TABLE
8500 ></P
8501 ><P
8502 > Now you noticed that the default configuration breaks Forbes Magazine,
8503  but you were too lazy to find out which action is the culprit, and you
8504  were again too lazy to give <A
8505 HREF="contact.html"
8506 >feedback</A
8507 >, so
8508  you just used the <TT
8509 CLASS="LITERAL"
8510 >fragile</TT
8511 > alias on the site, and
8512  -- <SPAN
8513 CLASS="emphasis"
8514 ><I
8515 CLASS="EMPHASIS"
8516 >whoa!</I
8517 ></SPAN
8518 > -- it worked. The <TT
8519 CLASS="LITERAL"
8520 >fragile</TT
8521 >
8522  aliases disables those actions that are most likely to break a site. Also,
8523  good for testing purposes to see if it is <SPAN
8524 CLASS="APPLICATION"
8525 >Privoxy</SPAN
8526 >
8527  that is causing the problem or not. We later find other regular sites 
8528  that misbehave, and add those to our personalized list of troublemakers:</P
8529 ><P
8530 ><TABLE
8531 BORDER="0"
8532 BGCOLOR="#E0E0E0"
8533 WIDTH="100%"
8534 ><TR
8535 ><TD
8536 ><PRE
8537 CLASS="SCREEN"
8538 >{ fragile }
8539  .forbes.com
8540  webmail.example.com
8541  .mybank.com</PRE
8542 ></TD
8543 ></TR
8544 ></TABLE
8545 ></P
8546 ><P
8547 > You like the <SPAN
8548 CLASS="QUOTE"
8549 >"fun"</SPAN
8550 > text replacements in <TT
8551 CLASS="FILENAME"
8552 >default.filter</TT
8553 >,
8554  but it is disabled in the distributed actions file.
8555  So you'd like to turn it on in your private,
8556  update-safe config, once and for all:</P
8557 ><P
8558 ><TABLE
8559 BORDER="0"
8560 BGCOLOR="#E0E0E0"
8561 WIDTH="100%"
8562 ><TR
8563 ><TD
8564 ><PRE
8565 CLASS="SCREEN"
8566 >{ +<A
8567 HREF="actions-file.html#FILTER-FUN"
8568 >filter{fun}</A
8569 > }
8570  / # For ALL sites!</PRE
8571 ></TD
8572 ></TR
8573 ></TABLE
8574 ></P
8575 ><P
8576 > Note that the above is not really a good idea: There are exceptions
8577  to the filters in <TT
8578 CLASS="FILENAME"
8579 >default.action</TT
8580 > for things that
8581  really shouldn't be filtered, like code on CVS-&#62;Web interfaces. Since
8582  <TT
8583 CLASS="FILENAME"
8584 >user.action</TT
8585 > has the last word, these exceptions
8586  won't be valid for the <SPAN
8587 CLASS="QUOTE"
8588 >"fun"</SPAN
8589 > filtering specified here.</P
8590 ><P
8591 > You might also worry about how your favourite free websites are
8592  funded, and find that they rely on displaying banner advertisements
8593  to survive. So you might want to specifically allow banners for those
8594  sites that you feel provide value to you:</P
8595 ><P
8596 ><TABLE
8597 BORDER="0"
8598 BGCOLOR="#E0E0E0"
8599 WIDTH="100%"
8600 ><TR
8601 ><TD
8602 ><PRE
8603 CLASS="SCREEN"
8604 >{ allow-ads }
8605  .sourceforge.net
8606  .slashdot.org
8607  .osdn.net</PRE
8608 ></TD
8609 ></TR
8610 ></TABLE
8611 >   </P
8612 ><P
8613 > Note that <TT
8614 CLASS="LITERAL"
8615 >allow-ads</TT
8616 > has been aliased to 
8617  <TT
8618 CLASS="LITERAL"
8619 >-<A
8620 HREF="actions-file.html#BLOCK"
8621 >block</A
8622 ></TT
8623 >, 
8624  <TT
8625 CLASS="LITERAL"
8626 >-<A
8627 HREF="actions-file.html#FILTER-BANNERS-BY-SIZE"
8628 >filter{banners-by-size}</A
8629 ></TT
8630 >, and 
8631  <TT
8632 CLASS="LITERAL"
8633 >-<A
8634 HREF="actions-file.html#FILTER-BANNERS-BY-LINK"
8635 >filter{banners-by-link}</A
8636 ></TT
8637 > above.</P
8638 ><P
8639 > Invoke another alias here to force an over-ride of the MIME type <TT
8640 CLASS="LITERAL"
8641 > application/x-sh</TT
8642 > which typically would open a download type 
8643  dialog. In my case, I want to look at the shell script, and then I can save
8644  it should I choose to.</P
8645 ><P
8646 ><TABLE
8647 BORDER="0"
8648 BGCOLOR="#E0E0E0"
8649 WIDTH="100%"
8650 ><TR
8651 ><TD
8652 ><PRE
8653 CLASS="SCREEN"
8654 >{ handle-as-text }
8655  /.*\.sh$</PRE
8656 ></TD
8657 ></TR
8658 ></TABLE
8659 >   </P
8660 ><P
8661 > <TT
8662 CLASS="FILENAME"
8663 >user.action</TT
8664 > is generally the best place to define
8665  exceptions and additions to the default policies of
8666  <TT
8667 CLASS="FILENAME"
8668 >default.action</TT
8669 >. Some actions are safe to have their
8670  default policies set here though. So let's set a default policy to have a
8671  <SPAN
8672 CLASS="QUOTE"
8673 >"blank"</SPAN
8674 > image as opposed to the checkerboard pattern for
8675  <SPAN
8676 CLASS="emphasis"
8677 ><I
8678 CLASS="EMPHASIS"
8679 >ALL</I
8680 ></SPAN
8681 > sites. <SPAN
8682 CLASS="QUOTE"
8683 >"/"</SPAN
8684 > of course matches all URL
8685  paths and patterns:</P
8686 ><P
8687 ><TABLE
8688 BORDER="0"
8689 BGCOLOR="#E0E0E0"
8690 WIDTH="100%"
8691 ><TR
8692 ><TD
8693 ><PRE
8694 CLASS="SCREEN"
8695 >{ +<A
8696 HREF="actions-file.html#SET-IMAGE-BLOCKER"
8697 >set-image-blocker{blank}</A
8698 > }
8699 / # ALL sites</PRE
8700 ></TD
8701 ></TR
8702 ></TABLE
8703 ></P
8704 ></DIV
8705 ></DIV
8706 ></DIV
8707 ><DIV
8708 CLASS="NAVFOOTER"
8709 ><HR
8710 ALIGN="LEFT"
8711 WIDTH="100%"><TABLE
8712 SUMMARY="Footer navigation table"
8713 WIDTH="100%"
8714 BORDER="0"
8715 CELLPADDING="0"
8716 CELLSPACING="0"
8717 ><TR
8718 ><TD
8719 WIDTH="33%"
8720 ALIGN="left"
8721 VALIGN="top"
8722 ><A
8723 HREF="config.html"
8724 ACCESSKEY="P"
8725 >Prev</A
8726 ></TD
8727 ><TD
8728 WIDTH="34%"
8729 ALIGN="center"
8730 VALIGN="top"
8731 ><A
8732 HREF="index.html"
8733 ACCESSKEY="H"
8734 >Home</A
8735 ></TD
8736 ><TD
8737 WIDTH="33%"
8738 ALIGN="right"
8739 VALIGN="top"
8740 ><A
8741 HREF="filter-file.html"
8742 ACCESSKEY="N"
8743 >Next</A
8744 ></TD
8745 ></TR
8746 ><TR
8747 ><TD
8748 WIDTH="33%"
8749 ALIGN="left"
8750 VALIGN="top"
8751 >The Main Configuration File</TD
8752 ><TD
8753 WIDTH="34%"
8754 ALIGN="center"
8755 VALIGN="top"
8756 >&nbsp;</TD
8757 ><TD
8758 WIDTH="33%"
8759 ALIGN="right"
8760 VALIGN="top"
8761 >Filter Files</TD
8762 ></TR
8763 ></TABLE
8764 ></DIV
8765 ></BODY
8766 ></HTML
8767 >