CITRONELLE, Ala.—Joshua Edwards's eighth-grade paper about the Black Plague came with a McDouble and fries.

Joshua sometimes does his homework at a McDonald's restaurant—not because he is drawn by the burgers, but because the fast-food chain is one of the few places in this southern Alabama city of 4,000 where he can get online access free once the public library closes.

Cheap...