Stocks edged lower on Friday, building on three days of losses as data showed consumers saw little improvement ahead for the economy.

U.S. retail sales rebounded in July but showed hints of lingering economic softness, while consumer sentiment appeared to have stabilized in August, but were still nervous about the near term.

The reports indicated the economy has slowed considerably in recent months, but the numbers were firm enough to ease fears of a renewed downturn.

Consumer sentiment drifted a bit higher here, but the market is still convinced that there is a risk of a further economic slowdown. It suggests that the number may stay sluggish for the important back-to-school month, further giving a reason for the bears to push the market lower, said Jeff Kleintop, chief market strategist at LPL Financial in Boston.

The Dow Jones industrial average <.DJI> fell 17.48 points, or 0.17 percent, at 10,302.47. The Standard & Poor's 500 Index <.SPX> dipped 3.13 points, or 0.29 percent, at 1,080.48. The Nasdaq Composite Index <.IXIC> was down 12.91 points, or 0.59 percent, at 2,177.36.

If the indexes close lower on Friday, it could be the biggest weekly decline in six weeks.

J.C. Penney Co Inc fell 2.2 percent to $20.34 after the retailer reported stronger-than-expected quarterly earnings, but forecast profits below estimates.

Pressuring the Nasdaq, Google Inc was down 1 percent at $486.82, and Research in Motion Ltd's dropped 1.3 percent to $53.40.

India may shut down Google's messaging services over security concerns, the Financial Times reported, and the government has threatened a similar crackdown on Research in Motion Ltd's BlackBerry services.

Separately, Google was sued by Oracle Corp over alleged patent and copyright infringement related to its popular Android smartphone software.

Eli Lilly and Co dropped 3 percent to $35.49 after the drugmaker lost a patent case that cleared the way for generic competition for Strattera, its attention deficit disorder drug.

Rambus Inc was up 5.5 percent at $19.01 and Nvidia Corp rose 4 percent to $9.32. Chip designer Rambus granted patent licenses to graphic chipmaker Nvidia Corp, raising hopes that a lengthy legal battle was near an end.

(Reporting by Angela Moon; editing by Jeffrey Benkoe)