[Libreoffice-commits] online.git: net/Socket.hpp

Michael Meeks michael.meeks at collabora.com
Fri Mar 10 11:36:38 UTC 2017


 net/Socket.hpp |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit f4f083e6fe502f684e2ff888fbbba8da0d291134
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Fri Mar 10 11:35:17 2017 +0000

    Cache JS etc. on the client side for 128 days.

diff --git a/net/Socket.hpp b/net/Socket.hpp
index 583d580..98a2978 100644
--- a/net/Socket.hpp
+++ b/net/Socket.hpp
@@ -818,6 +818,10 @@ namespace HttpHelper
 
         response.setContentLength(st.st_size);
         response.set("User-Agent", HTTP_AGENT_STRING);
+        // 60 * 60 * 24 * 128 (days) = 11059200
+        response.set("Cache-Control", "max-age=11059200");
+        response.set("ETag", LOOLWSD_VERSION_HASH);
+
         std::ostringstream oss;
         response.write(oss);
         const std::string header = oss.str();


More information about the Libreoffice-commits mailing list