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