derpibooru / philomena

Next-generation imageboard
https://derpibooru.org/
GNU Affero General Public License v3.0
214 stars 57 forks source link

Huge HTML on images with lots of tags. #88

Open SomewhatDamaged opened 4 years ago

SomewhatDamaged commented 4 years ago

Is your feature request related to a problem? Please describe. Image pages where there are a lot of tags generate huge amounts of HTML. Example: https://derpibooru.org/2276195

Describe the solution you'd like Perhaps delay-load the tag list?

Additional context The tag-list div of the above link is almost 4MB in size and the head is almost 200KB.

DoublePipe commented 4 years ago

It should compress pretty well since most of it is repeated markup. If there is no noticeable impact on loading/rendering performance in browsers and given how few images have this many tags, I don't think this change is needed.

SomewhatDamaged commented 4 years ago

Having so much before the opengraph data will cause a lot of unfurlers to fail (like Discord's) because they limit how much of the page they'll read.

DoublePipe commented 4 years ago

Hmm, delayed loading wouldn't help with markup in <head>. What we could do is move the opengraph data before <title> or reduce the number of tags that goes into <title>.