bloginfo('name');

bloginfo('description');

Archives Posts

Finally! Webfonts are becoming a reality (via @font-face)!

Februar 12th, 2009 by Blu:RayNe

Great things to come! Browser support for Webfonts via CSS @font-face:

  • Internet Explorer 4–7 : Embedded OpenType (EOT)
  • Safari 3.1: TrueType, OpenType(TT), OpenType(PS)
  • Opera 10 alpha: TrueType, OpenType(TT), OpenType(PS)
  • Firefox 3.1 beta: TrueType, OpenType(TT), OpenType(PS)

Somehow i knew the browser from hell plays the devil’s game again :( MSIE8 probably should have it, too. But I would have to check back for it.

Here’s a nice presentation and a font matrix about the topic by Richard Rutter:

Well, as he tells us typographers will go wild on beeing scared about seeing their oh sooo expensive fonts everywhere embedded in the web. Perhaps it will be so. I don’t mind. This is a good chance for creative common fonts and yet unknown font designers to get known at least among the good web designers!

Filed under Browser having No Comments »

Archives Posts

Aaaargh! MSIE must die! Flicker problem solved!

Februar 3rd, 2009 by Blu:RayNe
<head>
<title><?php print $head_title; ?></title>
<?php print $head; ?>
<?php print $styles; ?>
<?php print $scripts; ?>
<script type="text/javascript"><?php /* Needed to avoid Flash of Unstyled Content in MSIE */ ?> </script>
</head>

So stupiiiid! But a trick I didn’t know yet… from the Drupal Zen Theme.

Archives Posts

Uploads via HTTP are still an issue…

Februar 1st, 2009 by Blu:RayNe

Even in the days of Web 2.0 you encounter many errors when it comes to Uploads via HTTP. The protocol was never made for uploads or better to say: there are still enough bugs in implementations and the protocol itself.

Very familar, e.g. is the problem of having a meter on upload progress. And i also don’t want to mention the problems of WebDAV implementation of Windows for now, or the limitations of firewalls or proxies…

But let’s have a look on solutions provided today in the Web for Uploads…

Flash/HTTP

We have a modified version of R6 running on a webshop with regular uploads of 20-70MB files. If upload goes to fast – like on business lines with upstream ≥3Mb – Flash is likely to throw errors telling the visitor a script is running too slow. Then the customer has to choose „continue“ or to „cancel“, which usually ends up in canceling the job :-(

This behavior is caused by Flash calling the „onFileChunkComplete“-Event (or something) too often, or let’s say after every 4096 bytes sent, which can result in many many calls if you have a good upstream bandwidth.

Second, there are also those „unknown errors“ in Flash caused at runtime. The source yet is unknown and it seems to continue with Flash10 and  some little amount of customers smaller than one percent share. Sorry, unknown means unknown and Adobe won’t give support here! we’re back to Flash9 :-?

Yet the same thing happens to JavaScript if update goes too fast and too often, e.g. by using a progress bar constantly being updated (20-50times in the second). Therefore I had to split up the graphical update process to a seperate class that just goes on update intervals calling the current/total-values of the FileUpload-Class.

Well using Flash as upload client is nice, especially with the ability to use real sockets. For Flash9 the HTTP methods don’t provide the possibility of splitting large files – so you could upload them in seperate chunks. It’s about  security.

Then Flash10 possibly could do now (by accepting local files), but here we have the issue of having the upload beeing fired from Flash itself – scripting doesn’t work anymore, so no hidden flash uploader, that could do the job :cry:

But customer complaints still continues… especially form those using MSIE and don’t get a thing right.

PHP and APC, for now. HTTP again…

Okay, usually you gotta think this works now. It’s out now for long enough.  But fail of proof!

I leeched some script form PHPRiot yesterday by Quentin Zervaas, fixed some bugs (while(1=1) is great idea in JavaScript 8-O ), added a file limit check and hoped i finally would have something that really works.  But it didn’t:

  • Multiple file-fields do not work with APC
  • If file uploaded is greater than far greater than limit, apc throws out 0-values for current and total
  • Sometimes just seems stop working somehow; but after an apache restart apache it works again :cry:

I tried so many ‘solutions’ now and somehow it really seems to me, that monitoring the upload by calling a server-side status-script always has some problems. Probably it is really an Apache-issue… we’ll have too see…

Sliced HTTP Upload via Plugins – a solution?

I already mentioned it in the Flash/HTTP section, and indeed it’s more safe, because the file chunks are simply smaller!

I did many tests with Apache, and often it just happens that Apache closes a TCP connection on big file uploads. The source is yet unknown to me. Probably it has to do with Apache itself. I didn’t encounter the problem when using FastCGI and a Perl-Script to handle my upload.

So, i guess doing sliced upload is a good option. But then you could only use Flash10 which has other restrictions or Java. Yep, that thing that only works on 70-80%  of user browsers, MSIE for the rest that reports about having Java supported – true indeed – the other problem is: does it really run on those often misconfigured and compromised customer systems?

Well Flash10 now does, but have some limitations we probably could live with:

  • load() and save() APIs can only be called in response to user interaction (such as a button click).
  • locations of the loaded and save files are not exposed to ActionScript.

Since the API is now asynchronous (non-blocking),

Final match: HTTP vs. FTP-Uploads in the client

  • HTTP was not made for upload!
  • use more bandwidth than you actually need (base64!)
  • HTTP is not resumeable (but you could retry on splitted chunks)

Let’s summariuze: You can only monitor what was uplaoded by having control over your client and you can only split files, when you have access on it.

Use a Java-Applet or code a Flash-Client that works over FTP! And use a FTP-Server that is secure and can handle virtual users, like vsftpd. Then code some backend,

Yes! Probably it is a solution. But you still have the problems with users not supperting Java, or who complain about Java „loading“ too long. Here are some other good tries, that usually work:

We’ll see further when the first FTP libraries for Flash 10 are finished.

Archives Posts

MSIE8 is not a modern web browser!

Januar 14th, 2009 by Blu:RayNe

Let’s have a look at what Microsoft promises us with MSIE8 – the revelation for all web developers! Nah, as developer you might have enough reasons to complain about that piece of broken software, or as i call it “the browser from hell”:

MSIE8 doesn’t have JavaScript. It has JScript and it isn’t as good as JavaScript. While others implement ECMAScript 4 or partly already have, Microsoft makes idiotic proposals for ECMAScript 3.2. And they even wonder why there’s so much heavy critics on it!

In native JavaScript i can extend all my objects. I can’t do that with XMLHTTPRequest because it’s not a native object, but links to an ActiveX-control instead.

Bullshiting the customer is one thing Microsoft can really do well. MSIE still has about 50% visits on our web sites. And about 40% of all MSIE users still use MSIE 6.0. It’s also great downloading a new VirtualPC test image all 3 months [as of summer 2007].

JScript in MSIE ist still pain in the ass. Probably it supports now some part of DOM – but it does not correctly.

Debugging JavaScript in MSIE ist still pain in the ass. I got enough enough errors in „line 0?, or the line of in the middle of nowhere where MSIE shows the line number in generated code. I even got an „Unexpected error in line -237322? once!

Debug tools do not always work correctly in MSIE because the browser doesn’t work correctly.

Then, on ACID3 most stabil browser do 50-60 points at the moment, Firefox 3 does 68 and Webkit does now 100 points! And what the fuck does MSIE8? Correct. 17 points out of 100. That’s 3 points more than MSIE7 but far below what other browser do at the moment.

MSIE8 does not pass ACID2! That’s because Microsoft has to load some ActiveX-Controls to pass. For the official ACID2-test site they deactivated the checks, on other sites you may encounter a warning that the site is not safe.  ACID2 has to be passed on whatever URL the test is!

Even PNG isn’t working correctly in MSIE and not to speak about SVG support…

Wheew, and then we have now 6 downloads per host. Great increasement over the 4 pipes in the older version.

Wikipedia lists some nice tables about comparison of layout engines, including HTML, XML, XHTML, Graphics, CSS, DOM, HTML5, ECMAScript and SVG-capabilities.

Well, at least they made one thing correct: MSIE8 still outputs Mozilla/4.0 in his UserAgent string. So i can say without any doubt, that it ia still not a modern web browser!

P.S.: Hey Microsoft, get Gecko or Webkit and just shut the fucking MSIE-Thing down! You will probably be faster in implementing the bugs of the former MSIEs than making your MSIE/Trident do run correctly. And if you haven’t realised there’s also a Gecko ActiveX-Control!

I wrote this article because i had an MSIE8 testdrive and now have three stylesheets for MSIE browsers. Ah yeah, the website runs without pages and even faster in really standard-compliant browser such as Opera, Safari, Firefox, Konquerer…

Archives Posts

MSIE – Dante’s Inferno for Linux (or Web Developers)

Dezember 21st, 2008 by Blu:RayNe

ies4linux is a nice project that brings MSIE 5.0, 5.5, 6.0 and 7 to Linux under WINE.

Filed under Allgemein, Browser, Linux having No Comments »

Archives Posts

„Sehr geehrter Kunde, Ihre Mail ist Spam!“

Juli 16th, 2008 by Blu:RayNe

Und das sag ich immer wieder, da es anscheinend noch unzählige Leute in der Druck/IT-Branche gibt, die eigentlich hier nichts zu suchen hätten. Ich erhalte immer noch viel zu Mails ohne Subject und ohne eindeutigen Bodytext, der mir beschreiben würde, um was es eigentlich geht. Manchmal fehlt sogar die Ansprache, oder Footer mit Firmenadresse.

Selbst ist man damit oft zu Rücksprachen gezwungen, die oft lange überflüssige Telefongespräche nach sich ziehen. Aber besser wenn der Kunde von selbst anruft, da gibt es noch andere Möglichkeiten…

–„Neee.. ich habe Ihre E-Mail nicht gesehen.. ich glaube ich hab da nichts bekommen… moment… ich guck mal… ah.. hier.. Spam.. naja.. die Mail is ja auch Spam…“
– „Wie! Spam?! Meine Mail ist doch keine Spam… !“ (sichtlich verblüfft)
– „Kein Subject, kein Inhalt und nur eine PDF als Anhang wäre unter meiner Sichtweise auch Spam… und schließlich ist die Absenderadresse fälschbar. Oder was würde sie unter Sichtweise des Anti-Spam-Programms sagen?“

Und dann gab es gestern noch die Frage an mich: „Warum hast du die UPS-Mail nicht bearbeitet, die ich dir weitergeleitet habe?“. Und ich sagte nur „UPS-Mails haben keine .EXE-Änhange und kommen nicht von tfds.vddseew@hotmail.com“ *seufz*

Hierbei handelte es sich wieder einmal um Vorgesetzte…

Filed under Berufsalltag, Browser, Fun, Linux having No Comments »

Archives Posts

Webkit got 87 points on ACID3-Test!

Februar 29th, 2008 by Blu:RayNe

It seems they wanna make it first. You could argue about that test and what the result really tells. But the way i see it, it’s a good effort to put in development to pass a one common test. You cannot miss much important features to pass this test!

Well, here are the my current results for the ACID3:

Browser Score System/Comments Screenshot
Firefox 3.0-b4nightly 67 Windows; Nightly built from 2008-03-05  
iCab 4.0.1 39 Mac OSX 10.5  
MSIE6 11 XPSP2-current;MSIE6 Developers VPC Image here
MSIE7 13 XPSP2-current;  
Opera 9.5 Build 4681 65   here
Safari 3.1 Beta 76 Mac OSX 10.5  
Safari 3b 39 Windows; early beta, or alpha?  
Safari/Webkit 86 Windows; r30707 built on 2008-02-27 here
Webkit 87 r30654 built on 2008-02-29  
Browser Score System/Comments Screenshot
Firefox 2.0.0.12 50 Ubuntu and Windows  
Epiphany 2.20.1 50 Ubuntu Gutsy; crashes  
Konqueror 3.5.8 - Ubuntu Gutsy; crashes  
MSIE6 4/11 XPSP2-current;MSIE6 Developers VPC Image here
MSIE7 12/13 XPSP2-current;  
Opera 9.26 46 Windows  
Konqueror 3.5.9 50 Ubuntu Feisty Fawn  
Safari 3.0.4 39 Mac OSX 10.4  
Safari 3.0.4 39    

UPDATE: Some more browser and seperation i

Filed under Browser having No Comments »

Archives Posts

WYSIWYG-Editors: They just don’t get it!

August 2nd, 2007 by Blu:RayNe

When will you guys finally learn to write good documents?! Yesterday the popular JavaScript framework Ext 1.1 was released, including finally a WYSIWYG web-editor:

If you don’t see what’s wrong about that editor, let me help you: Nowadays, when you write a document or an article, you got different headlines, different paragraph types that when properly used, automatically let’s you create a table of contents, like seen on Wikipedia articles or in OpenOffice.org OpenWriter (or Microsoft Word). You have also style sheets that automatically do the work of assigning different homogenous styles to your headlines throughout the document.

But here again i don’t see any combo-box for formats! Buttons like “make text bigger” or “make smaller” or “font-family” or “font-size” do not make any sense at all and only encourages bad formatting!

Recently i searched for an alternative blogging client, but i could not use any of them because most did not even have a „format“-field. All my beloved stylesheets assigned to lists and headings here would have be gone! But that’s exactly why they exist! Are you crazy not using them in your editors?

As it goes for having toolbar buttons, these are are absolutly sufficient: “Format” “Remove Format” | „Bold“ „Italic“ | “Unnumbered List” “Ordered List” “Intend” “De-Intent” |  “Add Link“ “Remove Link“ | “Text-Foreground” “Text-Background” | “Insert Table” „Insert Image“  should be enough for most users!

Filed under Allgemein, Browser, CSS having 3 Comments »

Archives Posts

Post-load your JavaScript and CSS files!

Juli 25th, 2007 by Blu:RayNe

If you look at todays web 2.0 sites you will realize there is often a heavy load on external JavaScript resources, CSS files and probably images. Above compressing and optimizing the files and merging multiple files (also background-images), there is not much room to further optimize the page loading process.

One problem of many modern sites is that they often provide optional functions for the user at the price of loading the main libraries all at once ending in a terrible site- and javascript-performance. I’ve already spoken about that once before and see more and more a good chance for web-applications based on Flex, or a real interface-language or perhaps Java. But we’re speaking about web-sites here not applications (anyway you could intermix them)!

Imagine a „passage-way“ or „pass-by“ page: How many of your users will use your “godly” fully featured search-window that you’ve implemented with Ext or the Prototype Window-Script and that runs inside the page? And what about  overall JS and CSS footprint about 150KB? Really needed? And oh, it’s the only part of the website you’re using these scripts.

Maybe one of ten users will use your “godly” feature. The others all have to load the site, the slow JavaScript and you will pay bandwidth.

So, why don’t you just simply load the parts of the site when you need them? AJAX – it’s all about that but still people are loading tons of libraries on every single site!?

As you might guessed i worked on such a script today. It works pretty well in Firefox and Opera (not yet Safari and fucking MSIE), and i still have to come up with some issues and heavy testing (especially on older browser that probably don’t wanna let their DOM injected JavaScript or CSS; so a good wrapper for <script> is necessary). I just wonder why no one didn’t come up with that idea and a working script before. It saves me about 120KB on a product page. And 50KB on other sites. Now that’s ok?!

Here’s a little preview of the alpha sourcecode

/**
 * Post-Load
 * @version 0.1a
 * @desc Why preload all your scripts? Dynamically them when they are needed!
 * @author Markus Geiger 2007
 * @package Postload
 * @license MIT
 * @url http://blog.evolution515.net
 */

PostloadJob = Class.create();
PostloadJob.prototype = {
    totalFiles: 0, // holds number of total file to load
    loadedFiles: 0, // holds number of loaded files
    completeHandler: null, // function executed on complete loading
    errorHandler: null, // function executed on error while loading
    initialize: function(input, completeHandler) {
        // Init the container for our files
        Postload.htmlContainer = $(‘postload’);
        if (!Postload.htmlContainer) {
            var elem = document.createElement(‘div’);
            elem.setAttribute(‘id’, ‘postload’);
            document.body.appendChild(elem);
            Postload.htmlContainer = $(‘postload’);
        }
        if (input)
            return this.load(input, completeHandler);
    },
    load: function(input, completeHandler) {

        if (completeHandler)
            this.completeHandler = completeHandler;

        if (typeof(input)==‘object’) {
            this.totalFiles = input.length;
        } else {
            input = [input];
            this.totalFiles = 1;
        }

        for (i=0;i<input.length;i++) {
            var filename = input[i];
            if (filename.indexOf(‘.js’)!=-1) {
                this.loadJS(filename);
            } else if (filename.indexOf(‘.css’)!=-1) {
                this.loadCSS(filename);
            } else {
                return false;
            }
        }

    },
    complete: function() {
        this.loadedFiles++;
        if (this.loadedFiles!=this.totalFiles)
            return;
        if (this.completeHandler)
            this.completeHandler();
    },
    loadJS: function(filename) {
        var elem = document.createElement(’script’);
        elem.setAttribute(’src’, filename);
        Event.observe(elem, ‘load’, this.complete.bindAsEventListener(this));
        Postload.htmlContainer.appendChild(elem);
    },
    loadCSS: function (filename) {
        new Ajax.Request(
            filename,
            {
                method: ‘get’,
                onSuccess: this.completeCSS.bindAsEventListener(this)
            }
        );
    },
    completeCSS: function(transport) {
        var elem = document.createElement(’style’);
        elem.setAttribute(‘type’, ‘text/css’);
        elem.innerHTML = transport.responseText;
        Postload.htmlContainer.appendChild(elem);
        this.complete();
    }
}

Postload = new Object();
Postload.htmlContainer = null;
Postload.allFiles = new Array();
Postload.require = function(input, completeHandler) {
    new PostloadJob(input, completeHandler);
}

Example usage

The syntax is very simple. Just use it like require from your PHP or Java language. The only difference is that it handles more than one file and calls a complete-handler when all files have finished loading. So chaining it into your applications should be very easy.

product._openComparisionWindow = function() {
    Postload.require(
        [
            ‘gz?lib/windows-js/javascripts/effects.js|lib/windows-js/javascripts/window.js’,
            ‘gz?lib/windows-js/themes/default.css|lib/windows-js/themes/alphacube.css’
        ],
        product.openComparisionWindow
    );}
Filed under Browser, CSS, JavaScript having No Comments »

Archives Posts

Safari in Deutschland: WebKit jetzt auch für Windows!

Juni 21st, 2007 by Blu:RayNe

Und wär hätte dran gedacht?

Seit Safari für Windows in der Beta-Phase ist, gibt es natürlich auch WebKit für Windows. D.h. also WebKit einfach runterladen, entpacken und nötigenfalls den Pfad zu Safari in der run-nightly-webkit.cmd anpassen. Damit läuft dann Safari auch endlich auf deutschen Windows-Rechnern und bringt auch gleich ein paar Patches mit.

Aber bitte dran denken, dass Safari noch im Alpha-Stadium ist (nein Apple, as ist keine Beta!), und es sich beim WebKit um Nightly Build handelt. WebKit-r23677 scheint jedenfalls heir auf meinem Arbeitsrechner stabil zu laufen und bis jetzt ließ sich jede Webpage problemlos ansurfen.

Trotzdem gibt es noch gelgentlich abstürze. Wie es sich mit Sicherheit verhält ist indes noch eine ganz andere Frage. Aber schließlich geht es ja beim Kunden hauptsächlich um Style. Ergo könnte Safari im Bundle mit iTunes, denn einen iPod hat ja (fast) jeder, tatsächlich den eher träger MSIE empfindlich angreifen.

Ach ja, einen WebInspector gibt es mittlerweile auch für WebKit, schon vor dem Start des Browsers. Microsoft hat dafür locker ein paar Jahre gebraucht um ein halb funktionales Tool für Entwickler auf den MArkt zu schemissen. Und ähnlich Firebug ist es auch noch – und natürlich stylischer á Apple *gähn*.

Filed under Allgemein, Browser having 2 Comments »

« Previous Entries