LGF Technical Update - Comment Threads

Charles Johnsonfollow me on twitter
Mon Mar 19, 2007 at 8:49 am PDT • Views: 287

After poring over system logs, I’ve discovered another big drain on our system resources. At the bottom right of each post on the front page are links to versions of the individual post with and without comments. Sometimes people link to the pages with comments, even though they’re only interested in the post itself; and since pages with comments are often much larger than pages without, this is a lot of unnecessary work for the LGF server.

To make it worse, there are web robots out there that ignore the standard ways of blocking them, and will try to crawl through every post at LGF, including reloading pages with comments over and over. Lots and lots of wasted work for our server, slowing down the site for everyone.

So to address this, I’ve implemented some code that checks the referrer information for each page request, and if the referrer is not littlegreenfootballs.com (or if there’s no referrer), the request is redirected to the cached version of the page without comments. Since I installed this code last night, it has already saved more than half a gigabyte of data.

Most people won’t ever notice this; if you haven’t changed your browser settings or installed some kind of firewall that blocks referrers, everything will continue to work as it always has.

However, I’ve received a couple of emails from people who say they’re now unable to access comments pages at all. The most likely cause is that your browser has been set to not send referrer information; if it’s happening to you, check your browser preferences and make sure you haven’t disabled the sending of referrer info.

UPDATE at 3/19/07 9:16:26 am:

Here’s how to make sure Firefox is set up to send referrer information:

1. In the address bar of your Firefox browser type: about:config and hit Enter.
2. In the Filter input field type: network.http.sendRefererHeader.
3. The value for this preference should be 2. If it isn’t, double click on the preference name.
4. Change the value to 2 and hit OK.

UPDATE at 3/19/07 9:18:58 am:

Also, Norton Internet Security and Personal Firewall may block the sending of referrer info by default. Here is information on enabling referrers if you use either of these products: Passing referrer information to specific Web pages in Norton Internet Security and Norton Personal Firewall.

UPDATE at 3/19/07 10:09:06 am:

Firefox users should also check out this extension that lets you manage how your referrer information is sent: RefControl.

UPDATE at 3/19/07 2:42:19 pm:

LGF reader Wicksy made a good suggestion: to set a session variable when a person is redirected to the ‘no comments’ page, so that any further requests for comment threads will be allowed to go through, during that session.

That means that if you’re a live human, you’ll only be redirected once. (Robots usually don’t accept session cookies.) After that you can go in and out of comments at will.

Advertisement

154 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.

Leave blank if devoid of snark.

TwitterFacebook
LGF Pages
Recent Pages

Daniel Ballard
Late Afternoon Light-Kalanchoe
2 hours, 38 minutes ago
Views: 49 • Comments: 0
Tweets: 0 • Rating: 2

MikeySDCA
Colin Powell Endorsed Same-Sex Marriage Once It Was Safe, More Evidence He's Hardly a Great Leader.
2 hours, 42 minutes ago
Views: 42 • Comments: 0
Tweets: 0 • Rating: 0

researchok
Attachment Birthers
2 hours, 51 minutes ago
Views: 52 • Comments: 0
Tweets: 0 • Rating: 0

Eclectic Infidel
City College of San Francisco Budget Update
3 hours, 30 minutes ago
Views: 66 • Comments: 0
Tweets: 0 • Rating: 0

Michael McBacon
Kansas governor signs 'Shariah bill' to ban Islamic law
8 hours, 1 minute ago
Views: 168 • Comments: 6
Tweets: 0 • Rating: 4

Aigle
National Geographic Traveler Veers Off Track
1 day, 8 hours ago
Views: 402 • Comments: 5
Tweets: 0 • Rating: -4

MichaelJ
Apple TV Slated to Debut in December?
1 day, 9 hours ago
Views: 202 • Comments: 0
Tweets: 0 • Rating: 1

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

Haywood Jabloeme
The Harrassment of Patterico & Its Roots in Left-Wing Activism
1 day, 10 hours ago
Views: 482 • Comments: 2
Tweets: 0 • Rating: 4

Curt
Brian Banks: (Video) Falsely accused of rape speaks out
1 day, 13 hours ago
Views: 243 • Comments: 1
Tweets: 0 • Rating: 3

 Frank says:

Drop out of school before your mind rots from exposure to our mundane educational system. Forget about the Senior Prom and go to the library and *educate yourself* if you've got any guts. Some of you like *pep rallies* and plastic robots who tell you what to read. Forget I mentioned it. *This song has no message.* Rise for the flag salute. -- Liner notes for "Hungry Freaks, Daddy" on "Freak Out!"