Do immigration officers have the authority to inspect your electronic devices (smartphones, tablets, laptops)?
I've heard that ever since the 9/11 attacks, immigration officers in many countries (in particular Anglophone nations) have being granted legal authority to go through a passenger's electronic devices and find any illegal content or evidence that a passenger is planning on working unlawfully while under a tourist visa.
I'm travelling to the U.S. and I'm a bit worried about this. Though I have no illegal material on my computer and I'm not planning anything nefarious while on holiday, I feel uneasy about an officer having a window into my personal life.
From what I've read, though, even if they have the legal authority to do so, immigration officers rarely conduct these searches.