Json Syntax Error In Firefox Only
Im getting a syntax error in FireFox when using $.parseJSON(). The same code works properly on Chrome/Chromium, and Safari. I call this function to get a random generated token to
Solution 1:
I think you should check the Response Headers
-> Content-Type
to find the actual Data Type
.
And the compatible code should like this.
# for chrome
if(typeof data === 'string') {
}
#for firefox
if(typeof data === 'object') {
}
Post a Comment for "Json Syntax Error In Firefox Only"