By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,598 Members | 1,894 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,598 IT Pros & Developers. It's quick & easy.

Old BrowserWorkaround Unnecessary?

P: n/a
tj
More and more, the protection for preventing code inside <script></script>
tags from being read as
text in some old browsers is being left out.--

<script type="text/javascript">
some code . . .
</script>

.. . . rather than . . .

<script type="text/javascript">
<!--
some code . . .
// -->
</script>
For instance, Google (http://www.google.com/) uses the protection but
Amertrade (http://www.tdameritrade.com/welcome1.html) does not.

Older browsers are increasingly very hard to run, secure, update and
reloaded onto a system. Do you folks think it is safe to move on and drop
the 'old browser' protection?

TIA,

tj
Sep 18 '06 #1
Share this Question
Share on Google+
6 Replies


P: n/a

tj wrote:
More and more, the protection for preventing code inside <script></script>
tags from being read as
text in some old browsers is being left out.--

<script type="text/javascript">
some code . . .
</script>

. . . rather than . . .

<script type="text/javascript">
<!--
some code . . .
// -->
</script>
For instance, Google (http://www.google.com/) uses the protection but
Amertrade (http://www.tdameritrade.com/welcome1.html) does not.

Older browsers are increasingly very hard to run, secure, update and
reloaded onto a system. Do you folks think it is safe to move on and drop
the 'old browser' protection?

TIA,

tj


.. . . if not now, within a few years, certainly . . .

-----------

Earnie

Sep 18 '06 #2

P: n/a

tj wrote:
More and more, the protection for preventing code inside <script></script>
tags from being read as
text in some old browsers is being left out.--

For instance, Google (http://www.google.com/) uses the protection but
Amertrade (http://www.tdameritrade.com/welcome1.html) does not.

Older browsers are increasingly very hard to run, secure, update and
reloaded onto a system. Do you folks think it is safe to move on and drop
the 'old browser' protection?

It depends what market you're working in. In the K-12 education market,
the client normally demands that everything be compatible with Netscape
4, becuase some schools are quite poor and have not upgraded their
machines much in the last 6 years.

In other markets, cutting edge technologies are more common. This last
year I've been working on cutting edge projects that are heavy on AJAX
and that make no effort to be compatible with older browsers.

One's audience matters. Google is going for the biggest possible
market, so it offers some backwards compatibility. Ameritrade can
reasonably assume that it customers are affluent and therefore probably
up to date with modern browsers. I imagine the programmers at
Ameritrade looked at their visitation logs and realized that 99% of
their audience has browsers from the last 2 years. So why should they
bother with backwards compatibility? I imagine what their doing is
rational, given what their visitation logs are telling them.

Sep 19 '06 #3

P: n/a
tj wrote:
Older browsers are increasingly very hard to run, secure, update and
reloaded onto a system. Do you folks think it is safe to move on and
drop the 'old browser' protection?
Most certainly.
See http://www.javascripttoolbox.com/bes...ices/#comments

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
Sep 19 '06 #4

P: n/a
Jake Barnes wrote:
tj wrote:
More and more, the protection for preventing code inside <script></script>
tags from being read as
text in some old browsers is being left out.--

For instance, Google (http://www.google.com/) uses the protection but
Amertrade (http://www.tdameritrade.com/welcome1.html) does not.

Older browsers are increasingly very hard to run, secure, update and
reloaded onto a system. Do you folks think it is safe to move on and drop
the 'old browser' protection?


It depends what market you're working in. In the K-12 education market,
the client normally demands that everything be compatible with Netscape
4, becuase some schools are quite poor and have not upgraded their
machines much in the last 6 years.
All browsers since Netscape 2 (1995) and IE 3 (1996) have known not to
display the content of script elements. Anyone using Navigator 1 or IE
2 (or similar ancient browsers) will have far more issues to deal with
than the display of script element content - I think they'd be quite
dysfunctional. Navigator 4 and IE 4 (both released in 1997) are as far
back as anyone should consider supporting, and they definitely know
about script elements - even if they can't run many modern scripts.

If you really are serious about not displaying the content, put it in
an external script file (which is where is should be anyway) so the
script element has no content for browsers to display, regardless of
how ancient or non-standards-compliant it is.
--
Rob

Sep 19 '06 #5

P: n/a
Jake Barnes wrote:
tj wrote:
More and more, the protection for preventing code inside <script></script>
tags from being read as
text in some old browsers is being left out.--

For instance, Google (http://www.google.com/) uses the protection but
Amertrade (http://www.tdameritrade.com/welcome1.html) does not.

Older browsers are increasingly very hard to run, secure, update and
reloaded onto a system. Do you folks think it is safe to move on and drop
the 'old browser' protection?


It depends what market you're working in. In the K-12 education market,
the client normally demands that everything be compatible with Netscape
4, becuase some schools are quite poor and have not upgraded their
machines much in the last 6 years.
All browsers since Netscape 2 (1995) and IE 3 (1996) have known not to
display the content of script elements. Anyone using Navigator 1 or IE
2 (or similar ancient browsers) will have far more issues to deal with
than the display of script element content - I think they'd be quite
dysfunctional. Navigator 4 and IE 4 (both released in 1997) are as far
back as anyone should consider supporting, and they definitely know
about script elements - even if they can't run many modern scripts.

If you really are serious about not displaying the content, put it in
an external script file (which is where is should be anyway) so the
script element has no content for browsers to display, regardless of
how ancient or non-standards-compliant they are.
--
Rob

Sep 19 '06 #6

P: n/a

tj wrote:
More and more, the protection for preventing code inside <script></script>
tags from being read as
text in some old browsers is being left out.--

<script type="text/javascript">
some code . . .
</script>

. . . rather than . . .

<script type="text/javascript">
<!--
some code . . .
// -->
</script>
For instance, Google (http://www.google.com/) uses the protection but
Amertrade (http://www.tdameritrade.com/welcome1.html) does not.

Older browsers are increasingly very hard to run, secure, update and
reloaded onto a system. Do you folks think it is safe to move on and drop
the 'old browser' protection?
As RobG put it, a browser has to be exceptionally old to try to render
the contents of a script element. Are you testing your pages in IE2?
Yes, but, now you might need to start thinking about the "new" borwser
protection. Like using CDATA to wrap scripts in XHTML docs. But, that
will start a new flame war.
Again, just follow Rob's advice and use an external file and save
yourself alot of grief

Sep 19 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.