# Optimise speed - js and images

**URL:** https://meta.discourse.org/t/optimise-speed-js-and-images/137401
**Category:** Support
**Created:** [31 december 2019 om 00:10 UTC](https://meta.discourse.org/t/optimise-speed-js-and-images/137401 "2019-12-31T00:10:08Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![steven\_so](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/steven_so/32/165018_2.png) [@steven\_so](https://meta.discourse.org/u/steven_so)
#### Post date: [31 december 2019 om 00:10 UTC](https://meta.discourse.org/t/optimise-speed-js-and-images/137401/1 "2019-12-31T00:10:08Z")

</div>

Hi,

I’m wondering if there is any feature that combines all/multiple javascripts into one and highly reused images using css sprint?

I do see it takes bit of time to load the website during the first time and then is very fast from second load onwards.

Any recommendation?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [31 december 2019 om 00:33 UTC](https://meta.discourse.org/t/optimise-speed-js-and-images/137401/2 "2019-12-31T00:33:41Z")

</div>

If you are using our [official install](https://meta.discourse.org/t/142537?silent=true) and have SSL enabled (eg access your site with http **s** ://yoursite.com) then you get HTTP/2

This means we send all the assets more efficiently and that sprites for avatars and various other hacks that were needed in the HTTP/1.1 era are no longer beneficial.

---

<div class="post-metadata">

### Author: ![steven\_so](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/steven_so/32/165018_2.png) [@steven\_so](https://meta.discourse.org/u/steven_so)
#### Post date: [31 december 2019 om 01:31 UTC](https://meta.discourse.org/t/optimise-speed-js-and-images/137401/3 "2019-12-31T01:31:33Z")

</div>

Ah yea I understand. Never thought http2 comes by default with the discourse DO image/installation script.

 ![Screenshot 2019-12-31 at 01.18.11](https://global.discourse-cdn.com/meta/original/3X/a/6/a606a62e3a441f906db468e63155612b712eb3ea.png)

I’m not an advance in this tech stack, I did wonder why there is a mix of h1.1/h2 request. Is it a browser choice?

Also, to reduce the time for first page load, is there a topic/discussion here about page optimisation/cdn/server side settings to read about specifically for discourse?

I have 7 to 10 seconds loads time in a private window and it’s a vanilla setup and a small forum.

---

<div class="post-metadata">

### Author: ![steven\_so](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/steven_so/32/165018_2.png) [@steven\_so](https://meta.discourse.org/u/steven_so)
#### Post date: [31 december 2019 om 01:34 UTC](https://meta.discourse.org/t/optimise-speed-js-and-images/137401/4 "2019-12-31T01:34:52Z")

</div>

Also, If there is a blog/category section, I would love to read about engineering/scalable decision that the discourse team made while building the forum.

---

<div class="post-metadata">

### Author: ![Remah](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/remah/32/70590_2.png) [@Remah](https://meta.discourse.org/u/Remah)
#### Post date: [31 december 2019 om 02:59 UTC](https://meta.discourse.org/t/optimise-speed-js-and-images/137401/5 "2019-12-31T02:59:22Z")

</div>

You can search on scaling and scalability using the magnifying glass above. 😉

You can also find links to codinghorror’s blog from posts he shares here in the #site-feedback:blog subcategory .

This is a really useful post on a related topic that you might miss:

> [@Performance, Scaling, and HA requirements](https://meta.discourse.org/t/performance-scaling-and-ha-requirements/60098/8):
>
> Number of posts made is about the least interesting metric, even more so over such a long time period. Page views is far, far more relevant for determining needed resources. It can be a bit tricky to compare the requests and traffic patterns of a “traditional” mostly-server-generated forum to a Discourse forum, because Discourse is very API-driven, so we often serve multiple HTTP hits per “page view”, but we tend to service each HTTP request a lot quicker, so the forum appears to be a lot more…

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [31 december 2019 om 03:20 UTC](https://meta.discourse.org/t/optimise-speed-js-and-images/137401/7 "2019-12-31T03:20:22Z")

</div>

> [@steven\_so](#):
>
> I’m not an advance in this tech stack, I did wonder why there is a mix of h1.1/h2 request. Is it a browser choice?

If you pay attention to your print screen you will see the lines showing HTTP1.1 aren’t real requests, but just resources coming from cache.

---

<div class="post-metadata">

### Author: ![steven\_so](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/steven_so/32/165018_2.png) [@steven\_so](https://meta.discourse.org/u/steven_so)
#### Post date: [31 december 2019 om 10:49 UTC](https://meta.discourse.org/t/optimise-speed-js-and-images/137401/8 "2019-12-31T10:49:13Z")

</div>

thanks all 😀

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [30 januari 2020 om 10:49 UTC](https://meta.discourse.org/t/optimise-speed-js-and-images/137401/9 "2020-01-30T10:49:15Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
