Are you a Google Analytics enthusiast?
Share and download Custom Google Analytics Reports, dashboards and advanced segments--for FREE!

www.CustomReportSharing.com
From the folks who brought you High Rankings!
More SEO Content
International SEM | Social Media | Search Friendly Design | SEO | Paid Search / PPC | Seminars | Forum Threads | Q&A | Copywriting | Keyword Research | Web Analytics / Conversions | Blogging | Dynamic Sites | Linking | SEO Services | Site Architecture | Search Engine Spam | Wrap-ups | Business Issues | HRA Questions | Online Courses
Validation Vs Javascript
Started by
-=seth=-
, Nov 29 2006 12:27 PM
7 replies to this topic
#1
Posted 29 November 2006 - 12:27 PM
Is it possible to use doctype xhtml1.0 Strict, then have javascript in the page content (with lots of = and ? in the javascript coding) and still make the page validate to w3c requirements or am I wasting my time trying
Also am I worrying over nothing, I understand search engines ignore javascript, if w3c picks up errors and it in the javascript, should I simply not worry about it
thanks in advance for your help and suggestions
Also am I worrying over nothing, I understand search engines ignore javascript, if w3c picks up errors and it in the javascript, should I simply not worry about it
thanks in advance for your help and suggestions
#2
Posted 29 November 2006 - 02:28 PM
Strict barfs on too many goodies, I would stick to transitional if you want an easy life. Search engines don't like strict more than transitional and users will not see the difference so worrying about this is worrying about nothing for most web developers. If you have a serious theoretical interest in the future of the web then you might want to make the effort to make pages strict "when possible". But this will have as much impact on your profits as studying Ancient Greek.
#3
Posted 08 January 2007 - 09:14 PM
Yes, I believe you can validate XHTML pages with javascript in them as long as you remember to escape all occurrences of </ with \ resulting in <\/
#4
Posted 09 January 2007 - 03:38 AM
Or simply place all your javascript in an external file, that's what I did for my latest site.
#5
Posted 09 January 2007 - 04:23 AM
Actually the right way to do it is to wrap your code in CDATA tags e.g.
Everything inside a CDATA section is ignored by the XHTML parser.
CODE
<script>
<![CDATA[
// Your javascript code
]]>
</script>
<![CDATA[
// Your javascript code
]]>
</script>
Everything inside a CDATA section is ignored by the XHTML parser.
#6
Posted 13 June 2007 - 12:53 PM
I personally use XHTML Transitions unless specifically requested otherwise by a client. Strict has a lot of rules which conflict with some SEO Practicies. My biggest complaint about Strict is they removed the target="_blank", you can use Javscript to open a new window with a rel="external", but then you stuck if you want to put a rel="nofollow" on the links. I also place as much javascript as possible in external files. Cheers.
#7
Posted 13 June 2007 - 01:22 PM
"they" haven't removed the target attribute at all.
It is still perfectly valid in the DTD where it has any meaning and where it has only had real meaning since the very first days of HTML, and that is the Frameset DTD.
In any thing other than a frameset there can be no valid target frame.
It is still perfectly valid in the DTD where it has any meaning and where it has only had real meaning since the very first days of HTML, and that is the Frameset DTD.
In any thing other than a frameset there can be no valid target frame.
#8
Posted 14 June 2007 - 09:41 AM
Which, of course, has done nothing to stop many of us with a huge pragmatic streak from employing this lowly attribute in ways it may never have been intended, simply because it works very neatly to do something we find on occasion to be useful. 
--Torka
--Torka
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users








