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