# Infinite scrolling for the category

**URL:** https://meta.discourse.org/t/infinite-scrolling-for-the-category/218355
**Category:** Development
**Created:** [February 16, 2022, 1:01pm UTC](https://meta.discourse.org/t/infinite-scrolling-for-the-category/218355 "2022-02-16T13:01:30Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Amigo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/amigo/32/138488_2.png) [@Amigo](https://meta.discourse.org/u/Amigo)
#### Post date: [February 16, 2022, 1:01pm UTC](https://meta.discourse.org/t/infinite-scrolling-for-the-category/218355/1 "2022-02-16T13:01:31Z")

</div>

Hi! Please tell me, is it possible to implement infinite scrolling for the category section somehow? If there are a lot of subcategories and categories, the page starts loading for a long time.

---

<div class="post-metadata">

### Author: ![Tris20](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tris20/32/264639_2.png) [@Tris20](https://meta.discourse.org/u/Tris20)
#### Post date: [February 16, 2022, 2:00pm UTC](https://meta.discourse.org/t/infinite-scrolling-for-the-category/218355/2 "2022-02-16T14:00:33Z")

</div>

Can you show an example of this? I have about 40 Categories and face no issues. It may also help to mute the categories you don’t take part in.

---

<div class="post-metadata">

### Author: ![Amigo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/amigo/32/138488_2.png) [@Amigo](https://meta.discourse.org/u/Amigo)
#### Post date: [February 16, 2022, 2:22pm UTC](https://meta.discourse.org/t/infinite-scrolling-for-the-category/218355/3 "2022-02-16T14:22:54Z")

</div>

Yes, of course. I have a lot more subcategories. I know it’s a lot. [https://proautoclub.ru/](https://proautoclub.ru/)

---

<div class="post-metadata">

### Author: ![Mr.X\_Mr.X](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mr.x_mr.x/32/126610_2.png) [@Mr.X\_Mr.X](https://meta.discourse.org/u/Mr.X_Mr.X)
#### Post date: [February 16, 2022, 2:27pm UTC](https://meta.discourse.org/t/infinite-scrolling-for-the-category/218355/4 "2022-02-16T14:27:05Z")

</div>

You’d still face issues once the categories are listed when you’d scroll. I’d use tags in your case.

---

<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: [February 16, 2022, 2:36pm UTC](https://meta.discourse.org/t/infinite-scrolling-for-the-category/218355/5 "2022-02-16T14:36:46Z")

</div>

You have 1437 categories. That is not recommended.

> [@What's the maximum number of categories we can have?](https://meta.discourse.org/t/whats-the-maximum-number-of-categories-we-can-have/57022/2):
>
> 500 to 1000 is safe
> 
> If you need more consider tags
> 
> Additionally you can have a very large number of groups

> [@What's the maximum number of categories we can have?](https://meta.discourse.org/t/whats-the-maximum-number-of-categories-we-can-have/57022/12):
>
> Honestly probably nothing terrible, unless you are admin and have access to 1000+ categories. At that point we would ship you every single category json in your first page, the categories page would get slow both server side and client side.

Your site.json is 4.5MB, while Meta is 56KB in comparison. Maybe try using tags.

---

<div class="post-metadata">

### Author: ![Amigo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/amigo/32/138488_2.png) [@Amigo](https://meta.discourse.org/u/Amigo)
#### Post date: [February 16, 2022, 2:50pm UTC](https://meta.discourse.org/t/infinite-scrolling-for-the-category/218355/6 "2022-02-16T14:50:03Z")

</div>

Yes, I understand that this is a lot, but I would like to leave it in this form, without tags. Perhaps there is a way to hide subcategories from the main page, or will it require large code changes?

---

<div class="post-metadata">

### Author: ![Tris20](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tris20/32/264639_2.png) [@Tris20](https://meta.discourse.org/u/Tris20)
#### Post date: [February 16, 2022, 3:37pm UTC](https://meta.discourse.org/t/infinite-scrolling-for-the-category/218355/7 "2022-02-16T15:37:28Z")

</div>

Yeah I was assuming box layout, in which case there’s less to render if you mute. Now I’ve seen it’s the list view the whole thing makes more sense. Definitely agree that tags is the way to go here. The watched words functionality is a great help as well.

 ![image](https://global.discourse-cdn.com/meta/original/3X/3/e/3ee18e96809fffd60572a8c6041127e541d1f761.png)

If you definitely want to pursue categories like this, I’d recommend exploring the box layout:

 ![image](https://global.discourse-cdn.com/meta/original/3X/7/5/751f4067339b72c2986c0fad9b39ceec82d58fae.png)

You can reduce the number of featured topics to 1, but you need to do that manualy in each category

 ![image](https://global.discourse-cdn.com/meta/original/3X/e/2/e2aab9e97ffd989ae180dcaf23057ac741866581.png)  
Then you get something like this:

 ![image](https://global.discourse-cdn.com/meta/original/3X/4/7/47bc24681c3d075e2a7707e7908ec43ecc71fc87.png)

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [February 16, 2022, 5:09pm UTC](https://meta.discourse.org/t/infinite-scrolling-for-the-category/218355/8 "2022-02-16T17:09:14Z")

</div>

> [@Amigo](#):
>
> Yes, I understand that this is a lot, but I would like to leave it in this form, without tags.

I can understand that.  
But here, you’re basically using categories a way Discourse isn’t made for if I understand Falco’s message.

I don’t know much about discourse development, I’m probably stating the obvious, but your category hierarchy seems, however, perfect for using tags and I guess it would completely resolve your issue (unless you have a particular issue with tags?).

 ![image](https://global.discourse-cdn.com/meta/original/3X/5/0/50f34487b0bc8401825be6a9df1ac311355e6662.png)

Here, you could have this kind of hierarchy (category → tags):

## Chevrolet

- Camaro
  - #Camaro-II
  - #Camaro-III
  - #Camaro-IV
  - etc

And so on for Cavalier, Corvette…

---

<div class="post-metadata">

### Author: ![Amigo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/amigo/32/138488_2.png) [@Amigo](https://meta.discourse.org/u/Amigo)
#### Post date: [February 16, 2022, 6:42pm UTC](https://meta.discourse.org/t/infinite-scrolling-for-the-category/218355/9 "2022-02-16T18:42:57Z")

</div>

Thank you all for the answers

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [February 16, 2022, 7:19pm UTC](https://meta.discourse.org/t/infinite-scrolling-for-the-category/218355/10 "2022-02-16T19:19:02Z")

</div>

> [@Amigo](#):
>
> Yes, I understand that this is a lot, but I would like to leave it in this form, without tags.

Everyone who knows how this software works thinks that you do not want to do that.

A site about cars is literally the go-to example how to use tags: [https://community.cartalk.com/](https://community.cartalk.com/) ([It's Time We Talked About Tags](https://meta.discourse.org/t/its-time-we-talked-about-tags/72467))

> [@Amigo](#):
>
> Perhaps there is a way to hide subcategories from the main page

Yes, you could add them all to `SiteSetting.default categories muted`. And then you’d somehow make it so that people could find them and un-mute them at [/my/preferences/categories](https://meta.discourse.org/my/preferences/categories).
