Monday, November 7th 2011


NGinx not compressing CSS and Javascript
posted @ 8:11 am in [ Fixing Things -Javascript -Magento -PHP -Web Design ]

Another challenge to catch-out the unwary, is that the latest CentOS/RedHat YUM repository version of NGinx, the fantastically fast web server we use for Magento, has some case scenarios where even though it should be compressing CSS and Javascript, it simply doesn’t!

The reason why seems to be that most definitions for what types of files NGinx should compress posted across the forums of the web, include the “text/html” type, such as:

gzip_types text/plain text/html text/css application/json application/x-javascript text/xml application/javascript text/x-js;

Now the problem with this seems to be that NGinx throws a simple warning that it has already got “text/html” defined as it does this by default, however what it then doesn’t tell you is that it IGNORES all the other definitions that come after it in the same line.

So what that means is that if you have the line above in your config file, even though you are defining for example “text/css” as being a file type to compress, NGinx will ignore this as it stops reading the line as soon as it hits the “text/html” double definition.

To fix, remove “text/html” from your line (*and while you are there you might as well just define the types we are using) and it will all work again.

Here’s my line for reference:

gzip_types text/css application/x-javascript;




Sunday, September 14th 2008


Snaz – mobile shopping
posted @ 5:21 am in [ Flash -iPhone -Javascript -Mobile -Technology -Web Design ]

I was tidying up an old hard-drive I had today, and came across this article from New Media Age where we talked to them about Snaz, our mobile shopping solution from the days of early .com

 Interestingly the idea is still good, however now that the browsers on phones are so good that they can run Javascript and interpret style sheets, the need for rendering on the fly is a little defunct.

Still it’s funny how the world goes 360 and we are now at Skywire producing iPhone and Blackberry friendly versions of our clients’ websites, which have their own detection code, as the iPhone can’t run Flash at the moment and the Blackberry’s rendering engine is terrible!

Snaz : New Media Age




Monday, April 30th 2007


White noise jpg fading problem in Internet Explorer 6
posted @ 5:23 am in [ Javascript -Prototype Library -Scipt.aculo.us -Technology -Web Design -Web2.0 ]

You wouldn’t believe it was true, but there is an incredibly annoying problem in Internet Explorer 6 (IE6) where fading out jpg images using nice libraries like script.aculo.us or prototype.js gives a strange ‘white noise’ effect on the image during the transition.

Well, it turns out it is actually a bug in IE6 where it takes true-black colours in JPG images to be transparent, and thus shows the background colour behind it when fading the image (in our case white).

So how to work around it?

Easy – go into Photoshop and adjust the levels to remove the true black in the image – Image -> Adjustments -> Levels and slide the true black slider 1 or 2 pixels to the right. Save out your image again and the jpg artifacts are gone.

Weird but true! and here’s the pointer I found to solve the problem from a Slimbox forum

– SNIP –

“white noise”: After making some tests with images showing the problem, I’ve come to the conclusion that:

– It is NOT related to the software generating the images.
– It shows in totally black areas of a jpeg image in Internet Explorer only.

It’s like the black portions of the images are interpreted as transparent by IE, so the background color (white by default) shows through them. So far I’ve only seen this happening in Internet Explorer (both IE6 and IE7). Thank you Microsoft for making the lives of web designers and programmers so fun.