In an election year, with nearly constant squawking from presidential candidates about well-paying jobs, the mayor of Palo Alto has an unusual message for some of the cash-flush tech companies based here: Go away. Please.

“Big tech companies are choking off the downtown,” Mayor Patrick Burt said. “It’s not healthy.”

As one walks down the sidewalks in residential areas, shaded by mature trees and basking in the city’s sunny, mild weather, it’s not too hard to understand why homeowners are trying to keep Palo Alto small despite its reputation for giving birth to the world’s next big thing.

Last year, the city of 66,000 people set a cap of less than 1 percent a year on the growth of office space in most of its parts. In the charming downtown, where battalions of tech workers from companies like Amazon stroll the streets, their eyes often glued to their smartphones, the mayor is looking to enforce, in some form, an all-but-forgotten zoning regulation that bans companies whose primary business is research and development, including software coding. (To repeat: The mayor is considering enforcing a ban on coding at ground zero of Silicon Valley.)

“This is crazy,” said Kate Vershov Downing, a lawyer who lit up the internet this month when she announced that she was quitting the city’s planning commission because she was moving someplace cheaper. “This is Silicon Valley. We’ve been writing code here for decades.”