Frinavale 9,735
Recognized Expert Moderator Expert
This thread has been split off of the thread about how to align a table in the middle of the page.
@David Laakso:
I finished reading the article and it made me look into using expressions in CSS. Although the author's solution was pretty neat I'm going to avoid using it. There are a few reasons for this decision:
The first reason is because expressions are proprietary to Internet Explorer and so they are not going to work in other browsers.
The second reason is because expressions were made available in IE5 but are no longer supported in IE8. One of the nice things about IE8 is that they are trying to become more standards complaint; but this means that stuff like expressions had to go.
Another reason is because I'd be combining JavaScript into my CSS styles. This could possibly open the website to a cross site scripting attack which may be over looked.
Also, expressions evaluation has a high runtime cost. Apparently they evaluated when the page is rendered, resized, when the page is scrolled, and even when the user moves the mouse over the page!
I'm glad that you opened my eyes to the possibility of dynamic CSS solutions; however, I'm going to stay away from using CSS expressions.
Thanks!
-Frinny
7 3390
I finished reading the article and it made me look into using expressions in CSS. Although the author's solution was pretty neat I'm going to avoid using it. There are a few reasons for this decision:
Just for clarification:
The first reason is because expressions are proprietary to Internet Explorer and so they are not going to work in other browsers.
IE "expression s" are fed only to, and only seen, by non-compliant browsers IE/6 and down using "conditiona l comments" [1]. Compliant browsers do not need to be fixed, nor does IE/7.0, nor will the forthcoming IE/8.
[1] http://reference.sitepoint.com/css/conditionalcomments
One of the nice things about IE8 is that they are trying to become more standards complaint; but this means that stuff like expressions had to go.
Please see above.
Another reason is because I'd be combining JavaScript into my CSS styles. This could possibly open the website to a cross site scripting attack which may be over looked.
That the inclusion of the DHTML used in IE "expression s" could possibly "open the website to a cross site scripting attack" is slim to none.
Also, expressions evaluation has a high runtime cost. Apparently they evaluated when the page is rendered, resized, when the page is scrolled, and even when the user moves the mouse over the page!
The load time using "expression s" is a very slightly slower than using a pure javascript solution. However, this is far outweighed by a much smoother less page jolting experience for users than that offered by a pure js solution.
I'm glad that you opened my eyes to the possibility of dynamic CSS solutions; however, I'm going to stay away from using CSS expressions.
CSS deals with the way stuff looks, not its behavior. With "expression s" you are attaching DHTML in order to make IE/6 and down behave as compliant browsers.
A decision not to support IE/6 is up to you and your client. Not all authors and clients have that luxury. Regrettably, IE/6 will be around for some time to come even after the release of a stable IE/8. However, current thinking among some is that the time to provide IE/6 with pixel perfect emulation of compliant browser rendering are long gone...
The first reason is because expressions are proprietary to Internet Explorer and so they are not going to work in other browsers.
The beauty of them is, only IE gets the penalty of using them, and the other browsers don't need it anyway. I've used expressions (not too many on any one page) for a few things for IE6 alone. 60% of my visitors will never load the expression-- they're using IE7 or a modern browser (I don't have an expression for display: table but I would consider one if I found it-- IE8 understands display: table AND has lost the Haslayout thing, so it wouldn't need the crutch either). Those who do load the expression give their inferior browser a helping hand. Some IE6 folks might have their security settings at the High level (a good thing if they can't switch browsers and are worried about security), and they don't get the expressions (just as they don't get any Java-junk anyway). They simply get a degraded experience. My rule, I think most web developers' rule, is that the site just needs to be readable and functioning, nothing more, for these people.
An expression is a crutch for the crippled. You don't say, grandpa doesn't get his wheelchair because it doesn't help his relatives. Only grandpa needs it, and only grandpa gets it.
There's another way to give scripts to IE alone-- a .htc file sitting on your server like Peterned's whatever:hover or that Edward Dean IE7 script thingie. You can try to make that file as secure as any on your server. It's your file and your server. : )
If you know Shelley Powers, as of January 2010, she refuses to give crutches to grandpa, err IE, of any kind. If IE can't run a current, standards compliant markup, too bad.
Shelley Powers? That poor thing can't make a site that works properly in a compliant browser.
Have you been there lately? I hadn't till just now. I don't know if she sends different content to IE but she serves XHTML as application/xml+xhtml but she does have some errors in it. I don't know if it's because she's sloppy or because she runs on the bleeding edge.
She works down the street from me so I have to give her props. :)
Oh she's fine. Talented, knowledgeable, and on the cutting edge. I was just trying to stoke the stove. But April is almost here.
Yet even more trivial pursuits:
This is an IE expressions discussion. Not a CSS expressions discussion.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Raymond Hettinger |
last post by:
Peter Norvig's creative thinking triggered renewed interest in PEP 289.
That led to a number of contributors helping to re-work the pep details
into a form that has been well received on the python-dev list:
http://www.python.org/peps/pep-0289.html
In brief, the PEP proposes a list comprehension style syntax for
creating fast, memory efficient generator expressions on the fly:
sum(x*x for x in roots)
|
by: zipher |
last post by:
It seems the debate over PEP 308 (if-then-else expression) occurred
prior to the arrival of generator expressions.
Mightn't this new latter syntax be the ticket to a "one obvious way"
to write a ternary expression in python?
>>> (foo(i) if i==42 else bar(i)) # i==42 ? foo(i) : bar(i)
zipher
|
by: tony kulik |
last post by:
This code works fine in ie and opera but not at all in Mozilla.
Anybody got a clue as to how to get it right?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<script language="JavaScript" type="text/javascript">
function show(that)
{
if (box.style.visibility=='hidden') { that.style.visibility =
'visible'};
}
|
by: me |
last post by:
How do I prevent the save/print/email/mypictures toolbar from popping up
when IE users place their cursor over photos at my website? Thank you in
advance for your help.
Signed,
me
|
by: William L. Bahn |
last post by:
===========
(N869, p8) An object is a region of data storage in the execution
environment, the contents of which can represent values.
When explaining this to students, is it reasonable to say
something like:
From a practical standpoint, objects are things that have
addresses - addresses that can be computed. This doesn't
necessarily mean that we can both read and write to that object -
| |
by: nimmi_srivastav |
last post by:
Below you will see an example of a nested conditional expression that
this colleague of mine loves. He claims that it is more efficient that
a multi-level if-else-if structure. Moreover, our complexity analyzer
tool supposedly does not pick it up. Is it really more efficient?
Personally I find this coding style extremely cryptic, misleading and
error-prone.
I believe that I have removed all traces of proprietary-ness from this
coding...
|
by: Neroku |
last post by:
Hello, i would like to know what the serious definition of statements
and expressions is:
i know an expression are evaluated to a value, i.e:
1 == 2
5+7
foo( 1,2)
and a statement is executed:
break;
|
by: Wiseman |
last post by:
I'm kind of disappointed with the re regular expressions module. In
particular, the lack of support for recursion ( (?R) or (?n) ) is a
major drawback to me. There are so many great things that can be
accomplished with regular expressions this way, such as validating a
mathematical expression or parsing a language with nested parens,
quoting or expressions.
Another feature I'm missing is once-only subpatterns and possessive
quantifiers...
|
by: RobG |
last post by:
There has been a discussion on the iPhone web development group where
an opinion has been expressed that function expressions are bad for
performance and can be avoided by using function declarations.
For example (in a trivial case, the function body would do processing
depending on various parameters passed) instead of:
function foo(x) {
var a = function(){x};
return a;
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |