123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|405|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Off Topic -> Adobe Muse

Tue, 16 Aug 2011, 03:16
HoboBen
Linkage

lol, look at the source code of the new Adobe Muse site, made with Adobe Muse, and weep

-=-=-
blog | work | code | more code
Tue, 16 Aug 2011, 03:16
Jayenkai
Dear god!!!
Tue, 16 Aug 2011, 14:28
shroom_monk
Gotta love how it decides that since my browser is not IE9, it can comment out the IE9 code rather than just not including it all. Surely if it checks that stuff on the server before sending it out, it could remove it rather than comment it?

-=-=-
A mushroom a day keeps the doctor away...

Keep It Simple, Shroom!
Tue, 16 Aug 2011, 15:43
JL235
Shroom_Monk Gotta love how it decides that since my browser is not IE9, it can comment out the IE9 code rather than just not including it all. Surely if it checks that stuff on the server before sending it out, it could remove it rather than comment it?

It is not checking this server side, and it is not commenting out the code. They are IE conditionals, which allow you to write code that optionally runs for different versions of IE. We use this on PMC to disallow certain sections of the player for IE 8 and below.

You can check browser version server-side, but the only truly way to guarantee the IE version is to use IE conditionals. For example Opera is well known for pretending to be IE in it's user agent (don't know if it still does this), but it does not support IE conditionals.

Although I'm in the mindset that if you are going to be spoofing your user agent, then your asking for trouble.
Tue, 16 Aug 2011, 16:13
shroom_monk
Ok then, so ignorance there on my part... but that does seem like a rather strange method of doing it. Is there a good reason for it?

-=-=-
A mushroom a day keeps the doctor away...

Keep It Simple, Shroom!
Tue, 16 Aug 2011, 17:01
dna

I've never heard of it before today. I installed it and will try it later.

I does look interesting.

-=-=-
DNA
Tue, 16 Aug 2011, 17:15
Jayenkai
Good luck. You'll be making they awsum webbersites in no time.

-=-=-
''Load, Next List!''
Tue, 16 Aug 2011, 18:30
Stealth
shroom_monk Is there a good reason for it?


Because sometimes it's literally impossible to get IE 6 - 8 to look right and work in standards compliant browsers.

(Jay: Why don't we have quote buttons?!)

-=-=-
Quit posting and try Google.
Tue, 16 Aug 2011, 20:40
CodersRule
According to Microsoft, conditional comments are there to
make it easy for developers to take advantage of the enhanced features offered by Microsoft Internet Explorer 5 and later versions, while writing pages that downgrade gracefully in less-capable browsers or display correctly in browsers other than Internet Explorer.

Wed, 17 Aug 2011, 04:21
JL235
Shroom_Monk Ok then, so ignorance there on my part... but that does seem like a rather strange method of doing it. Is there a good reason for it?

Why make IE specific code? I disagree with Stealth that it's impossible; lots of modern HTML and CSS can actually be achieved using IE 6. IE 6 supports VML and DirectX filters, which allow you to even do a lot of bits from CSS 3. It's just really ultra difficult to use, especially if you have to make both an IE and CSS 3 version. It's also difficult, but not impossible, to write HTML which will be laid out in the same way in all browsers.

But I'd argue this is easier if you are generating code. For example it is easy for software to know which CSS properties can and cannot be used for cross-browser support, and easy to layout lots of components perfectly using absolute positions. Those are things which are difficult, or annoying, to have to do by hand. You can also care less about code quality or quantity, since no one will be looking at it.

Why use IE conditionals for IE specific code? It is the only guaranteed way to ensure that code is IE version specific.

The other method is to check the user agent, which says what browser the user is using, but again this can be easily spoofed (but will be right 99.9% of the time). IE conditionals also allow you to resolve this in the HTML; user agents have to be resolved either by server or client side scripting.

JScript, the MS version of JavaScript, also support comment conditionals. In practice, to write JavaScript code for a specific browser you have to essentially do:

That means every time you hit that section, your check a flag and have a branch. Alternatively, instead of checking the browser you can check if the function or property you are about to access exists, which is marginally more expensive.

IE conditionals allow you resolve all of this when the file is parsed, essentially baking in your browser specific code, making it marginally faster. That can have a big impact if it's in the middle of an intensive for-loop.

IE conditionals are going to be removed in IE 10. This is a good move, as it makes the world more standards complete, but I feel it's a real shame that you cannot do work during compile time.
Wed, 17 Aug 2011, 13:19
CodersRule
Someone redid the page, and the source code is a tad smaller.