From patchwork Wed Feb 22 22:52:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Compagnucci X-Patchwork-Id: 731336 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vTCLx2qYYz9s06 for ; Thu, 23 Feb 2017 09:52:56 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="bHxbnrbM"; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id DF295C1EF9; Wed, 22 Feb 2017 22:52:53 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0B2S84CUUE0r; Wed, 22 Feb 2017 22:52:53 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 3DBE4C1F05; Wed, 22 Feb 2017 22:52:53 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id EF0021BFBAD for ; Wed, 22 Feb 2017 22:52:51 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id EA61B3108C for ; Wed, 22 Feb 2017 22:52:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iHohBkrDKbUq for ; Wed, 22 Feb 2017 22:52:51 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr0-f195.google.com (mail-wr0-f195.google.com [209.85.128.195]) by silver.osuosl.org (Postfix) with ESMTPS id 1AA9E31087 for ; Wed, 22 Feb 2017 22:52:51 +0000 (UTC) Received: by mail-wr0-f195.google.com with SMTP id 89so2124651wrr.1 for ; Wed, 22 Feb 2017 14:52:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=uQyFQeXaGpnBcsksRiuO1SLt1BndoKRyMptr/Tbyg50=; b=bHxbnrbM8mKTHqjkNFFCUBUrkiA+2xNenoACiZpLa/GpBKfJ+vxfiafIYLjSKaWHcJ znjDGsvv/NVPt4n9nCs+DfSgOcXVkwfBYAoMLen+at2VG2k+RJP1m9Db1JrW1IY4+s+N aPEaaL6x+01agTBySFWNNSD7k5An2YD5FAted47vU65rxv1KKORdMKssS+aPnTSIkkEB S6UWJZzRt17mOaM8Jax3V4RtqjBaYR/7a2YHTa82Y4wAe7869tIC/8OURHdFoEcIiZQ3 W5XUwd5RySddeNw918AoXXdy7xxS8r9JB47hWmgFmYK/1IVZD+kby5t5FEc/UVQHEhzu PR7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=uQyFQeXaGpnBcsksRiuO1SLt1BndoKRyMptr/Tbyg50=; b=DK8SCyucF5zosP91s+/Eie26mb1PUXOyYEeKLUz4tx0SDpeZwYIPwWmAa0ya6y+VCM 9qMdvVxLclfYN6aRvo7wFUFbkIkhMx3PfS2NQVFtw+lRAv3CqtnBkpVz9URJoVg/T76g Z4Fcw2KWPGQDh/DVcw++O37d8iuEU1w0GZWd4zW8YPtN21fPdsPu+kwsGOa8Mm1t1nIC bVVGZgaehL3QZMB0VG0bJDITxOojkcX9SwasKPWaAyGtV2jliXU7sz6NaDUzfDkT+mxA dGO2sX3PdV0aJTAkO2d9JDESiIpINgD+OQpNuYbFmEo3Wop9h5c5MFSYtu+Bd3T/pZCb YwlQ== X-Gm-Message-State: AMke39ng7mnVwus2JG7viXYpp4V4/Rvtak+pE5xW+kt3OVmOnBH63fPM2GKJky8woeEWxg== X-Received: by 10.223.169.164 with SMTP id b33mr28347074wrd.132.1487803969274; Wed, 22 Feb 2017 14:52:49 -0800 (PST) Received: from localhost.localdomain ([89.202.204.147]) by smtp.gmail.com with ESMTPSA id b51sm3455948wrd.39.2017.02.22.14.52.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 22 Feb 2017 14:52:48 -0800 (PST) From: Angelo Compagnucci To: buildroot@buildroot.org Date: Wed, 22 Feb 2017 23:52:36 +0100 Message-Id: <1487803956-24668-1-git-send-email-angelo.compagnucci@gmail.com> X-Mailer: git-send-email 2.7.4 Subject: [Buildroot] [PATCH] docs/website: Improving website speed X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Currently the buildroot website is not leveraging common techniques to have a better loading speed (browser caching, gzip compression, deflating). This commit provides an .htaccess files with all the needed to enable mentioned features. This .htaccess only works if the webserver has deflate, expires and headers modules enabled. Signed-off-by: Angelo Compagnucci Reviewed-by: Arnout Vandecappelle (Essensium/Mind) --- docs/website/.htaccess | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 docs/website/.htaccess diff --git a/docs/website/.htaccess b/docs/website/.htaccess new file mode 100644 index 0000000..b02beb8 --- /dev/null +++ b/docs/website/.htaccess @@ -0,0 +1,62 @@ +# BEGIN Compress text files + + + SetOutputFilter DEFLATE + + +# END Compress text files + +# BEGIN Expire headers + + ExpiresActive On + ExpiresDefault "access plus 1 seconds" + ExpiresByType image/x-icon "access plus 2592000 seconds" + ExpiresByType image/jpeg "access plus 2592000 seconds" + ExpiresByType image/png "access plus 2592000 seconds" + ExpiresByType image/gif "access plus 2592000 seconds" + ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds" + ExpiresByType text/css "access plus 604800 seconds" + ExpiresByType text/javascript "access plus 216000 seconds" + ExpiresByType application/javascript "access plus 216000 seconds" + ExpiresByType application/x-javascript "access plus 216000 seconds" + ExpiresByType text/html "access plus 600 seconds" + ExpiresByType application/xhtml+xml "access plus 600 seconds" + +# END Expire headers + +# BEGIN Cache-Control Headers + + + Header set Cache-Control "max-age=2592000, public" + + + Header set Cache-Control "max-age=604800, public" + + + Header set Cache-Control "max-age=216000, private" + + + Header set Cache-Control "max-age=600, private, must-revalidate" + + +# END Cache-Control Headers + +# BEGIN Turn ETags Off + + Header unset ETag + +FileETag None +# END Turn ETags Off + +# BEGIN gzip + +mod_gzip_on Yes +mod_gzip_dechunk Yes +mod_gzip_item_include file .(html?|txt|css|js)$ +mod_gzip_item_include handler ^cgi-script$ +mod_gzip_item_include mime ^text/.* +mod_gzip_item_include mime ^application/x-javascript.* +mod_gzip_item_exclude mime ^image/.* +mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.* + +# END gzip