From 802da9dd5d4bc18f46a916eedc0c5c1980a15e59 Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Sun, 17 Mar 2013 20:07:05 +0000 Subject: Imported from /home/lorry/working-area/delta_docbook-xsl/docbook-xsl-1.78.1.tar.bz2. --- webhelp/docs/ch02s02s01.html | 177 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 177 insertions(+) create mode 100644 webhelp/docs/ch02s02s01.html (limited to 'webhelp/docs/ch02s02s01.html') diff --git a/webhelp/docs/ch02s02s01.html b/webhelp/docs/ch02s02s01.html new file mode 100644 index 0000000..311ad0a --- /dev/null +++ b/webhelp/docs/ch02s02s01.html @@ -0,0 +1,177 @@ + + + + +Recommended Apache configurations - - README: Web-based Help from DocBook XML

Recommended Apache configurations

+

If you are serving a long document from an Apache web + server, we recommend you make the following additions or + changes to your httpd.conf or + .htaccess file.

AddDefaultCharSet UTF-8 # 1
+  
+      # 480 weeks
+      <FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$"> # 2
+      Header set Cache-Control "max-age=290304000, public"
+      </FilesMatch>
+      
+      # 2 DAYS
+      <FilesMatch "\.(xml|txt)$">
+      Header set Cache-Control "max-age=172800, public, must-revalidate"
+      </FilesMatch>
+      
+      # 2 HOURS
+      <FilesMatch "\.(html|htm)$">
+      Header set Cache-Control "max-age=7200, must-revalidate"
+      </FilesMatch>
+      
+      # compress text, html, javascript, css, xml:
+      AddOutputFilterByType DEFLATE text/plain # 3
+      AddOutputFilterByType DEFLATE text/html
+      AddOutputFilterByType DEFLATE text/xml
+      AddOutputFilterByType DEFLATE text/css
+      AddOutputFilterByType DEFLATE application/xml
+      AddOutputFilterByType DEFLATE application/xhtml+xml
+      AddOutputFilterByType DEFLATE application/rss+xml
+      AddOutputFilterByType DEFLATE application/javascript
+      AddOutputFilterByType DEFLATE application/x-javascript
+      
+      # Or, compress certain file types by extension:
+      <Files *.html> 
+      SetOutputFilter DEFLATE
+      </Files>
+      

1

See Odd characters in HTML output in Bob + Stayton's book DocBook XSL: The Complete + Guide for more information about this + setting.

2

These lines and those that follow cause the + browser to cache various resources such as bitmaps and + JavaScript files. Note that caching JavaScript files + could cause your users to have stale search indexes if + you update your document since the search index is + stored in JavaScript files.

3

These lines cause the the server to compress html, + css, and JavaScript files and the brower to uncompress + them to improve download performance.

-- cgit v1.2.1