I am sending an AJAX request expecting JSON response. However, the returned JSON is preceded with a red dot\\bullet which is causing a parse error.
Here is a screens
I was faced red dots problem in my ajax response I tried a lot of solution but doest work for me after then I tried ob_clean() function I got the solution I solved my problem using ob_clean() inside the constructor method
function __construct()
{
ob_clean();
}
As mentioned in a comment before: In Chrome, red dots usually represent non-printable special unicode characters.
Please check your server side code to prevent outputting those characters
You need to clear you object buffer on server side.
I am using PHP as my server side language and I faced similar problem and the solution was cleaning my buffer using ob_clean();
i had the same problem and fixed this by converting the file from utf-8 to utf-8 without BOM
If your files are encoding with UTF-8, better to encode them with UTF-8 without BOM. This can be easily done through notepad++. The steps are as follows,
This may resolve your problem.