We study the propagation of slow magnetosonic waves in coronal magnetic loops. In our study we take nonlinearity and loop cooling into account. We use the small beta approximation and neglect the effect of magnetic field perturbation on the wave propagation. In accordance with this we assume that the tube cross-section does not change. We also neglect the equilibrium plasma density variation along and across the tube. As a result the equations of magnetohydrodynamics reduce to purely one-dimensional gasdynamic equations that includes the effect of viscosity and thermal conduction. We assume that the perturbation amplitude is sufficiently small and use the reductive perturbation method to derive the generalised Burgers’ equation describing the evolution of initial perturbations. First we study a case with weak dissipation and drop the term describing it. When there is no cooling the evolution of the initial perturbation results in a gradient catastrophe. However strong cooling can prevent it. Then we solve the full equation numerically assuming that the temperature decreases exponentially. We fix the initial perturbation amplitude and then study the dependence of perturbation evolution on the cooling time. The main result that we obtain is that moderate cooling decelerates the wave damping. This effect is related to the fact that the dissipation coefficients are proportional to the temperature in \(5/2\) power. As a result they decrease fast because of plasma cooling. However strong cooling can cause perturbation damping on its own.