Mike Webb, an independent candidate running for Congress in Virginia's eighth district, caused a storm online May 17, after he shared a screenshot of his computer with pornographic website tabs left open. (WUSA9)

When campaigning, reaching out to constituents through social media is crucial. And so is closing browser tabs for pornography websites when sharing screenshots.

This was the lesson learned Monday by Mike Webb, who says he is launching an independent bid for Congress in Virginia’s 8th Congressional District. Webb shared a screenshot posted to his Facebook page Monday that included Web browser tabs titled “LAYLA RIVERA TIGHT” and “IVONE SEXY AMATEUR.” Layla Rivera is a professional pornographic actress; Ivone is, apparently, an amateur. Searches for these terms lead to pornographic videos, and the post has since been removed.

After being excoriated in comments — one of which read, “Too much multitasking!” — and by Gawker, Webb, known for his conservative views and long Facebook posts, praised God for the misstep in a post titled “THANKS FOR THE TAB CHECK, RANGER BUDDIES!” Somehow, this was a coup.

“Lessons affirmed today include that we do expect our leaders to be examples of our highest ideals, but also, as we have seen for almost a year in non-traditional length posts, people are interested and motivated by truth and substance, not flash or even scandal,” he wrote. “In the month preceding the nomination convention, our following on Twitter grew at a rate of 50%, but today, in just one day on Facebook, we grew in page likes by 25%. Perhaps, what does not kill you does make you stronger.” He also said, “The truly amazing thing about today was that ‘I saw also the Lord, high and lifted up,’ and I was very much moved by the love and support of those who expressed their encouragement and support.”

At the GOP’s district convention this month, Webb, a former Army officer who moved to Northern Virginia in 2008, lost his bid for the Republican nomination to Charles Hernick. Webb now describes himself as a “conservative independent.”

“If an former Independent can disenfranchise conservative voices in the Republican Party, why can’t a lifelong Republican run independently to reassert that voice?” Webb wrote after his loss.

Webb has not yet collected enough signatures to qualify as a candidate for the November ballot. He says he will run as an independent against Hernick, an economist and environmental consultant, and the incumbent, Rep. Don Beyer (D), in the overwhelmingly Democratic district. The deadline to file as an independent is June 14.

He did not immediately respond to a request for comment.

Perry Stein contributed to this report.