JavaScript and client side scripting.
Moderator: General Moderators
alex.barylski
DevNet Evangelist
Posts: 6267 Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg
Post
by alex.barylski » Sat Jun 30, 2007 4:00 pm
Or rather tricking the HTML parser to skip JS code...
Code: Select all
<script>
//<!--
alert('Now the HTML parser shouldn't choke incase it doesn't understand <script>???');
//-->
</script>
Is this really nessecary? I assume that is what the technique above is doing?
superdezign
DevNet Master
Posts: 4135 Joined: Sat Jan 20, 2007 11:06 pm
Post
by superdezign » Sat Jun 30, 2007 4:40 pm
It was used for browsers that couldn't handle JavaScript. They basically no longer exist, so the method is beyond deprecated.
alex.barylski
DevNet Evangelist
Posts: 6267 Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg
Post
by alex.barylski » Sat Jun 30, 2007 6:10 pm
superdezign wrote: It was used for browsers that couldn't handle JavaScript. They basically no longer exist, so the method is beyond deprecated.
Thats what I figured...except that with the Mobile devices is that really the case?
superdezign
DevNet Master
Posts: 4135 Joined: Sat Jan 20, 2007 11:06 pm
Post
by superdezign » Sat Jun 30, 2007 6:28 pm
Hockey wrote: superdezign wrote: It was used for browsers that couldn't handle JavaScript. They basically no longer exist, so the method is beyond deprecated.
Thats what I figured...except that with the Mobile devices is that really the case?
They don't run the JavaScript, but they are aware that it exists, so they ignore the <script> tags themselves. The commenting is for browsers that are pre-JavaScript age.