[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: supporting web standards, not renderers, was: khtml and safari
From:       Vadim Plessky <lucy-ples () mtu-net ! ru>
Date:       2003-01-10 18:18:02
[Download RAW message or body]

On Thursday 09 January 2003 13:37, Marco Fioretti wrote:
|  On Thu, Jan 09, 2003 06:08:29 at 06:08:29AM -0300, Duncan Mac-Vicar Prett 
(duncan@kde.org) wrote:
|  > El Thursday 09 January 2003 04:12, Marco Fioretti escribió:
|  > > Web sites should explicitly support Free standards (HTML 4, CSS,
|  > > whatever). They should force users to use *any* browser fully
|  > > respecting those standards, shouldn't they?
|  >
|  > Yes, if a site tries to kick you out because you don't use IE or NS
|  > detecting it through the agent string, the webmaster is wrong, and he
|  > should fix his site, not us our browser
|  >
|  > It is funny when a site kicks you out, then you select a fake IE
|  > identity using that plugin, and the site renders perfectly
|
|  Is it ridiculous and dangerous, more than funny, isn't it? Especially
|  when done not for ignorance or design laziness, but as a license
|  requirement, as mentioned here:
|
|  http://www.linuxgazette.com/issue70/chung.html
|
|  Is there an http header called "CSS_LEVEL_SUPPORT",
|  HTML_LEVEL_SUPPORT, or something. It is the standard in the first
|  place that should provide, instead of, or in addition to User-Agent,
|  the tools to behave properly, right?

You don't need headers like this, you should check corresponding DOM methods 
before using those methods and this would do the trick,

It's quite common(recommended) to use Document.getElementById to check DOM 
support in browser 9see attached example).
If you want to create some eleemnts dynamicaly - check createElement first, to 
be sure that it's supported.

For example, Document.getElementById  returns True in Opera6, but 
createElement method is not supported.

As about CSS - there is a well-defined fallback mechanism in CSS itself, I 
doubt you need any special methods to check it.

|
|  	Ciao,
|  		Marco Fioretti

-- 

Vadim Plessky
SVG Icons * BlueSphere Icons 0.3.0 released
http://svgicons.sourceforge.net
My KDE page
http://kde2.newmail.ru  (English)
KDE mini-Themes
http://kde2.newmail.ru/themes/
["Browser_TEST5.html" (text/html)]

<HTML>
<HEAD>
<TITLE>Browser Testing and Extra Information - ver.5</TITLE>
<!-- This test suite was prepared by <a href="mailto:plessky@cnt.ru">Vadim \
                Plessky</a> in 2000,
     to debug different bugs in Konqueror web browser, as well as bugs in weird \
                JavaScript and HTML code on many web sites.
  -->
</HEAD>

<SCRIPT LANGUAGE="JAVASCRIPT">
<!-- hide from non-JavaScript Browsers

document.write("JavaScript code started");

var MyStr="";
var IE4 =0, IE4up= 0;
var NN4 =0, NN4up= 0;
var isKonqueror =0, isOpera =0;


var doc_layers = (document.layers) ? true : false;
var doc_all = (document.all) ? true : false;
var doc_images = (document.images) ? true : false;
var DOM = (document.getElementById) ? true : false;
var nav_mimetypes = (navigator.mimeTypes) ? true : false;
var nav_plugins = (navigator.plugins) ? true : false;



  manufacturer = navigator.appName;
  version = navigator.appVersion;
  major = parseInt(version);
  userAgent = navigator.userAgent;
  agent_lowcase = navigator.userAgent.toLowerCase();
  OS_platform = navigator.platform;
  hasJava=navigator.javaEnabled();
  Netscape_in_UA = (agent_lowcase.indexOf("netscape") != -1);
  MSIE_in_UA = (agent_lowcase.indexOf("msie") != -1);
  isKonqueror = (agent_lowcase.indexOf("konqueror") != -1);
  isOpera = (agent_lowcase.indexOf("opera") != -1);
  isNS6 = (agent_lowcase.indexOf("netscape6") != -1);

  GeckoEngine = (agent_lowcase.indexOf("gecko") != -1 );

  if (manufacturer.indexOf('Netscape')>=0 && version.indexOf('4.0')>=0)
     NN4 = 1;
  if (manufacturer.indexOf('Microsoft')>=0 && version.indexOf('4.0')>=0)
     IE4 = 1;
  if (manufacturer.indexOf('Netscape')>=0 && major >=4 )
     NN4up = 1;
  if (manufacturer.indexOf('Microsoft')>=0 && major >=4 )
     IE4up = 1;


if ( GeckoEngine )
  document.write( "<P><B>Suggestion:</b> you are using browser based on <B>Mozilla \
Gecko</b> engine</P>");

if ( NN4up )
  document.write( "<P><B>Your browser is compatible with Netscape Navigator 4.x and \
higher</b></P>"); if ( IE4up )
  document.write( "<P><B>Your browser is compatible with Microsoft Internet Explorer \
4.x and higher</b></P>");

document.write( "<HR><P>Manufacturer (appName): "+manufacturer+"</P>");
document.write( "<P>Browser version: "+version+"</P>");
document.write( "<P>appCode: "+navigator.appCodeName+"</P>");

document.write( "<P>userAgent: "+navigator.userAgent+"</P>");
document.write( "<P>Operating System Platform: "+OS_platform+"</P>");
document.write( "<P>Is your browser Konqueror: "+isKonqueror);
document.write( "<P>Is your browser Opera: "+isOpera);
document.write( "<P>Is your browser Netscape6: "+isNS6);

document.write( "<P>Is Netscape word present in UserAgent: "+Netscape_in_UA);
document.write( "<P>Is MSIE word present in UserAgent: "+MSIE_in_UA);
document.write( "<P>Is Gecko word present in UserAgent: "+GeckoEngine);

document.write( "<P>screen.Width: "+screen.width+"</P>");
document.write( "<P>screen.Height: "+screen.height+"</P>");

document.write( "<P>screen.pixelDepth: "+screen.pixelDepth+"</P>");
document.write( "<P>screen.colorDepth: "+screen.colorDepth+"</P>");

document.write( "<P>if Java enabled: "+hasJava+"</P>");

document.write( "<P>Document.images: "+doc_images+"</P>");

document.write( "<P>Document.layers: "+doc_layers+"</P>");
document.write( "<P>Document.all: "+doc_all+"</P>");
document.write( "<P>DOM support (Document.getElementById): "+DOM+"</P>");

document.write( "<P>Plugins supported: (navigator.plugins) "+nav_plugins );
document.write( "<P>MIME Types supported: (navigator.mimeTypes) "+nav_mimetypes );

document.write("<HR>JavaScript code finished");
// stop hiding -->
</SCRIPT>
<NOSCRIPT>
<P>Your browser doesn't support scripting.<P>

<P>If you are running Konqueror web browser on KDE2, please check
menu Settings - Configure - Browser dialog, select Java/Javascript tab,
and Enable JavaScript globaly</P>
</NOSCRIPT>

<BODY BGCOLOR="#FFC0A0">

<font size=+2 color="blue" face="sans-serif">
<p>This test should be displayed in any case - even if you don't have JavaScript in \
your browser</p> </font>

<H2>This test suite was prepared by <a href="mailto:plessky@cnt.ru">Vadim Plessky</a> \
in 2000</H2> <P>Objective: to debug different bugs in Konqueror web browser, as well \
as bugs in weird JavaScript and HTML code on many web sites.</P> </BODY>
</HTML>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic