Opened the solution in Chrome, worked fine...
Opened the solution in Firefox, worked fine...
Now opening the Solution in Internet Explorer..Duh!!...ERROR..
What ?? Why ?? Where??
Surprised? No not really because error is on IE only...hope you got what I meant.
Hello folks,
Welcome to the unique world of issues with respect to IE... :P
Let us open the console to see what is happening here. I know IE do not have a great debugger but we have it at least, fortunately..
XML5608 : Expected Semicolon Line X , Column Y
That's all we have in console and no reference to any file, no links.... We know how it is in IE!! Just we have an idea that it is an XML issue somewhere and there is a missing semicolon. But if we have an issue with the XML, then how did it passed in Chrome and Firefox??
Yes! That is a nice question, but before that let us understand what has caused this issue in first place.
IE is bit strict with parsing tags of XML, JS and even HTML. It can see all the mistakes and will report it as ERROR or WARNING. Unlike other browser which are lenient with this missing tags.
For example, (lets consider the XML 5608: Expected semicolon), we have an URL inside a XML file
<xml>...
<url>http://mywebsite.com?id=1&name=myName</url>
...</xml>
This would have passed and ran successfully in Firefox and Chrome, but in case of IE all "&" should be escaped as "&" else ERROR. In this example XML parser finds a "&name", but it do not ends with a ";". Hence IE's XML parser misunderstood and we have an ERROR thrown and freezes the UI and users gone MAD!!
Next time we face an issue, in IE only, make sure all special characters has been escaped. All escaping codes ends with a semicolon. All special codes like " " are properly written else you will start scratching our head without any reference where is the exact problem is ?
TIPS : During development phase, we should consider IE as the testing platform, because it will at the end make our code error free and keeps all the tags properly maintained. It also helps in escaping all the characters which needs to be escaped in web browser and in case we missed any it will complain unlike other browsers which are intelligent enough to render those. (IE is good considering this. It is strict but good...)
TIPS : Use online HTML, XML validator tool to check the correctness of your codes.
Hopes this will save someone dealing with IE "only" issues.
Happy Coding until next time.. :)
Thanks,
Sovan Misra
Mindfire Solutions
No comments:
Post a Comment