When loading Mootools More from my server, Android Stock Browser (froyo 2.2 and gingerbread 2.3) flunks out and starts to complain about
Uncaught SyntaxError: Unexpected end of input
The problem is also reported to exist in Dolphin browser on Android Gingerbread 2.3.
At first I figured it could be a transfer-encoding error, but no other desktop browser (msie 6-9, ff 2-4, safari, chromium) nor firefox mobile running on Android 2.3 are experiencing any encoding issues.
My second thought was that the content-length was incorrect, and that most browsers detected this and managed it nicely, but not Android Stock browser. But after careful measurements, this theory has been proven wrong as well.
In other WebKit browsers, this issue mostly seems to be caused by missing end brackets (}
), but it does certainly not appear to be a probable reason for me. Because:
- The problem exists for bo开发者_如何学运维th standard Mootools, unaltered, -- which should be correctly bracketed.
- The problem can be reproduced for multiple versions of Mootools (both 1.2 and 1.3 have been tested)
Edit: The real problem was actually problem with the transfer-encoding. Deflate was allways used if the the Accept-Encoding indicated deflate or gzip. Apart from the Android browsers, Googlebot had problems with our site.
The real problem was actually problem with the transfer-encoding. Deflate was always used if the the Accept-Encoding indicated deflate or gzip. Apart from the Android browsers, Googlebot had problems with our site.
On Galaxy S3 with OS 4.1.2 the very same error was thrown from WebView (pointing line 1) when script at the end of file contained line commented with //
markup, as reported here: http://code.google.com/p/android/issues/detail?id=23437
精彩评论