HTML, CSS, JS and other unsorted stuff

Subscribe to RSS feed

Posts tagged with "HTML"

Latest (Last?) Opera 12 Performance Test

, , ,

Following the belief "Don't trust any test you did not set up by yourself" I tested Opera 12 against the latest stable versions of other browsers.

Why I used these tests
Most of the performance tests in the wild do not render anything during the test when it comes to DOM or CSS manipulation. My tests do.

Several browsers are quite fast while they run JS scripts without the need to care about visual DOM or CSS changes but eventually break down as soon as they have to render it to the screen. Performing DOM and CSS manipulations on non-visual elements is by far faster but does not measure the real impact those manipulations have on the visual user experience.

The tests utilize a broad variety of math object calls, array manipulations, bit shifting, time object calls, timeouts, intervals, function calls and other common things used on web pages in combination in a more or less real world mix and do not perform the same short action over and over again in a loop like some other tests do. Heavy use of math.random provides additional variances so that caching effects are mostly mitigated.

Of course these tests do not test the full spectrum of JS, HTML, DOM or CSS manipulations, but they were never meant to do so. They just show an aspect that many other tests do not show:
Interaction of browser "modules" while displaying what happens.

Read more...

HTML daftness 002

, ,

Today I got an issue report for cleanPages, about figures not being displayed on this page are not displayed. Some words in front: Under some conditions cleanPages can cope with layout tables:
  • There should be more than about 60 characters of text in the table
  • text should be visible text
  • images should be surronded by text
Look into the relevant part of the source code and try to find the content:
<table cellspacing="0" cellpadding="0" border="0" align="center">
  <tr>
	<td>
	  &lt;br />
	</td>
  </tr>
  <tr align="center">
	<td>
	  <table cellspacing="0" cellpadding="0" border="0" align="center">
		<tr>
		  <td>
			&lt;br />
		  </td>
		</tr>
		<tr valign="top">
		  <td align="center">
			<img src="http://media.wiley.com/Lux/64/20364.nfg006.gif" align="absmiddle" border="0" alt=""/>
		  </td>
		</tr>
		<tr>
		  <td>
			&lt;br />
		  </td>
		</tr>
	  </table>
	</td>
  </tr>
  <tr>
	<td>
	  &lt;br />
	</td>
  </tr>
  <tr align="center">
	<td>
	  <table cellspacing="0" cellpadding="0" border="0">
		<tr valign="top">
		  <td nowrap="nowrap">
			<strong>Figure 1</strong>
		  </td>
		  <td>
			<p />
		  </td>
		</tr>
	  </table>
	</td>
  </tr>
  <tr>
	<td>
	  

	</td>
  </tr>
</table>
Yes, one image and "Figure 1", that's all!

WTF?!

We have got CSS since the dark ages, there is absolutely no need for 3 (in words: THREE!) nested TABLEs since about 10 years. Neither you need one table for the effect, nor advances CSS3 techniques - plain simple CSS1 is enough. As an additional benefit the page would load faster.

Any heuristics, that needs at least a small portion of text (and with TEXT I mean more than ONE Word and ONE number!) to find the relevant content, chokes on this. The code to content ratio is about 25:1 - which is not acceptable in any way.

This is a clear WONTFIX for me. As it is, I don't even know if it can be considered as a real bug. Sorry.

Error correction ...

, , , ...

The web is no nice place for browsers and they have to correct b0rked code in many ways and usually do it quite good - but there is always room for improvement. Take the following piece of invalid HTML code as you can find it on many websites:
1    <div id="mytest">
2        <p class="theClass">blah 
3            <strong id="theID">"foo" 
4                <em arbitrary="someValue">bar 
3            </strong>
2        </p>
5        <script>
5        </script>
6        <p>baz 
4            </em>blubb 
6        </p>
7        <p>test 
7        </p>
1    </div>
Just the </em> is in the wrong place, what causes the segment to be invalid. How do you think different browsers handle it?

Read more...

The unholy font tag

, ,

Font tags, despite being deprecated since a long time seem to be like revenants: You can kill them or take them 6 foot under but a day later they are standing on your door mat again, trying to eat your brains.

Font tags come in different flavors:
<font face="Arial">
<font color="#123456">
<font size="7">
<font face="Arial" color="#123456" (...)>
<font face="Arial"><font face="Courier">Some text</font> mote text</font>

and even in
<font style="font: normal 10px Arial, Helvetica, sans-serif;">

what could have been a perfect shorthand for a <span style="(...)>

Read more...

HTML daftness 001

,

Lately I looked into the HTML source of a big forum and found this:
<br>
<font style="font: normal 10px Arial, Helvetica, sans-serif;">
&mdash;&mdash;&mdash;&mdash; Signature &mdash;&mdash;&mdash;&mdash;
</font>
<br> 
They use style= (what is quite good) so what is so wrong about using a <span instead of the long deprecated <font tag or even better, as this was a signature separator that is repeated several hundreds of thousand times in that particular forum, to just write an additional CSS rule:
.sigsep {font: normal 10px Arial, Helvetica, sans-serif;}
and add the separator like this:
<p class="sigsep">
&mdash;&mdash;&mdash;&mdash; Signature &mdash;&mdash;&mdash;&mdash;
</p>