Opened 3 years ago
Last modified 2 years ago
#56 new defect
Drupal Caching
Reported by: | chris | Owned by: | chris |
---|---|---|---|
Priority: | major | Milestone: | Maintenance |
Component: | crin2 | Version: | |
Keywords: | Cc: | peter | |
Estimated Number of Hours: | 0 | Add Hours to Ticket: | 0 |
Billable?: | yes | Total Hours: | 5.35 |
Description
This is a ticket to discuss and then implement some additional caching for the https://www.crin.org/ Drupal site.
Possible options:
- Generating static content from Drupal and serving these to non-logged in users, for example using Boost or something like it.
- Caching PHP generated pages using Nginx.
- Using a caching server such as Varnish.
My preference would for 1. and 2., I can start doing some research on how best to do 2. I'd rather not do 3. if possible due to the complication it would add: php5-fpm -> varnish -> nginx.
Change History (9)
comment:1 Changed 3 years ago by chris
- Add Hours to Ticket changed from 0 to 0.25
- Total Hours set to 0.25
comment:2 Changed 3 years ago by chris
- Add Hours to Ticket changed from 0 to 0.25
- Total Hours changed from 0.25 to 0.5
comment:3 Changed 3 years ago by chris
- Add Hours to Ticket changed from 0 to 1
- Total Hours changed from 0.5 to 1.5
This approach is interesting, simply caching for anon users for a very short amount of time, https://github.com/perusio/drupal-with-nginx#microcaching-and-drupal I think we could use this config: https://github.com/perusio/drupal-with-nginx/blob/D7/apps/drupal/microcache_fcgi.conf
But I can't see how the above works out who is authenticated and who isn't, so it is a security risk (we don't want unauthenticated users getting content cached for authenticated users!), so scrap that idea.
This is another approach, nice and simple: https://help.knthost.com/nginx/set-fastcgi-caching-with-nginx but it only caches when no cookies are set and the site sets cookies for anon users so we can't only cache for requests without cookies, for example, request the front page, no cookies set for index.php:
GET / HTTP/1.1 Host: www.crin.org User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate, br DNT: 1 Connection: keep-alive HTTP/1.1 200 OK Server: nginx/1.6.2 Date: Thu, 07 Jan 2016 14:03:29 GMT Content-Type: text/html; charset=utf-8 x-drupal-cache: HIT Etag: "1452166182-1" Content-Language: en x-ua-compatible: IE=edge,chrome=1 Link: </en/welcome-crin>; rel="canonical",</en/node/1>; rel="shortlink" x-generator: Drupal 7 (http://drupal.org) Cache-Control: public, max-age=86400 Last-Modified: Thu, 07 Jan 2016 11:29:42 +0000 Expires: Sun, 19 Nov 1978 05:00:00 GMT Vary: Cookie, Accept-Encoding Content-Encoding: gzip Strict-Transport-Security: max-age=15768000 X-Frame-Options: SAMEORIGIN X-Firefox-Spdy: 3.1
So that is good, but then a cookie is sent on an image:
GET /sites/all/themes/crin/images/opacity/black_75.png HTTP/1.1 Host: www.crin.org User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0 Accept: image/png,image/*;q=0.8,*/*;q=0.5 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate, br DNT: 1 Referer: https://www.crin.org/sites/all/themes/crin/css/reset.whu.css Cookie: has_js=1 Connection: keep-alive HTTP/1.1 200 OK Server: nginx/1.6.2 Date: Thu, 07 Jan 2016 14:03:33 GMT Content-Type: image/png Content-Length: 934 Last-Modified: Tue, 08 Sep 2015 10:59:25 GMT Etag: "55eebf8d-3a6" Expires: Thu, 31 Dec 2037 23:55:55 GMT Cache-Control: max-age=315360000 Strict-Transport-Security: max-age=15768000 X-Frame-Options: SAMEORIGIN Accept-Ranges: bytes X-Firefox-Spdy: 3.1
This cookie must be set using Javascript since it wasn't set in a HTTP header.
This cookie and some others are then sent with a request for another page, for example:
GET /en/home/about HTTP/1.1 Host: www.crin.org User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate, br DNT: 1 Referer: https://www.crin.org/ Cookie: has_js=1; ccShowCookieIcon=no; crin_cookiecontrol=yes Connection: keep-alive HTTP/1.1 200 OK Server: nginx/1.6.2 Date: Thu, 07 Jan 2016 14:09:40 GMT Content-Type: text/html; charset=utf-8 x-drupal-cache: HIT Etag: "1452166979-1" Content-Language: en x-ua-compatible: IE=edge,chrome=1 Link: </en/home/about>; rel="canonical",</en/node/11>; rel="shortlink" x-generator: Drupal 7 (http://drupal.org) Cache-Control: public, max-age=86400 Last-Modified: Thu, 07 Jan 2016 11:42:59 +0000 Expires: Sun, 19 Nov 1978 05:00:00 GMT Vary: Cookie, Accept-Encoding Content-Encoding: gzip Strict-Transport-Security: max-age=15768000 X-Frame-Options: SAMEORIGIN X-Firefox-Spdy: 3.1
But that page also suggests an answer, not caching POSTs and not caching when there is a cookie that is set on authentication:
Here is an example using cookies.
map $http_cookie $nocache { default 0; ~SESS 1; # Drupal session cookie ~wordpress_logged_in 1; # Wordpress session cookie }Here is an example using request methods.
#Cache Request Method Bypass map $request_method $no_cache { default 0; POST 1; # Do not cache post requests }
Peter -- how does this approach sound to you? Should I spend some time setting this up on the dev server so we can do some testing?
comment:4 Changed 3 years ago by chris
- Add Hours to Ticket changed from 0 to 3
- Total Hours changed from 1.5 to 4.5
Following up on ticket:56#comment:3, first identify which cookies, if set, indicated that the user has logged in, testing on the https://dev.crin.org/ server on Crin4, first get a login:
cd /var/www/dev/docroot drush uli
The HTTP headers before logging in and before HTTP authentication:
GET / HTTP/1.1 Host: dev.crin.org User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate, br DNT: 1 Connection: keep-alive HTTP/1.1 401 Unauthorized Server: nginx/1.6.2 Date: Mon, 11 Jan 2016 10:10:20 GMT Content-Type: text/html; charset=UTF-8 x-drupal-cache: HIT WWW-Authenticate: Basic realm="Authenticate for access" X-Firefox-Spdy: 3.1
The HTTP header after HTTP authentication, note the Authorization header has been edited before pasting it here:
GET / HTTP/1.1 Host: dev.crin.org User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate, br DNT: 1 Connection: keep-alive Authorization: Basic pu8BaiTieGhahfaF HTTP/1.1 200 OK Server: nginx/1.6.2 Date: Mon, 11 Jan 2016 10:10:32 GMT Content-Type: text/html; charset=utf-8 x-drupal-cache: HIT Etag: "1452506582-1" Content-Language: en x-ua-compatible: IE=edge,chrome=1 Link: </en/welcome-crin>; rel="canonical",</en/node/1>; rel="shortlink" x-generator: Drupal 7 (http://drupal.org) Cache-Control: public, max-age=86400 Last-Modified: Mon, 11 Jan 2016 10:03:02 +0000 Expires: Sun, 19 Nov 1978 05:00:00 GMT Vary: Cookie, Accept-Encoding Content-Encoding: gzip Strict-Transport-Security: max-age=15768000 X-Frame-Options: SAMEORIGIN X-Firefox-Spdy: 3.1
No cookies so far... The first cookie is set after 1775 lines of HTTP headers have been logged by Firefox Live HTTP Headers:
GET /sites/all/themes/crin/images/opacity/black_75.png HTTP/1.1 Host: dev.crin.org User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0 Accept: image/png,image/*;q=0.8,*/*;q=0.5 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate, br DNT: 1 Referer: https://dev.crin.org/sites/all/themes/crin/css/reset.whu.css Cookie: has_js=1 Authorization: Basic pu8BaiTieGhahfaF Connection: keep-alive HTTP/1.1 200 OK Server: nginx/1.6.2 Date: Mon, 11 Jan 2016 10:10:36 GMT Content-Type: image/png Content-Length: 934 Last-Modified: Mon, 07 Sep 2015 15:06:38 GMT Etag: "55eda7fe-3a6" Expires: Thu, 31 Dec 2037 23:55:55 GMT Cache-Control: max-age=315360000 Strict-Transport-Security: max-age=15768000 X-Frame-Options: SAMEORIGIN Accept-Ranges: bytes X-Firefox-Spdy: 3.1
After clicking on a link to the About page a couple more cookies are being set:
GET /en/home/about HTTP/1.1 Host: dev.crin.org User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate, br DNT: 1 Referer: https://dev.crin.org/ Cookie: has_js=1; ccShowCookieIcon=no; crin_cookiecontrol=yes Authorization: Basic pu8BaiTieGhahfaF Connection: keep-alive HTTP/1.1 200 OK Server: nginx/1.6.2 Date: Mon, 11 Jan 2016 10:29:35 GMT Content-Type: text/html; charset=utf-8 x-drupal-cache: MISS Etag: "1452508168-1" Content-Language: en x-ua-compatible: IE=edge,chrome=1 Link: </en/home/about>; rel="canonical",</en/node/11>; rel="shortlink" x-generator: Drupal 7 (http://drupal.org) Cache-Control: public, max-age=86400 Last-Modified: Mon, 11 Jan 2016 10:29:28 +0000 Expires: Sun, 19 Nov 1978 05:00:00 GMT Vary: Cookie, Accept-Encoding Content-Encoding: gzip Strict-Transport-Security: max-age=15768000 X-Frame-Options: SAMEORIGIN X-Firefox-Spdy: 3.1
And after the login POST (again strings edited for security):
GET /en/user/reset/1/1452506923/chaengah7lu7ua5ein3iequeic4Eique/login HTTP/1.1 Host: dev.crin.org User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate, br DNT: 1 Cookie: has_js=1; ccShowCookieIcon=no; crin_cookiecontrol=yes Authorization: Basic pu8BaiTieGhahfaF Connection: keep-alive HTTP/1.1 302 Moved Temporarily Server: nginx/1.6.2 Date: Mon, 11 Jan 2016 10:35:20 GMT Content-Type: text/html; charset=UTF-8 x-drupal-cache: MISS Expires: Sun, 19 Nov 1978 05:00:00 GMT Last-Modified: Mon, 11 Jan 2016 10:35:17 +0000 Cache-Control: no-cache, must-revalidate, post-check=0, pre-check=0 Etag: "1452508517" Location: https://dev.crin.org/en/user/password Set-Cookie: SSESSeutaezew4QuieTu7be0wahlae3kiek9c=fo7xoh5eug6SaimeRi8eiquoigeiphah; expires=Wed, 03-Feb-2016 14:08:40 GMT; Max-Age=2000000; path=/; domain=.dev.crin.org; secure; HttpOnly Strict-Transport-Security: max-age=15768000 X-Frame-Options: SAMEORIGIN X-Firefox-Spdy: 3.1
So it looks like the advice in the referenced article is good, simply don't cache if a cookie that contains SESS exists.
So editing the Nginx config, in the http context in /etc/nginx/nginx.conf the following was added:
# https://trac.crin.org.archived.website/trac/ticket/56 fastcgi_cache_path /dev/shm/cache levels=1:2 keys_zone=cache:100m inactive=60m; fastcgi_cache_key "$scheme$request_method$host$request_uri"; map $http_cookie $nocache { default 0; ~SESS 1; }
And in /etc/nginx/sites-available/dev.crin.org for both port 80 and 443 the following was added to location ~ \.php$:
# Caching, see https://trac.crin.org.archived.website/trac/ticket/56 fastcgi_cache cache; fastcgi_cache_valid 200 301 302 60m; fastcgi_cache_bypass $nocache; add_header PHP-Cache $upstream_cache_status;
Nginx was restarted and testing by using a browser set not to save any session data, restarting it and requesting the front page twice:
GET / HTTP/1.1 Host: dev.crin.org User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate, br DNT: 1 Cookie: has_js=1; ccShowCookieIcon=no; crin_cookiecontrol=yes Authorization: Basic pu8BaiTieGhahfaF Connection: keep-alive If-None-Match: "1452506582-1" Cache-Control: max-age=0 HTTP/1.1 304 Not Modified Server: nginx/1.6.2 Date: Mon, 11 Jan 2016 11:35:14 GMT x-drupal-cache: HIT Etag: "1452506582-1" Content-Language: en x-ua-compatible: IE=edge,chrome=1 Link: </en/welcome-crin>; rel="canonical",</en/node/1>; rel="shortlink" x-generator: Drupal 7 (http://drupal.org) Cache-Control: public, max-age=86400 Last-Modified: Mon, 11 Jan 2016 10:03:02 +0000 Expires: Sun, 19 Nov 1978 05:00:00 GMT Vary: Cookie, Accept-Encoding php-cache: HIT X-Firefox-Spdy: 3.1
We have this HTTP header:
php-cache: HIT
So it is working, testing with a session cookie:
GET /en HTTP/1.1 Host: dev.crin.org User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate, br DNT: 1 Referer: https://dev.crin.org/en/home/events-calendar Cookie: has_js=1; ccShowCookieIcon=no; crin_cookiecontrol=yes; SSESSWohzohsee5egh7feij5maeb9Oijahvo1=pha6lu6Ahnga9geemiesh0IeLeeleesu Authorization: Basic pu8BaiTieGhahfaF Connection: keep-alive If-Modified-Since: Mon, 11 Jan 2016 12:27:12 +0000 HTTP/1.1 200 OK Server: nginx/1.6.2 Date: Mon, 11 Jan 2016 12:43:55 GMT Content-Type: text/html; charset=utf-8 Expires: Sun, 19 Nov 1978 05:00:00 GMT Last-Modified: Mon, 11 Jan 2016 12:43:54 +0000 Cache-Control: no-cache, must-revalidate, post-check=0, pre-check=0 Content-Language: en x-ua-compatible: IE=edge,chrome=1 x-generator: Drupal 7 (http://drupal.org) Link: </en/welcome-crin>; rel="canonical",</en/node/1>; rel="shortlink" php-cache: BYPASS Content-Encoding: gzip X-Firefox-Spdy: 3.1
We have php-cache: BYPASS. I have spent some time testing this and looking at headers and I'm fairly confident it works OK.
Peter, for how long should we cache PHP generated pages, which are served to anon user? Is one hour too much, consider for example if a typo is fixed in a page, it could be an hour before a users sees the correction? On the other hand there are thousands of pages on the site that will probably never be edited again and these could be cached for a long time without a problem, so is an hour a reasonable time? Can you do some testing and let me know if you are happy for these changes to be deployed on the live server?
comment:5 Changed 3 years ago by chris
- Add Hours to Ticket changed from 0 to 0.1
- Total Hours changed from 4.5 to 4.6
Peter can you have a read through this thread when you have a chance?
I have implemented the caching in RAM of PHP generated pages for non-authenticated users for upto 1 hour on https://dev.crin.org/ and was wondering if you could check that it is OK to deploy these changes to the live server.
Ideally we would have some Drupal code in place to invalidate pages in the cache so that things could be cached for a lot longer, but without that I think this is probably the best we can do given the time constraints (I have done 7.2 of my 8.5 hours for Jan already).
comment:6 follow-up: ↓ 7 Changed 3 years ago by peter
Hi Chris You are taking the right path. Micro cache is much simpler than trying to integrate invalidation. The session cookie is only set if we have a session, so don't cache if it exists. My only concern is ssl. Most of the time we have to do a fair bit of fiddling with terminating ssl sessions. If that's not an issue for you, I think we should try your route. On Tue, 12 Jan 2016 09:48 CRIN Trac <trac@trac.crin.org> wrote: > #56: Drupal Caching > ------------------------------------+----------------------------------- > Reporter: chris | Owner: chris > Type: defect | Status: new > Priority: major | Milestone: Maintenance > Component: crin2 | Version: > Resolution: | Keywords: > Estimated Number of Hours: 0 | Add Hours to Ticket: 0.1 > Billable?: 1 | Total Hours: 4.5 > ------------------------------------+----------------------------------- > Changes (by chris): > > * hours: 0 => 0.1 > * totalhours: 4.5 => 4.6 > > > Comment: > > Peter can you have a read through this thread when you have a chance? > > I have implemented the caching in RAM of PHP generated pages for non- > authenticated users for upto 1 hour on https://dev.crin.org/ and was > wondering if you could check that it is OK to deploy these changes to the > live server. > > Ideally we would have some Drupal code in place to invalidate pages in the > cache so that things could be cached for a lot longer, but without that I > think this is probably the best we can do given the time constraints (I > have done 7.2 of my 8.5 hours for Jan already). > > -- > Ticket URL: <https://trac.crin.org.archived.website/trac/ticket/56#comment:5> > CRIN Trac <https://trac.crin.org.archived.website/trac> > Trac project for CRIN website and servers. >
comment:7 in reply to: ↑ 6 Changed 3 years ago by chris
- Add Hours to Ticket changed from 0 to 0.15
- Total Hours changed from 4.6 to 4.75
Replying to peter:
You are taking the right path. Micro cache is much simpler than trying to
integrate invalidation. The session cookie is only set if we have a
session, so don't cache if it exists.
Cool, that is what has been implemented on https://dev.crin.org/
My only concern is ssl. Most of the time we have to do a fair bit of
fiddling with terminating ssl sessions. If that's not an issue for you, I
think we should try your route.
Could you explain more regarding what you do in terms of terminating ssl sessions?
The code on the dev server is set to cache HTTP and HTTPS separately, using the $scheme (and HEAD and GET separately via $request_method):
fastcgi_cache_key "$scheme$request_method$host$request_uri";
Is that OK or should they be combined? Is there any difference between a HTTP page and a HTTPS page? Does the site use fully qualified URLs internally?
comment:8 Changed 3 years ago by chris
- Add Hours to Ticket changed from 0 to 0.25
- Total Hours changed from 4.75 to 5.0
Peter, if you have time I'd appreciate it if you could answer my queries in this comment regarding Drupal caching:
Could you explain more regarding what you do in terms of terminating ssl sessions?
The code on the dev server is set to cache HTTP and HTTPS separately, using the $scheme (and HEAD and GET separately via $request_method):
fastcgi_cache_key "$scheme$request_method$host$request_uri";Is that OK or should they be combined? Is there any difference between a HTTP page and a HTTPS page? Does the site use fully qualified URLs internally?
I have a couple of hours to spend on sorting this out before the end of the month.
I note that testing on the dev server is tricky with most the media files being referenced from the sites and module domains, it looks like the server domain name is missing from all these URLs?
<link type="text/css" rel="stylesheet" href="//fast.fonts.net/cssapi/aa8b2923-e2a8-42a3-9234-ca386868f1ef.css"/> <style>@import url("https:///modules/system/system.base.css?o2p7y3");</style> <style media="screen">@import url("https:///sites/all/modules/contrib/views_slideshow/views_slideshow.css?o2p7y3");</style> <style>@import url("https:///sites/all/modules/contrib/simplenews/simplenews.css?o2p7y3"); @import url("https:///sites/all/modules/contrib/date/date_api/date.css?o2p7y3"); @import url("https:///sites/all/modules/contrib/date/date_popup/themes/datepicker.1.7.css?o2p7y3"); @import url("https:///sites/all/modules/contrib/domain/domain_nav/domain_nav.css?o2p7y3"); @import url("https:///modules/field/theme/field.css?o2p7y3"); @import url("https:///sites/all/modules/contrib/logintoboggan/logintoboggan.css?o2p7y3"); @import url("https:///modules/node/node.css?o2p7y3"); @import url("https:///modules/search/search.css?o2p7y3"); @import url("https:///modules/user/user.css?o2p7y3"); @import url("https:///sites/all/modules/contrib/imagefield_focus_adjust/imagefield_focus_adjust.css?o2p7y3"); @import url("https:///sites/all/modules/contrib/views/css/views.css?o2p7y3");</style> <style>@import url("https:///sites/all/modules/contrib/ckeditor/ckeditor.css?o2p7y3"); @import url("https:///sites/all/modules/contrib/ctools/css/ctools.css?o2p7y3"); @import url("https:///modules/locale/locale.css?o2p7y3"); @import url("https:///sites/all/modules/contrib/quicktabs/css/quicktabs.css?o2p7y3"); @import url("https:///sites/all/modules/contrib/views_slideshow/contrib/views_slideshow_cycle/views_slideshow_cycle.css?o2p7y3");</style> <style>@import url("https:///sites/all/themes/crin/css/styles.css?o2p7y3");</style> <script src="https:///sites/default/files/js/js_zzcIWOou_jnX0ZWAIA4sb6Xy_p5a8FZNA0GySvuWjPU.js"></script> <script src="https:///sites/default/files/js/js_obFUyTbqtcoGQtszVI46l1_oD927PzlDtlr_ilpYBqE.js"></script> <script src="https:///sites/default/files/js/js_F0BwH9XkEvKCdjXtGiDUtDRkKD1C4iNwuQheIiN3KvI.js"></script> <script src="https:///sites/default/files/js/js_ZwtHh_UtMhEyIZ7P23uU_tO_tZHXgPG1rk11b_m8s9Y.js"></script> <script src="//maps.googleapis.com/maps/api/js?sensor=false"></script> <script src="https:///sites/default/files/js/js__vk4uJ31jQ90YCK0mU4aAzGVSXFDW2lF8U96ngcok_I.js"></script> <script src="https://google-maps-utility-library-v3.googlecode.com/svn/trunk/infobubble/src/infobubble-compiled.js"></script> <script src="https:///sites/default/files/js/js_IaQ0_bIKqffX9ubuieWtoxMpopHr-io4-k6HRwRks-A.js"></script> <script>var _paq = _paq || [];(function(){var u=(("https:" == document.location.protocol) ? "https://stats.crin.org/" : "http://stats.crin.org/");_paq.push(["setSiteId", "1"]);_paq.push(["setTrackerUrl", u+"piwik.php"]);_paq.push(["setDoNotTrack", 1]);_paq.push(["trackPageView"]);_paq.push(["setIgnoreClasses", ["no-tracking","colorbox"]]);_paq.push(["enableLinkTracking"]);var d=document,g=d.createElement("script"),s=d.getElementsByTagName("script")[0];g.type="text/javascript";g.defer=true;g.async=true;g.src=u+"piwik.js";s.parentNode.insertBefore(g,s);})();</script> <script src="https:///sites/default/files/js/js_bpF8tSRIO0CI5UAcbFNIjK_z7s-hqS8RAsjoOKKn-9M.js"></script> <script src="https:///sites/default/files/js/js_xAWuHMfE-FK2kOM06XgJRqanCFZcCjCFCc5vX4pji5U.js"></script> <script>jQuery.extend(Drupal.settings, {"basePath":"\/","pathPrefix":"en\/","ajaxPageState":{"theme":"crin","theme_token":"bxsmuC1pciikFJBjm5n7vNhrA3pot0ExuN0eU2Ljb7w","js":{"0":1,"1":1,"2":1,"3":1,"sites\/all\/modules\/contrib\/jquery_update\/replace\/jquery\/1.5\/jquery.min.js":1,"misc\/jquery.once.js":1,"misc\/drupal.js":1,"sites\/all\/modules\/contrib\/views_slideshow\/js\/views_slideshow.js":1,"sites\/all\/modules\/contrib\/cookiecontrol\/js\/cookieControl-5.1.min.js":1,"sites\/all\/modules\/contrib\/imagefield_focus_adjust\/imagefield_focus_adjust.js":1,"misc\/progress.js":1,"\/\/maps.googleapis.com\/maps\/api\/js?sensor=false":1,"sites\/all\/modules\/contrib\/google_map_field\/js\/google_map_field_node_display.js":1,"sites\/all\/modules\/contrib\/google_map_field_extend\/js\/google_map_field_extend_display.js":1,"https:\/\/google-maps-utility-library-v3.googlecode.com\/svn\/trunk\/infobubble\/src\/infobubble-compiled.js":1,"sites\/all\/modules\/contrib\/quicktabs\/js\/quicktabs.js":1,"sites\/all\/modules\/contrib\/piwik\/piwik.js":1,"4":1,"sites\/all\/libraries\/jquery.cycle\/jquery.cycle.all.js":1,"sites\/all\/modules\/contrib\/views_slideshow\/contrib\/views_slideshow_cycle\/js\/views_slideshow_cycle.js":1,"sites\/all\/themes\/crin\/js\/script.js":1},"css":{"modules\/system\/system.base.css":1,"modules\/system\/system.menus.css":1,"modules\/system\/system.messages.css":1,"modules\/system\/system.theme.css":1,"sites\/all\/modules\/contrib\/views_slideshow\/views_slideshow.css":1,"sites\/all\/modules\/contrib\/simplenews\/simplenews.css":1,"sites\/all\/modules\/contrib\/date\/date_api\/date.css":1,"sites\/all\/modules\/contrib\/date\/date_popup\/themes\/datepicker.1.7.css":1,"sites\/all\/modules\/contrib\/domain\/domain_nav\/domain_nav.css":1,"modules\/field\/theme\/field.css":1,"sites\/all\/modules\/contrib\/logintoboggan\/logintoboggan.css":1,"modules\/node\/node.css":1,"modules\/search\/search.css":1,"modules\/user\/user.css":1,"sites\/all\/modules\/contrib\/imagefield_focus_adjust\/imagefield_focus_adjust.css":1,"sites\/all\/modules\/contrib\/views\/css\/views.css":1,"sites\/all\/modules\/contrib\/ckeditor\/ckeditor.css":1,"sites\/all\/modules\/contrib\/ctools\/css\/ctools.css":1,"modules\/locale\/locale.css":1,"sites\/all\/modules\/contrib\/quicktabs\/css\/quicktabs.css":1,"sites\/all\/modules\/contrib\/views_slideshow\/contrib\/views_slideshow_cycle\/views_slideshow_cycle.css":1,"sites\/all\/themes\/crin\/system.menus.css":1,"sites\/all\/themes\/crin\/system.messages.css":1,"sites\/all\/themes\/crin\/system.theme.css":1,"sites\/all\/themes\/crin\/css\/styles.css":1,"public:\/\/google_fonts.css":1}},"quicktabs":{"qt_countr-tabs":{"name":"countr-tabs","tabs":[[],[],[],[],[]],"ajaxPageState":{"theme":"crin","theme_token":"bxsmuC1pciikFJBjm5n7vNhrA3pot0ExuN0eU2Ljb7w"}}},"piwik":{"trackMailto":1},"viewsSlideshow":{"promotional_content-block_1":{"methods":{"goToSlide":["viewsSlideshowPager","viewsSlideshowSlideCounter","viewsSlideshowCycle"],"nextSlide":["viewsSlideshowPager","viewsSlideshowSlideCounter","viewsSlideshowCycle"],"pause":["viewsSlideshowControls","viewsSlideshowCycle"],"play":["viewsSlideshowControls","viewsSlideshowCycle"],"previousSlide":["viewsSlideshowPager","viewsSlideshowSlideCounter","viewsSlideshowCycle"],"transitionBegin":["viewsSlideshowPager","viewsSlideshowSlideCounter"],"transitionEnd":[]},"paused":0}},"viewsSlideshowPager":{"promotional_content-block_1":{"bottom":{"type":"viewsSlideshowPagerFields"}}},"viewsSlideshowPagerFields":{"promotional_content-block_1":{"bottom":{"activatePauseOnHover":0}}},"viewsSlideshowCycle":{"#views_slideshow_cycle_main_promotional_content-block_1":{"num_divs":2,"id_prefix":"#views_slideshow_cycle_main_","div_prefix":"#views_slideshow_cycle_div_","vss_id":"promotional_content-block_1","effect":"fade","transition_advanced":0,"timeout":5000,"speed":700,"delay":0,"sync":1,"random":0,"pause":1,"pause_on_click":0,"action_advanced":0,"start_paused":0,"remember_slide":0,"remember_slide_days":1,"pause_in_middle":0,"pause_when_hidden":0,"pause_when_hidden_type":"full","amount_allowed_visible":"","nowrap":0,"fixed_height":1,"items_per_slide":1,"wait_for_image_load":1,"wait_for_image_load_timeout":3000,"cleartype":0,"cleartypenobg":0,"advanced_options":"{}"}}});</script> <!--[if lt IE 9]> <script src="/sites/all/themes/zen/js/html5-respond.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="/sites/all/libraries/chosen/chosen.css" media="screen"> <script src="/sites/all/libraries/chosen/chosen.jquery.min.js"></script>
Is this something that can be easily fixed?
I also noticed that you added a new ssh account to Crin2, should I set up a corresponding Trac account? If so could you let me have a email address for the account?
comment:9 Changed 2 years ago by chris
- Add Hours to Ticket changed from 0 to 0.35
- Total Hours changed from 5.0 to 5.35
This is to record the time spend sending a email to CRIN asking if Codepositive are still working on the site due to unanswered questions above.
Loading the front page generated these requests (as listed by Pingdom Website Speed Test):
The number of CSS and Javascript files could possible be reduced in number using Minify or something like it?
I have tried using https://redbot.org/ to test the cachability of the resources, but the site robots.txt prevents access to some of the CSS files, for example:
However for others it is OK:
We do have decent cache friendly headers on CSS files, for example the above file has:
And it is the same for the Javascript files:
So simply reducing the number of these is probably enough.
Looking at the front page we also have OK cache headers and it looks like we also have Drupal caching already:
So I think the next thing todo is to consider using Nginx and/or Fast-CGI for caching, some documentation on this here: