Hi,
If you bring all the messages then you can do a check whether the incoming message is same as the exiting one.. if not then only update/append it in the success function. Also you trim to cut out the spaces.
success: function(data){
if(data != $("#msgnot").text()){
$("#msgnot").append(data);
}
}