<p>So... just to be clear. This <code>/style.css</code> is a static asset, it's not sitting in the <code>craft/templates</code> folder, right?</p>

<p>Assuming that's the case, something is definitely wrong if <code>https</code> is taking 2 seconds to load it. Sounds like something with your server is misconfigured.</p>

<p>How are you measuring this, exactly?</p>

CC BY-SA 3.0
2017-09-07T16:44:38.123Z
It's serving from inside the templates folder and all other assets like JS and extra CSS are in that folder, within the Craft folder.  I am assuming I need to put that in public, that would make sense.  Ok let me do that and see how it effects the speed.
Vin
CC BY-SA 3.0
2017-09-07T16:59:18.117Z
That was it! I was serving my CSS and JS and some assets from /craft/templates not public_html/.  That shaved 2 seconds off the time. Boom!
Vin
CC BY-SA 3.0
2017-09-07T17:06:29.340Z
To answer your other question, using a few tools, but mainly gtmetrix.
Vin
CC BY-SA 3.0
2017-09-07T03:24:51.403Z
2017-09-07T03:24:51.403Z
andrew.welch
<p>My main config is Apache/Centos 7/WHM/Redis/OPCache/PHP7.1/MariaDb/PHP-fpm/Http2 and have optimized my server to a great degree.  It's a 32GB dedicated HexaCore.  I have worked really diligent to get the server optimized over the last few weeks and the state it currently is in, it's pretty dang fast.  Now so you know I am not tooting my own horn, I will preface by saying this, I am the furthest away from a server admin as anyone can be, but I get by.</p>

<p><strong>My question is:</strong> When serving up an local asset like CSS (/style.css) over HTTPS it takes about 2 seconds longer to load. A big part is the time of 800+ms for the style.css to load over https, ugh. So I am asking how can I use http2 to my advantage with Craft? I want to run in HTTPS all the time but not with the handshaking lag. Any suggestions or examples would be greatly appreciated.</p>

<p>In case you are tempted to say go Nginx, I would love too but unless you are volunteering, at this time I cannot put myself through an Nginx install.</p>

<p>Thanks!</p>

<server><apache><ssl><speed><optimization>
Optimizing With Http2 In Mind
# Optimizing With Http2 In Mind

(Asked by: username_0 on 2017-09-07)

My main config is Apache/Centos 7/WHM/Redis/OPCache/PHP7.1/MariaDb/PHP-fpm/Http2 and have optimized my server to a great degree. It's a 32GB dedicated HexaCore. I have worked really diligent to get the server optimized over the last few weeks and the state it currently is in, it's pretty dang fast. Now so you know I am not tooting my own horn, I will preface by saying this, I am the furthest away from a server admin as anyone can be, but I get by.

**My question is:** When serving up an local asset like CSS (/style.css) over HTTPS it takes about 2 seconds longer to load. A big part is the time of 800+ms for the style.css to load over https, ugh. So I am asking how can I use http2 to my advantage with Craft? I want to run in HTTPS all the time but not with the handshaking lag. Any suggestions or examples would be greatly appreciated.

In case you are tempted to say go Nginx, I would love too but unless you are volunteering, at this time I cannot put myself through an Nginx install.

Thanks!

**Tags:** server, apache, ssl, speed, optimization


---

## 1 answers

### Answer by username_1 on 2017-09-07. Score: 2 | Accepted answer

So... just to be clear. This `/style.css` is a static asset, it's not sitting in the `craft/templates` folder, right?

Assuming that's the case, something is definitely wrong if `https` is taking 2 seconds to load it. Sounds like something with your server is misconfigured.

How are you measuring this, exactly?

> **Comments:**
> **username_0**: It's serving from inside the templates folder and all other assets like JS and extra CSS are in that folder, within the Craft folder.  I am assuming I need to put that in public, that would make sense.  Ok let me do that and see how it effects the speed.  
> **username_0**: That was it! I was serving my CSS and JS and some assets from /craft/templates not public_html/.  That shaved 2 seconds off the time. Boom!  
> **username_0**: To answer your other question, using a few tools, but mainly gtmetrix.  

---

