๐ง Things might look funky ๐ง
Every page on Subeta loads a stack of code libraries before it shows you anything. A library is a chunk of someone else's code you load so you don't have to write it yourself, and a lot of ours are more than ten years old. Some of them are only used on one or two pages, but they load on every page you visit, phone and data plan included.
I'm clearing them out. Before compression, every page still loads about 1.1 MB of this old code. This week about 200 KB of it came off every page:
qTip came off the 26 explore map pages too, where it never drew a single... qTip?
Modalbox, a popup window library from 2007, is gone as well. Popups now use the browser's own dialog element. If you saw an empty popup box sitting on every page recently, that was this work (sorry!)
Icons changed too. The site was drawing them from three different sets: Font Awesome 4, Semantic UI's icon font, and Bootstrap 2's glyphicons. Now every icon comes from one set, Font Awesome's Sharp Duotone, so they finally match each other. A few of the old glyphicon spots were drawing nothing at all and show their icons now. Expect some icons to look a little different while we adjust sizes and colors around the site.
Still loading on every page:
Most of what these libraries do is built into browsers now. Finding things on the page, fades and slides, and loading data without a refresh have been built in for years, over ten for some of it. Popups only made it into every browser in 2022, and hover popovers in 2023. Every library I swap for the built-in version is code you don't have to download, and your browser doesn't have to run it before the page works. That should make the site feel faster, especially on a phone. And don't worry, I'm going to build in graceful fallback for these, if your browser doesn't have them, but fallback that still use best practices and weren't made in 2010.
The catch is that every page has to be moved over by hand, so for a while some things might look a little off, like a button that's the wrong size or a popup with odd spacing. If something looks broken, post the page link in the forums and I'll take a look.
I'm clearing them out. Before compression, every page still loads about 1.1 MB of this old code. This week about 200 KB of it came off every page:
- Handlebars, twice. Version 4.0.6 (2016) and version 2.0.0-alpha.4 (2014) both loaded, the older one second, so it overwrote the newer one. Nothing on the site used either of them.
- lodash 4.17.2 (2016) and jquery.touch, also unused.
qTip came off the 26 explore map pages too, where it never drew a single... qTip?
Modalbox, a popup window library from 2007, is gone as well. Popups now use the browser's own dialog element. If you saw an empty popup box sitting on every page recently, that was this work (sorry!)
Icons changed too. The site was drawing them from three different sets: Font Awesome 4, Semantic UI's icon font, and Bootstrap 2's glyphicons. Now every icon comes from one set, Font Awesome's Sharp Duotone, so they finally match each other. A few of the old glyphicon spots were drawing nothing at all and show their icons now. Expect some icons to look a little different while we adjust sizes and colors around the site.
Still loading on every page:
- Prototype 1.7.0 (2010) and script.aculo.us 1.8.1 (2008). They're in the oldest code history we have, from 2010. Prototype is the biggest script on the page at 205 KB. It's honestly impressive that we are still including these.
- Tipped (2014), which draws the hover cards on items and users, and can be replaced by browser defaults now.
- jQuery 3.2.1 and Bootstrap 4.0.0-beta.2, both from 2017. Yes, a beta. We never moved to the final release.
- Semantic UI 0.19.3 (2014). Its stylesheet is 340 KB, bigger than any script on the page.
- Font Awesome 4.6.3 (2016). The site's own icons don't use it anymore, but pet profiles and some custom CSS do, so it stays for now ๐ญ
Most of what these libraries do is built into browsers now. Finding things on the page, fades and slides, and loading data without a refresh have been built in for years, over ten for some of it. Popups only made it into every browser in 2022, and hover popovers in 2023. Every library I swap for the built-in version is code you don't have to download, and your browser doesn't have to run it before the page works. That should make the site feel faster, especially on a phone. And don't worry, I'm going to build in graceful fallback for these, if your browser doesn't have them, but fallback that still use best practices and weren't made in 2010.
The catch is that every page has to be moved over by hand, so for a while some things might look a little off, like a button that's the wrong size or a popup with odd spacing. If something looks broken, post the page link in the forums and I'll take a look.
Posted by Keith

Jack
Thanks for all your hard work! Glad to see Subeta still being updated, it's been one of my safe havens online for many years
I understand better why it was sometimes a little bit strange while navigating the site lol
thank you so much for the hard work ๐
thank you so much for the hard work ๐



Chiming in to add my appreciation, both for all the work you do, and the behind the scenes breakdown you share with us; looking forward to seeing the site more responsive, and nice to know the data overheads for page loads are getting trimmed, both for us and for your servers.
As someone who just joined yesterday and dug into the depths of the news I am surprised to find that these recurring changes are somewhat new. I found this site after trying to return to another site I played on for 15 years but have not in 7 years to find it was getting stale and too focused on greed. Very happy to join this site at a time of refresh!

It brings such a big smile and warm feels to see so much being done here and new life brought into the site after so long a time. Even though it's hard work and some of it (I'm certain) gets frustrating, it must feel good for you too Keith ^ ^ Not to mention a load or six off the server to finally clear out some of that "junk" code!
the old version of handlebars importing after the newer one is frying me LOL. as a swe would die to see subetas codebase. thanks for all your efforts cleaning it up <3

I was wondering why the weird, empty pop-up window was appearing in the middle of my pages for about an hour. I suspect it had something to do with that lol. Still, good to know, and thank you for the transparency!


Ohh, this might be why the drop down menus were half hidden behind random bars on the shop restock page earlier? I made a thread, but can do so in the correct spot if that's helpful.

I don't full get all the code talk, but I truly appreciate Subeta being updated. I've been here for years, and I want to see it get love and continue for years more.



Keith, thank you for the explanation of why some Subeta pages looked funky recently. I appreciate all the fixes you do. I haven't seen the funky pages in a while today, so your hard work is paying off.



Log in to leave a comment.

