We can prevent it by building building solid rock in the earthquake zone. Use of steel structure and strong move. The doors and windows, with little of roofing sheet of rubber or plastics instead of tiles,Build a wide so that when the time of building collapse will not hinder the traffic. And also create space in various cities. People can go for refuge from the collapsing building.