File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Not familiar with this syntax

 
M Burke
Ranch Hand
Posts: 399
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In a JSP I am working on, I see this...

<!--[if IE]>

<![endif]-->

What language is this? Also, IE 10 does not recognize it.

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64196
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you look closely at the syntax, you'll see that's just an HTML comment. All browsers but IE just ignore it as a comment.

IE parses the comment and treats it as a conditional. It's completely non-standard.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64196
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Another variant you might come across (this comes from HTML5 Boilerplate):


Again notice how it's just a comment that will be ignored non-IE browsers.
 
M Burke
Ranch Hand
Posts: 399
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see, thank you. I will change it to JSTL's c:if
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64196
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why? If it works, why upset the apple cart?
 
Pavel Sok
Greenhorn
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Such HTML statement is used in creating forks during the parsing web page by browsers. So use this instead of propagating unnecessary JSTL's tags.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic