Archive for the ‘WebStandards’ Category
Wednesday, September 1st, 2010
I was recently working on a website that had a black/dark background and while the typical suite of browsers that I test with seemed fine, Safari showed an annoying white flash when the page was loading.
Some research into this lead to a startling discovery as I personally consider this a bug in the Safari browser’s rendering. It’s often referred to as FOUC (Flash of Unstyled Content). There are several methods that I’ve seen, most employ JavaScript or ordering of CSS files to hide the <body> prior to the page completely loading.
The simplest fix, while not elegant, is to an explicit ’style’ attribute on the <html> tag.
<html style=”background-color:black;”>
Reference:
Tags: background, color, flash, fouc, html, safari, webkit
Posted in Safari bugs, WebStandards, Work | No Comments »
Wednesday, March 31st, 2010
Okay, so this one’s a little old, and I just found it while looking at some of Microsoft Update’s HTML source, it appears to be relevant for MSIE6 and newer and may be responsible for some interesting styling and behaviour of form components.
A quick search for it turns up lots of discussions about other browers such as Firefox being effected if the value is not defined… as such it’s likely a good idea to define it in your pages to be sure.
An old MSDN entry reads…
When running on Windows XP, Internet Explorer 6 and the content displayed in it sports a look and feel that matches the Windows XP platform. You can opt to have your HTML content not take on the same look as the operating system for elements such as buttons and scroll bars, by adding the following META tag:
<meta http-equiv=”MSThemeCompatible” content=”no” />
Cheers
Tags: button, checkbox, css, form, html, meta, msie, msthemecompatible, radio
Posted in MSIE bugs, WebStandards, Work | No Comments »
Thursday, March 18th, 2010
Testing web applications with various versions of MSIE (Internet Explorer) often proves problematic as it’s generally not possible to have more than one version installed on a single Windows installation. There are various approaches, such as:
- Having an entire test lab with different browser configurations.
- More often, it’s also possible to run a set of virtual machines on a single desktop.
- Another option is to find a package that ‘hacks’ around some of the Windows limitations and installs (at least partially) the browser rendering capabilities.
NOTE: the final method above has some quirks, but you can generally use it for preliminary testing by developers as it’s obviously easier to maintain.
Here are a few common packages that I’m aware of:
Happy testing!
Tags: browser, collection, msie, testing
Posted in MSIE bugs, WebStandards, Work | No Comments »
Wednesday, December 16th, 2009
Here’s another great reason to use Linux over Windows. Ksplice Uptrack provides for runtime patching of the Linux kernel without rebooting of the machine. This has great advantages where you need to maintain the security of a server but have limited opportunites to reboot due to SLA’s (Service Level Agreements). Ubuntu Linux was the first supported operating system, other variants are now available too, though often for a fee.
Tags: free, kernel, ksplice, linux, patch, reboot, security, ubuntu, update
Posted in Life, WebStandards, Work | No Comments »
Friday, December 11th, 2009
This is a concept I had forgotten about until recently, it can often serve as a simple means of code obfuscation and is also sometimes referred to as “Decimal Address”.
Some background:
- DNS is used to convert a URL/domain name into an IP address that is used to contact the remote machine.
EXAMPLES:
localhost = 127.0.0.7
giantgeek.com = 99.138.127.198
- IP addresses (as IPv4) are represented as groups of 4 hexadecimal or decimal octets.
- Those numbers can be plugged into a simple formula to be represented as a single large integer.
As such, you can use the following as equivalents:
- http://localhost
- http://127.0.0.1
- http://2130706433
REFERENCES:
Tags: dns, domain, http, ip, url
Posted in WebStandards, Work | 1 Comment »
Sunday, November 29th, 2009
Eventually, you come to a point where the performance of JavaScript becomes an issue. Most modern browsers have made significant improvements in their javascript engines, unfortunately Microsoft has yet to do the same. MSIE’s (at least up to and including MSIE8) javascript performance lags far behind Mozilla/Firefox, Safari, Chrome and Opera.
String concatenation is extremely slow in MSIE, but arrays are generally fast… as such it’s often beneficial to implement an object similar to the Java StringBuffer (or StringBuilder) for JavaScript.
The StringBuffer implementation… you can customize to make it more functional, but this is the core:
function StringBuffer(){
this.buffer = [];
}
StringBuffer.prototype.append = function append(string){
this.buffer.push(string);
return this;
};
StringBuffer.prototype.toString = function toString(){
return this.buffer.join(”");
};
Example:
function example_slow(x1,x2,x3){
var rc = x1;
rc+=x2;
rc+=x3;
return rc;
}
function example_fast(x1,x2,x3){
var sb = new StringBuffer();
sb.append(x1);
sb.append(x2);
sb.append(x3);
return sb.toString();
}
References:
Cheers
Tags: javascript, msie, performance, string, stringbuffer, stringbuilder
Posted in MSIE bugs, WebStandards, Work | No Comments »
Thursday, October 29th, 2009
Here’s a useful trick for minimizing server HTTP connections, unfortunately it’s not universally supported so you will need to provide alternate methods for non-supporting browsers (such as MSIE).
This works by placing the content of the image into the URL itself, as such there’s no need to open up a new server connection and no extra caching at any tier.
<img src=”data:image/gif;base64,R0lGODlhEAAOALMAAOazToeHh0tLS/7LZv/0jvb29t/f3//Ub/ /ge8WSLf/rhf/3kdbW1mxsbP//mf///yH5BAAAAAAALAAAAAAQAA4AAARe8L1Ekyky67QZ1hLnjM5UUde0ECwLJoExKcppV0aCcGCmTIHEIUEqjgaORCMxIC6e0CcguWw6aFjsVMkkIr7g77ZKPJjPZqIyd7sJAgVGoEGv2xsBxqNgYPj/gAwXEQA7″ alt=”embedded folder icon” width=”16″ height=”14″ />
Tags: base64, data, html, http, image, img, network, optimization, performance, url
Posted in WebStandards, Work | No Comments »
Tuesday, October 20th, 2009
Occasionally, there becomes a need to expose the use of the .htaccess file to the domains hosted on your Apache server. This technique is particularly useful when you host websites for external clients (or developers).
The steps to enable it are relatively easy,
-
Uncomment the ‘httpd.conf’ line that reads as:
LoadModule rewrite_module modules/mod_rewrite.so
-
Review (and replace as appropriate) all cases of :
AllowOverride None with AllowOverride All
in the following files:
httpd.conf, /extra/httpd-vhosts.conf, /extra/httpd-autoindex.conf and any related files you may be using.
- Add the .htaccess file into the appropriate websites/folders
- Restart the server to accept the changes
NOTE: If you develop or host on Windows, you’ll likely have problems creating the file because there is no filename, just a file extension. You can create (or download) it from any non-Windows host and use it without additional changes. Apache does let you use a different filename, but you also need to be careful to update related security configuration that is used to prevent download of such files.
Happy hosting!
Tags: apache, conf, configuration, host, htaccess, httpd, server
Posted in WebStandards, Work | No Comments »
Wednesday, June 24th, 2009
Through the years, I’ve had to develop, maintain and support software on a variety of systems. Unfortunately, it’s often impossible to maintain specific software versions or configurations installed on physical machines. In the realm of web development, this becomes increasingly complex because of the rapid release of multiple browser versions.
To aid in testing, I’ve found that it’s often best to run these configurations in Virtual Machines, I’ve used VirtualPC and VMWare in the past, but have recently become a fan of Sun’s OpenSource release of VirtualBox as it runs on a wide variety of host systems and supports most x86 based operating systems as clients.
Cheers
Tags: browser, emulation, emulator, free, hardware, open-source, operating system, testing, virtual, virtualization, virtualpc, vm, vmware
Posted in WebStandards, Work | No Comments »
Friday, March 6th, 2009
This topic has come up a few times, especially for some peers that originally built to IBM’s proprietary portlet specification, but desire to move to the “standard” portlet specification.
I found a decent write-up on this topic at IBM:
http://www.ibm.com/developerworks/websphere/library/techarticles/0412_paeffgen/0412_paeffgen.html
Cheers!
Tags: 168, jetspeed, JSR, portal, portlet
Posted in WebStandards, Work | No Comments »