A dishwasher, comprising: - a washing container adapted to receive dishes to be washed and closable by means of a door, - a spraying device adapted to spray a washing liquid on the dishes arranged in the washing container, - a heating device adapted to heat the washing liquid, - a control device configured to execute a dish treatment program with at least one hot washing step having an initial step of heating the washing liquid and of simultaneously distributing the heated washing liquid on the dishes in the washing container, - a temperature sensor connected to the electronic control device and put in thermal contact with the washing liquid, wherein: - during the initial heating step, the temperature sensor measures the temperature of the washing liquid to provide measured temperature values and communicates these measured temperature values to the electronic control device, - the electronic control device, depending on said measured temperature values, calculates a thermal gradient parameter indicative of the washing liquid heating speed in said initial heating step, - the electronic control device controls the heating device during the hot washing step depending on the thermal gradient parameter, characterized in that, upon conclusion of the hot washing step, the electronic control device actuates the draining of the washing liquid and the loading of a cold rinsing liquid to carry out a cold rinsing step with the heating device switched-off and with the spraying device actuated for a cold rinsing duration, and in that the control device adjusts the cold rinsing duration depending on the thermal gradient parameter, wherein the control device increases the cold rinsing duration as the thermal gradient parameter decreases and wherein the control device lowers the cold rinsing duration as the thermal gradient parameter increases with respect to preset reference values. - a washing container adapted to receive dishes to be washed and closable by means of a door, - a spraying device adapted to spray a washing liquid on the dishes arranged in the washing container, - a heating device adapted to heat the washing liquid, - a control device configured to execute a dish treatment program with at least one hot washing step having an initial step of heating the washing liquid and of simultaneously distributing the heated washing liquid on the dishes in the washing container, - a temperature sensor connected to the electronic control device and put in thermal contact with the washing liquid, - during the initial heating step, the temperature sensor measures the temperature of the washing liquid to provide measured temperature values and communicates these measured temperature values to the electronic control device, - the electronic control device, depending on said measured temperature values, calculates a thermal gradient parameter indicative of the washing liquid heating speed in said initial heating step, - the electronic control device controls the heating device during the hot washing step depending on the thermal gradient parameter, characterized in that, upon conclusion of the hot washing step, the electronic control device actuates the draining of the washing liquid and the loading of a cold rinsing liquid to carry out a cold rinsing step with the heating device switched-off and with the spraying device actuated for a cold rinsing duration, and in that the control device adjusts the cold rinsing duration depending on the thermal gradient parameter, wherein the control device increases the cold rinsing duration as the thermal gradient parameter decreases and wherein the control device lowers the cold rinsing duration as the thermal gradient parameter increases with respect to preset reference values.