Go Back   Forum Care Forums > Development Reference Area > Webmaster Topics

Reply
 
LinkBack Thread Tools Display Modes
Space between the tags (or my ears?)
Old
  (#1)
Dylan Parry
Guest
 
Posts: n/a
Default Space between the tags (or my ears?) - 05-14-2007, 01:26 AM

Hi folks,

I was reading an article yesterday and it stressed leaving a space
between the opening and closing tags of a script element as being
*extremely* important for /some/ browsers. ie.,

<script type="text/javascript" src="myscript.js"> </script>
^
I've never heard this before, and more importantly I've never had any
problems when I /haven't/ left a space between the tags. It leads me to
wonder what the article was referring to!

Has anyone else heard of this? If so, which browsers does it affect? Or
was the article merely blowing smoke across mirrors to create the
illusion that the author had clues?

--
Dylan Parry
http://electricfreedom.org | http://webpageworkshop.co.uk

Programming, n: A pastime similar to banging one's head
against a wall, but with fewer opportunities for reward.
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: Space between the tags (or my ears?)
Old
  (#2)
SpaceGirl
Guest
 
Posts: n/a
Default Re: Space between the tags (or my ears?) - 05-14-2007, 01:26 AM


Dylan Parry wrote:

> Hi folks,
>
> I was reading an article yesterday and it stressed leaving a space
> between the opening and closing tags of a script element as being
> *extremely* important for /some/ browsers. ie.,
>
> <script type="text/javascript" src="myscript.js"> </script>
> ^
> I've never heard this before, and more importantly I've never had any
> problems when I /haven't/ left a space between the tags. It leads me to
> wonder what the article was referring to!
>
> Has anyone else heard of this? If so, which browsers does it affect? Or
> was the article merely blowing smoke across mirrors to create the
> illusion that the author had clues?


First I've heard of it.

   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: Space between the tags (or my ears?)
Old
  (#3)
Dylan Parry
Guest
 
Posts: n/a
Default Re: Space between the tags (or my ears?) - 05-14-2007, 01:26 AM

SpaceGirl wrote:

> First I've heard of it.


Glad it's not just me then!

--
Dylan Parry
http://electricfreedom.org | http://webpageworkshop.co.uk

Programming, n: A pastime similar to banging one's head
against a wall, but with fewer opportunities for reward.
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: Space between the tags (or my ears?)
Old
  (#4)
Andy Dingley
Guest
 
Posts: n/a
Default Re: Space between the tags (or my ears?) - 05-14-2007, 01:26 AM

Dylan Parry wrote:

> I was reading an article yesterday and it stressed leaving a space
> between the opening and closing tags of a script element as being
> *extremely* important for /some/ browsers. ie.,
>
> <script type="text/javascript" src="myscript.js"> </script>


It's important if you're planning to process it with an XML parser,
then later with an Appendix C SGML parser. If you don't preserve some
content (whitespace is adequate) then the XML tag minimisation rules
might turn it into an empty element.

Never heard of this applying to browsers, but it's important if you're
expecting to run XHTML over it later.

   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: Space between the tags (or my ears?)
Old
  (#5)
Dylan Parry
Guest
 
Posts: n/a
Default Re: Space between the tags (or my ears?) - 05-14-2007, 01:26 AM

Andy Dingley wrote:
[...]
> Never heard of this applying to browsers, but it's important if you're
> expecting to run XHTML over it later.


Cheers. I wasn't thinking about it from that viewpoint, so the thought
didn't cross my mind! I wonder, perhaps, if the author of the article
was either:

a) Misreading something with regards XML parsers and mistakenly applying
it to real-world browser examples; or
b) Making a statement as it might apply to future browsers

Either way, it would appear that the author was probably misled. A
statement that is supported by his spurious use of "<input...></input>"
in some example code of his that I read elsewhere!

--
Dylan Parry
http://electricfreedom.org | http://webpageworkshop.co.uk

Programming, n: A pastime similar to banging one's head
against a wall, but with fewer opportunities for reward.
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: Space between the tags (or my ears?)
Old
  (#6)
Andy Dingley
Guest
 
Posts: n/a
Default Re: Space between the tags (or my ears?) - 05-14-2007, 01:26 AM


Andy Dingley wrote:

> Never heard of this applying to browsers, but it's important if you're
> expecting to run XHTML over it later.


Doh! Should have said "XSLT"

   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: Space between the tags (or my ears?)
Old
  (#7)
Chaddy2222
Guest
 
Posts: n/a
Default Re: Space between the tags (or my ears?) - 05-14-2007, 01:26 AM


Dylan Parry wrote:
> Hi folks,
>
> I was reading an article yesterday and it stressed leaving a space
> between the opening and closing tags of a script element as being
> *extremely* important for /some/ browsers. ie.,
>
> <script type="text/javascript" src="myscript.js"> </script>
> ^
> I've never heard this before, and more importantly I've never had any
> problems when I /haven't/ left a space between the tags. It leads me to
> wonder what the article was referring to!
>
> Has anyone else heard of this? If so, which browsers does it affect? Or
> was the article merely blowing smoke across mirrors to create the
> illusion that the author had clues?
>

I doubt it would have an affect on web browsers, although it could be
argued that having well formatted code can help with finding errors
and readability.
--
Regards Chad. http://freewebdesign.cjb.cc

   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: Space between the tags (or my ears?)
Old
  (#8)
Dylan Parry
Guest
 
Posts: n/a
Default Re: Space between the tags (or my ears?) - 05-14-2007, 01:26 AM

Andy Dingley wrote:

>> XHTML

>
> Doh! Should have said "XSLT"


Heh. No worries there - I mistakenly *read* it as that anyway <g>

--
Dylan Parry
http://electricfreedom.org | http://webpageworkshop.co.uk

Programming, n: A pastime similar to banging one's head
against a wall, but with fewer opportunities for reward.
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: Space between the tags (or my ears?)
Old
  (#9)
GreyWyvern
Guest
 
Posts: n/a
Default Re: Space between the tags (or my ears?) - 05-14-2007, 01:26 AM

And lo, Dylan Parry didst speak in alt.www.webmaster:

> Hi folks,
>
> I was reading an article yesterday and it stressed leaving a space
> between the opening and closing tags of a script element as being
> *extremely* important for /some/ browsers. ie.,
>
> <script type="text/javascript" src="myscript.js"> </script>
> ^


Bollox.

Grey

--
The technical axiom that nothing is impossible sinisterly implies the
pitfall corollary that nothing is ridiculous.
- http://www.greywyvern.com/orca#search - Orca Search: Full-featured
spider and site-search engine
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: Space between the tags (or my ears?)
Old
  (#10)
Dylan Parry
Guest
 
Posts: n/a
Default Re: Space between the tags (or my ears?) - 05-14-2007, 01:26 AM

GreyWyvern wrote:

> Bollox.


Seems to be the consensus! I was pretty confused when I read the
articles and had to read it twice to make sure I didn't misread it. I
just started wondering whether I'd missed something pretty big (ie. a
technique that I should be using), but obviously I didn't.

--
Dylan Parry
http://electricfreedom.org | http://webpageworkshop.co.uk

Programming, n: A pastime similar to banging one's head
against a wall, but with fewer opportunities for reward.
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Contact Us - Forum Care Forums - Archive - Top