Tech Note: Optimizing LGF Pages

Technology • Views: 2,868

I’ve been doing a lot of work on the LGF Blog code behind the scenes, so as always, if a feature doesn’t seem to be working correctly, the first thing to try is reloading the page. Bugs get fixed quickly, so reloading will often make all your problems disappear. Well, not all your problems, just the LGF page loading ones.

A significant improvement that isn’t visible in terms of any flashy new features or icons: the size of the front page has been decreased by about 30K, by using Ajax to load all those “spinoff links” forms the first time someone clicks the link, instead of every time the page is loaded. This way, all of that HTML code is loaded only as needed; since there are usually 25-30 posts on the front page, this results in a significant weight loss achievement.

I don’t know if you’ll see a visible speed difference in loading the front page; that depends on a whole lot of other factors besides the page size. But the server hamsters always thank me when I command them to do less work.

In addition to the spinoff links improvement, I’ve greatly reduced the size of the JSON messages that get passed back and forth from your browser to our servers when you post a comment, click the “new comments” button, or turn the “auto” feature on. This also greatly pleases the hamsters.

As always, a big plug for the jQuery JavaScript Library, upon which LGF relies. I’ve finally started using the latest version again, after solving one of the problems that was preventing me from upgrading.

Jump to top

Create a PageThis is the LGF Pages posting bookmarklet. To use it, drag this button to your browser's bookmark bar, and title it 'LGF Pages' (or whatever you like). Then browse to a site you want to post, select some text on the page to use for a quote, click the bookmarklet, and the Pages posting window will appear with the title, text, and any embedded video or audio files already filled in, ready to go.
Or... you can just click this button to open the Pages posting window right away.
Last updated: 2023-04-04 11:11 am PDT
LGF User's Guide RSS Feeds

Help support Little Green Footballs!

Subscribe now for ad-free access!Register and sign in to a free LGF account before subscribing, and your ad-free access will be automatically enabled.

Donate with
PayPal
Cash.app
Recent PagesClick to refresh