StatCounter User Forum  
StatCounter Free web tracker and counter

Go Back   StatCounter User Forum > StatCounter.com > Feature Request

Closed Thread
 
Thread Tools Display Modes
  #1  
Old 08-01-2006, 11:39 AM
Ward Ward is offline
Junior Member
 
Join Date: Aug 2006
Posts: 2
Default HTML 4.01 Strict

It would be great to have StatCounter Code that complies W3 HTML 4.01 Strict.
I could not get the code validated at http://validator.w3.org/

Thanks

Ward
  #2  
Old 08-01-2006, 12:37 PM
Arne's Avatar
Arne Arne is offline
Moderator
 
Join Date: Sep 2004
Location: Lulea, Sweden
Posts: 5,465
Default

I'll second that request!
At the moment the "compliant" codes is only compliant with Transitional doctypes and making them compliant with Strict would still make them valid for Transitional. The Strict compliant code could then be the default and there would be no need for more than one optional code, for XHTML Strict you add the slash to the img tag and a div inside the noscript part.

But for now, you can make the code valid if you delete manually the non valid parts (in red) as follows.

Quote:
<!-- Start of StatCounter Code -->
<script type="text/javascript" language="javascript">
<!--
var sc_project=0000000;
var sc_invisible=1;
var sc_partition=15;
var sc_security="11111111";
//-->
</script>

<script type="text/javascript" language="javascript" src="http://www.statcounter.com/counter/counter.js"></script><noscript><a href="http://www.statcounter.com/" target="_blank"><img src="http://c16.statcounter.com/counter.php?sc_project=0000000&amp;java=0&amp;security=11111111&amp;invisible=1" alt="counter" border="0"></a></noscript>
<!-- End of StatCounter Code -->
But if you use Firefox 1.5 you probably see the &amp; in the code as plain "&" and that is because of a bug in FF, not Statcounter's fault. So you need to change that to manually.

Last edited by Arne; 08-01-2006 at 12:44 PM.
  #3  
Old 08-01-2006, 02:02 PM
webado's Avatar
webado webado is offline
Moderator
 
Join Date: Apr 2004
Location: Montreal, Quebec, Canada
Posts: 28,173
Default

Use the XHTML option and it should be OK.
__________________
Christina
>>Forum Moderator<<

Please do not PM me for support. The forum is here for that.
  #4  
Old 08-01-2006, 02:41 PM
Arne's Avatar
Arne Arne is offline
Moderator
 
Join Date: Sep 2004
Location: Lulea, Sweden
Posts: 5,465
Default

Quote:
Originally Posted by chrisooc
Use the XHTML option and it should be OK.
It would work, yes. That makes it even easier to choose among the options, if the current page would be changed to show only one option, the strict. The default would be transitional and would not require to choose anything. Now the XHTML option is more or less hided and the text says "very few need it" Huh? It's the only really valid option
  #5  
Old 08-01-2006, 02:56 PM
webado's Avatar
webado webado is offline
Moderator
 
Join Date: Apr 2004
Location: Montreal, Quebec, Canada
Posts: 28,173
Default

Quote:
Originally Posted by Arne
It would work, yes. That makes it even easier to choose among the options, if the current page would be changed to show only one option, the strict. The default would be transitional and would not require to choose anything. Now the XHTML option is more or less hided and the text says "very few need it" Huh? It's the only really valid option
I agree, but things change, WYSIWYG editros trying to keep pace with the time are now using XHTML transitional as default, or html 4.01 strict. Most who use WYSIWYG editors don't know about dtd's and wouldn't relate to that either.

But calling it strict is not going to help when you use xhtml transitional either. How about offering a choice of dtd's and generating the proper code as a function of that? Sure there are only 2 actual flavors in the end based on that.



Oh, do you know if there's any javascript way of detecting the doctype of the current page?
__________________
Christina
>>Forum Moderator<<

Please do not PM me for support. The forum is here for that.
  #6  
Old 08-01-2006, 03:37 PM
Arne's Avatar
Arne Arne is offline
Moderator
 
Join Date: Sep 2004
Location: Lulea, Sweden
Posts: 5,465
Default

Quote:
Originally Posted by chrisooc
I agree, but things change, WYSIWYG editros trying to keep pace with the time are now using XHTML transitional as default, or html 4.01 strict. Most who use WYSIWYG editors don't know about dtd's and wouldn't relate to that either.

But calling it strict is not going to help when you use xhtml transitional either. How about offering a choice of dtd's and generating the proper code as a function of that? Sure there are only 2 actual flavors in the end based on that.
I would prefer to have several dtd options (clearly displayed, not like now!) so those who know what they want (need) really get what they want. Those who don't know about dtd's should get a valid html transitional code by default.

BTW, there is an error in the page where you choose the code version. The check boxes should be radio buttons, since with check boxes you can check for several versions and then don't know what you get. That happends to me, testing to generate the text counter for html only and javascript counters. With radio buttons you can't have a check for more than one option.

Quote:
Oh, do you know if there's any javascript way of detecting the doctype of the current page?
Sorry, no. I really don't know when sutch would be needed? When I go to a page I look at the source to see the doctype.
  #7  
Old 08-01-2006, 03:50 PM
webado's Avatar
webado webado is offline
Moderator
 
Join Date: Apr 2004
Location: Montreal, Quebec, Canada
Posts: 28,173
Default

Some of the wizard options can be combined, like w3c valid and xhtml and secure server. Some dont make much sense combined.

I'd like to be able to autodetect the dtd used in order to automate for instance the selection of SC code to use. In php too, except remote php scripts can't do that much probably.

Just a vague notion I'm tossing about in my head, no substance yet, probably never will have any either
__________________
Christina
>>Forum Moderator<<

Please do not PM me for support. The forum is here for that.
  #8  
Old 08-01-2006, 04:47 PM
Arne's Avatar
Arne Arne is offline
Moderator
 
Join Date: Sep 2004
Location: Lulea, Sweden
Posts: 5,465
Default

Quote:
Originally Posted by chrisooc
Some of the wizard options can be combined, like w3c valid and xhtml and secure server. Some dont make much sense combined.
I can understand the need to get code for secure server as "add-on" to any of the dtd options. But there should not be any need for combined w3c valid and xhtml, just give a valid code whatever option is choosed!

Quote:
I'd like to be able to autodetect the dtd used in order to automate for instance the selection of SC code to use. In php too, except remote php scripts can't do that much probably.

Just a vague notion I'm tossing about in my head, no substance yet, probably never will have any either
Oh, I see. You are tossing around your self again, I presume.
Well, a button in the Favorites with a Javascript string that shows the doctype when you click on it, I'll guess. But I don't know how the string should be written, sorry. But maybee this Web Accessibility Toolbar is of interest? There is a lot of tools with it, and one is the "Doc Info" button that among others have the "Show DOCTYPE" option that displays (in an alert) the DOCTYPE of the current HTML document. I have not test it and therefore don't know anything about it, but I belive it's for IE only.
  #9  
Old 08-01-2006, 05:01 PM
webado's Avatar
webado webado is offline
Moderator
 
Join Date: Apr 2004
Location: Montreal, Quebec, Canada
Posts: 28,173
Default

No, not in the browser. From inside the webpage, so I can program things there.

Yes, I'm tossing myself about again


PS: Something about DomDocument_doctype() ................ if I can figure it out at all. I think that's just php though which may be ok .....
__________________
Christina
>>Forum Moderator<<

Please do not PM me for support. The forum is here for that.

Last edited by webado; 08-01-2006 at 05:04 PM.
  #10  
Old 08-03-2006, 07:30 AM
Ward Ward is offline
Junior Member
 
Join Date: Aug 2006
Posts: 2
Default Validated at HTML 4.01 Strict

Thanks to all who wrote,

I used the XHTML code.
That works perfect, if you put the code in de <body> and not above the <body> like the instruction says.
Closed Thread

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

Forum Jump


All times are GMT. The time now is 07:58 AM.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.