We are glued to our smartphones for many reasons — to stay in touch with friends and family, to take photos and to read the news while waiting for the bus. With so many benefits come costs: Our phones distract us at work and while driving, at the dinner table and during life’s quiet moments, so that even simple pleasures like watching a sunset become fodder for Instagram photos or tweets.

This assault on our attention has become so common that new technologies and routines have arisen to combat it. But features designed to police screen times, set time limits on app usage and schedule “wind down time,” which turns screens to grayscale before bedtime, are not enough. Nor are the periodic digital Sabbaths and detoxes, which many undertake to be free of their phones.

To properly combat the million-dollar engineering that Silicon Valley deploys to hijack our attention, we need to recognize that technologies have long affected Americans’ behaviors and feelings. Well before smartphones, new inventions shaped our culture and our emotions, and changed how we feel about vanity, loneliness and boredom. Today, Silicon Valley is the latest to exploit these feelings in an effort to keep us harnessed to our screens.

For centuries, moralists preached that pride and vanity are deadly sins. Humans shouldn’t boast or think too much of themselves because they are fallible. Likewise, Americans were taught to regard their accomplishments as hollow and fleeting because life is short. But popular technologies of the 19th century challenged these mores and helped inculcate new ones.

After photography was introduced to the United States in 1839, it took off quickly, and Americans flocked to photographers’ studios. Photos were relatively inexpensive: by mid-century, very small photos were available for as little as 25 cents — about $8 in 2019. Suddenly, having a portrait of oneself — long the privilege of elites — was possible for a wide swath of the American population. Frederick Douglass celebrated this shift when he observed that “the humblest servant girl, whose income is but a few shillings per week” could now have “a more perfect likeness of herself than noble ladies and even royalty … fifty years ago.”

The spread of mass-produced mirrors in the late 19th century had a similar effect, enabling rich and poor alike to study their images, and try to perfect them.

More than just allowing people to display themselves, these technologies helped to alter attitudes about self-presentation and self-promotion. They trained Americans to focus on themselves, perfect their images and present themselves to others in words and pictures. What’s more, they increased the pressure on Americans to publicly celebrate their appearances and accomplishments.

By the 1930s, editorialists were declaring that “Vanity is Sanity,” for well-adjusted individuals should care about their image and try to look their best. Lack of interest in one’s appearance signaled psychological problems. Whereas vanity had once been a sin, it now became a requirement for social success.

If Americans were learning to stop worrying about appearing too vain and embrace their own reflections, they were also embracing new attitudes about loneliness.

Our 19th-century forebears were resigned to the fact that they would sometimes be alone. Unitarian minister William Rounseville Alger wrote in 1867, “There is more loneliness in life than there is communion. The solitudes of the world out-measure its societies.” Enslaved African Americans expressed similar sentiments in the spiritual “Lonesome Valley,” with its lyrics, “You gotta walk that Lonesome Valley; you gotta go there by yourself …” Being lonely wasn’t pleasurable, but it wasn’t surprising or particularly worrisome, either. And like Henry David Thoreau, many even celebrated it, recasting it as solitude, and arguing it could bring revelation and prove redemptive.

Over the course of the 20th century, however, Americans gradually pathologized the experience of being alone. Capitalizing on and amplifying this negative view of aloneness, technology companies promised consumers that if they purchased telephones, radios and phonographs, they need never feel lonesome again.

In the 1940s, the word “loner” emerged as a pejorative description for those on their own. Meanwhile, the term “solitude” fell out of favor while the word “loneliness” came into wider use, reflecting a growing consensus that there was something wrong and even shameful about being alone. In an age when telecommunications networks were spreading across the globe, and cheerful sociability was becoming a new emotional norm, choosing to disconnect and embrace more solitary ways began to carry a stigma.

Radios and phonographs, likewise, came to fill the silences in American homes, creating a sense of companionship at all times. These new technologies also sought to assuage a new condition of modern life: boredom.

Before the mid-19th century Americans never experienced boredom, for the word didn't exist in English. While monotony was a recognized, expected part of life, Americans lacked a clear lexicon for worrying about it. And some even celebrated it — like William Channing Gannett in his popular 1890 book “Blessed Be Drudgery.”

However, after the word “boredom” was coined, it spread, and during the late 19th century, it was increasingly used to describe the inner experience of empty moments. By the mid-20th century, psychologists were suggesting that boredom is a measurable problem and that individuals are entitled to diversion in daily life, a message which movie studios, radio producers, television tycoons and merchants eagerly took up. A 1938 ad for the motion picture industry told readers that movie theaters provided a “happy haven” where “millions may confidently come for freedom from boredom and car,” while a 1945 Kellogg’s ad claimed its variety pack would “banish breakfast boredom.” These industries branded boredom as anathema to living a good life and Americans soon began to regard it as a dangerous emotion that ought to be stamped out as quickly as possible.

What is clear from our vantage point today is that the people who were pushing photography, telephones, radios, movies and other consumer goods did so by exploiting shifting mores around vanity, loneliness and boredom. But they also exacerbated them, reinforcing the belief that people should present their best faces to the world and the conviction that they should always be in contact, and never be bored or unstimulated.

In turn, these ideas have become central to our daily lives. We harbor fewer reservations about vanity than our ancestors. We turn to our phones because we have become accustomed to celebrating ourselves and to seek out the affirmation of others. We are also obsessed with our phones because so many of us regard loneliness and boredom as pathologies with potentially negative consequences for our health. As a result, these emotions are now considered feelings to be cured rather than endured. Anxious about being alone and worried about being bored, we use our phones to seek out constant companionship and unending entertainment.

To put down our phones, or at least to use them more wisely, we should be attendant to this history and how Silicon Valley exploits its legacy. We take up social media’s invitation to post selfies and indulge our vanities because we’re conditioned by history to do so. Conversely, because we worry more about loneliness and boredom than our ancestors did, we’re more apt to turn to our phones since they promise to relieve these afflictions.

There is no going back. But in rescuing our attention from companies determined to wrest it from us, it’s important to remember that the vulnerabilities Silicon Valley exploits are far from inevitable and are, instead, a result of culture and history. The way our culture trains us to experience vanity, loneliness and boredom can be changed. We can shift our thinking to recognize the value of humility, of solitude and of empty moments. Doing so may help us master rather than be mastered by our phones.