An IE6 post

Addressing an old subject again, misaddressed by many.

No matter how much we all hate IE6, we never seem to agree on what’s the best way to finally get rid of it. Web designers and developers alike have realized that investing too much time and effort in fixing its quirks is not viable from a business perspective, but they still want to reach that audience.

This ambivalence is what still drives people, like myself, to keep writing about the infamous browser.

Continue reading

This post has 21 responses

Posted in Client side about 1 year ago

Prevent caching of modified Javascript & CSS assets

There’s a very useful PHP function called filemtime, that returns the timestamp of the modification time of the file. This is similar to how the HTTP 1.1 ETag header is generated. The strategy is basically to append the modification date to the script or CSS URI in order to refresh the user’s cache when you’ve modified them.

This is an extract from Devthought header.php Wordpress template file:

<link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri() . '/style.css?' . filemtime(get_stylesheet_directory() . '/style.css'); ?>" type="text/css" media="screen" title="Stylesheet" charset="utf-8" />
 
<script type="text/javascript" charset="utf-8" src="<?php echo get_template_directory_uri() . '/js/scripts.js?' . filemtime(get_template_directory() . '/js/scripts.js'); ?>" ></script>

All you have to do is change the routes to match your files. If you’re not using wordpress, you’ll have to remove the get_stylesheet_directory* and get_template_directory* function calls and replace with your paths.

This post has 3 responses

Posted in Server side about 1 year ago

Tip: High quality CSS thumbnails in IE7

IE7 supports a custom bicubic resampling mode for images. Before, resizing a 500×500 image like this:

<img src="pic.jpg" alt="This image is really 500x500 big" class="thumb" width="50" height="50" />

would produce a horrible result in IE, with noticeably lower quality in the resized version.

This is easily fixed in IE7 by applying the following property to the img tag:

img.thumb { -ms-interpolation-mode: bicubic; }

Go to this demo page for a Flickr picture example.

This post has 34 responses

Safari 4 Beta Review

As a Leopard user, I decided a long time ago that Safari would be my Internet browser, whereas Firefox would be my Development browser. The main reason for this was that Safari has historically had an extra care for the UI, which made it better as an everyday use mac application. Today I downloaded the new beta which takes this to the next level.

I’ll review the key new features of Safari 4 next.

Continue reading

This post has 11 responses

Posted in Desktop about 1 year ago

Make Safari create new tabs instead of new windows

Hate those _target=blank as much as I do ? Just run this command

defaults write com.apple.Safari TargetedClicksCreateTabs -bool true

Via: p@rrish blog

This post has 3 responses

Set up the perfect OS X browser testing environment

picture-1

If you’re an OS X user and a web developer, you know how difficult things can get to test your websites or scripts on Windows browsers. Some of the alternatives you might be familiar with are:

Each of them has its disadvantages. The first two involve purchasing software (and the OS, if you don’t have it), and the third can turn out to be slow, crash or provide a different browsing experience.

After watching the screencast by Jeff Couturier I finally achieved the cross-browser, cross-platform testing Nirvana. Here’s how

Continue reading

This post has 4 responses

Posted in Desktop about 1 year ago

YUI Browser Detection

To detect the User Agent in YUI, you have to examine the YAHOO.env.ua hash.
The hash is populated by key-value pairs of the engine name and the engine version.

For example, YAHOO.env.ua.gecko might contain a value of 1.7 or 1.8. If the engine is not present at all (i.e: you’re using MSIE), it evaluates to zero. This means that you can simply check like this if you want to detect any version of Gecko (Firefox):

if(YAHOO.env.ua.gecko)) do_something()

or like this if you need to target specific versions:

if(YAHOO.env.ua.gecko > 1.7) do_something()

The engine names are gecko, ie, opera, webkit, air and mobile. More information check the API

To have YAHOO.env make sure you’re including yahoo.js in your page

<script type="text/javascript" src="http://yui.yahooapis.com/2.6.0/build/yahoo/yahoo-min.js"></script>

This post has No responses

Posted in Client side about 1 year ago

IE7 still creating problems for developers?

For the last couple of years, we developers have been struggling with IE incompatibilities while creating and testing our sites. Those include the non-native support for PNG transparencies, the box model bug, and many many more.

Thanks to the effort of many developers, documenting and gathering information about them, sometimes even providing workarounds, we’ve somehow managed to deal with them.

IE7, however, was supposed to solve all these bugs, and add those all missing features. Nothing could be farther from the truth. In this article I’ll highlight some of the new built-in annoyances.

Continue reading

This post has 86 responses

Posted in Client side over 3 years ago