failed to load resource: net::err_http2_protocol_error | One possible solution

I got this error in console because I was sending data with commas through get parameter in the PHP page.

//WRONG CODE
var rgb = "255,255,255";
$.ajax({
url : "example.php?rgb="+rgb
});
//RIGHT CODE
var r = 255;
var g = 255;
var b = 255;
$.ajax({
url : "example.php?red="+r+"&green="+g+"&blue="+b
});

Leave a Comment