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