Tech Note: Optimizing LGF Pages

Charles Johnsonfollow me on twitter
Technology • Wed Aug 26, 2009 at 1:52 pm PDT • Views: 193

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.

Advertisement

491 comments

^ back to top ^

Name:

Pass:

Register Forgot Your Password? Re-send Confirmation (To log in, cookies must be enabled in your browser!)

Turn off ads by subscribing!
For about 33 cents a day, our subscription option turns off all advertisements at LGF!
Read more...


► LGF Headlines

  • Loading...

► Tweeted Articles

  • Loading...

► Tweeted Pages

  • Loading...

► Top 10 Comments

  • Loading...

► Bottom Comments

  • Loading...

► Recent Comments

  • Loading...

► Tools/Info

► Tag Cloud

► Contact

You must have Javascript enabled to use the contact form.
Your email:

Subject:

Message:


Messages may be published in our weblog, unless you request otherwise.
Tech Note:
Using the Contact Form

More Partners

Compare Electricity Prices in your area. Texas Electricity is deregulated; you have the right to choose Texas Electric Rates from among many Texas Electric Companies.

Whip it out!

TwitterFacebook
LGF Pages
Recent Pages

MikeySDCA
American Community Survey: Why Republican Hate It.
5 minutes ago
Views: 1 • Comments: 0
Tweets: 0 • Rating: 0

researchok
'I Was Looking Forward to a Quiet Old Age': Instead, Etta Shiber, Helped Smuggle Stranded Allied Soldiers To Freedom
11 hours, 36 minutes ago
Views: 143 • Comments: 0
Tweets: 1 • Rating: 0

Daniel Ballard
Late Afternoon Light-Kalanchoe
19 hours, 18 minutes ago
Views: 140 • Comments: 0
Tweets: 0 • Rating: 5

Eclectic Infidel
City College of San Francisco Budget Update
20 hours, 10 minutes ago
Views: 154 • Comments: 0
Tweets: 0 • Rating: 0

Michael McBacon
Kansas governor signs 'Shariah bill' to ban Islamic law
1 day ago
Views: 282 • Comments: 7
Tweets: 0 • Rating: 6

Aigle
National Geographic Traveler Veers Off Track
2 days ago
Views: 608 • Comments: 10
Tweets: 16 • Rating: -7

MichaelJ
Apple TV Slated to Debut in December?
2 days, 1 hour ago
Views: 252 • Comments: 0
Tweets: 0 • Rating: 1

Ascher
Israeli Who Saved Turk on Everest: You Never Abandon a Friend - Israel News, Ynetnews
2 days, 3 hours ago
Views: 322 • Comments: 1
Tweets: 0 • Rating: 4

Haywood Jabloeme
The Harrassment of Patterico & Its Roots in Left-Wing Activism
2 days, 3 hours ago
Views: 554 • Comments: 2
Tweets: 0 • Rating: 4

Curt
Brian Banks: (Video) Falsely accused of rape speaks out
2 days, 5 hours ago
Views: 297 • Comments: 3
Tweets: 0 • Rating: 5

 Frank says:

A world of sexual incompetents, encountering each other, under disco circumstances... why can't you do songs about that?