Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

multiple HEAD, BODY and HTML tags okay?

 
paul wheaton
Trailboss
Pie
Posts: 21664
Firefox Browser IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've inherited some jsp code that generates html pages that have lots of HEAD, BODY and HTML tags. I always thought that any html page is supposed to have no more than one of each of these. Not so? Should I expect problems?
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rule of thumb is only one set of head tags, body tags etc. I have seen multiple tags, might give older browsers a headache....On microsoft site, they recommended two head tags for cache problems...so I guess it is doable, but not a great practice.
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Eric Pascarello:
On microsoft site, they recommended two head tags for cache problems...
Then it no longer satisfies the HTML DTD, and quite simply ceases to be HTML. IE may still display it, but there's no guarantee that any other user agent still will. Not that Microsoft would care.
- Peter
 
Randall Twede
Ranch Hand
Posts: 4467
3
Java Python Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
agreed. IE may accept it but it is wrong, wrong, wrong.
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Testing the output in Netsacpe naviagtor 4.7 will also help you see what is missing.
I had the same problem(accidently) and the netscape just displayed the blank page.
[ January 28, 2003: Message edited by: Balaji Loganathan ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic