The best times to visit Shanghai are spring (March to May) and autumn (September to November), when the weather is mild, drier and clearer, with pleasant temperatures and blossoms in spring or crisp skies in autumn. Autumn, especially October to mid-November, is often the finest window and coincides with hairy-crab season. Try to avoid the National Day holiday (October 1–7), when domestic tourists flood the city and sights and transport are jammed. Summer (June to August) is hot, very humid and prone to heavy rain and the occasional typhoon, while winter (December to February) is cold and damp but the quietest and cheapest time, with far thinner crowds at the major sights.
Shanghai runs almost entirely on mobile payments through Alipay and WeChat Pay, and many shops, taxis and ticket machines no longer take cash or foreign cards easily. Set up Alipay or WeChat and link an international card before you travel, keep a little cash as backup, and you will avoid being stuck unable to pay.
Traffic is the biggest everyday danger. Cars, and especially near-silent electric scooters, often ignore crossings and pavements and come from unexpected directions, including the wrong way. Cross only with the flow of local pedestrians, look both ways twice, and never assume a green man means the road is clear.
Violent crime against tourists is very rare and Shanghai is a very safe city to walk at night, but pickpocketing and bag-snatching can happen in the busiest tourist crushes, such as Nanjing Road, the Bund and packed metro cars. Keep your phone and wallet secured and zipped, and stay alert to the scam touts who work these same crowds.