473,385 Members | 1,531 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Old BrowserWorkaround Unnecessary?

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
6 1203

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

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
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
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
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

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: r.e.s. | last post by:
I have no PYTHONPATH nor any other python-related environment variables, yet everything seems fine. (I'm using PythonWin with winxp.) As long as modules are loaded through PythonWin, is...
383
by: John Bailo | last post by:
The war of the OSes was won a long time ago. Unix has always been, and will continue to be, the Server OS in the form of Linux. Microsoft struggled mightily to win that battle -- creating a...
3
by: belief | last post by:
I write a non-template simple string with the technique that giving the same string a same storage with a count. so i must give the necessary copy operation when the string will be modified, I...
23
by: Alberto | last post by:
An OUTSTANDING example of a rebuttal. Worth a glance. Rather long, OBVIOUSLY feel fee to dismiss it entirely if not interested. But this habit of the rebuttals must go to a stop (forgive odd...
0
by: galkas | last post by:
Hello I have got a report, which can run on 3 groups of data: College Faculty School Faculty contains schools. College contains faculties. The report can be run for college, then it includes...
3
by: baumann | last post by:
hi all, i could not understand the "unnecessary" pointer comparison. /* 207 * min()/max() macros that also do 208 * strict type-checking.. See the 209 * "unnecessary" pointer comparison....
2
by: Ernst Elzas | last post by:
Hello, If these questions have been asked numerous times before, please excuse me, I have not managed to find the information I needed. I'm making a webpage (for now it will only be in two...
3
by: Oscar Thornell | last post by:
Hi, I am looking for a feature/functionality in VS.NET 2005 that removes using directives/includes of unnecessary namespaces. IDEs like Eclipse and JBuilder have had stuff like that for years...
4
by: Andreas Bauer | last post by:
Hi, I have to audit some c# code. I know in the options I can adjust how the code should be formatted while entering it. But is there any way to apply afterwards a code template to the classes...
49
by: jacob navia | last post by:
In one of the previous discussions I received a note from C.B. Falconer indicating me that a cast from long long to int was unnecessary since the compiler will do that without the cast...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.