Getting 404 with jquery.gritter?
You’ll probably never see it unless you use Firebug or look at Apache raw access logs, but jquery.gritter causes 404 errors repeatedly.
The problem with 404′s is that they are like visiting relatives. They don’t go away unless you do something about it, and you usually can’t be bothered to do something about them – because it’s really not that bad.
Of course, sometimes it is. Especially if you get it on every page load. These errors are annoying and clutter your log, potentially hiding important ones. You also get 404 blindness – and you may miss the “real” 404 that your users see.
Still not convince – just think abot the extra half a second or so your users waste with every page load…
If you look at firebug’s console you’ll see something along the following:

Examining the request (in firebug or Apache access log) shows:
In firebug, you can also see the referer:

As you can clearly see (click on the image to see clearly…) – the referer of the GET request is the jquery.gritter.css file. This is strange right?
Well, css files can definitely issue GET requests. For example, they may try to load background images. This calls for a quick look into the css file itself:
position:relative;
margin:0 0 10px 0;
background:url('.'); /* ie7/8 fix */
}
This tries to set a background image on the wrapper div, so that it can solve a nasty IE7/8 positioning bug. However, this results in a GET request to the current directory – which happens to be the css directory. Naturally – this does not end well.
Luckily, the fix is easy. All you have to do is add a real background image. As long as you make it 1px by 1px (or completely transparent) – you’ll be fine and the 404′s will disappear:
position:relative;
margin:0 0 10px 0;
background:url('../img/blank.gif'); /* ie7/8 fix */
}
Look at your logs/firebug – all good now!
Popularity: 3% [?]
One Response to Getting 404 with jquery.gritter?
Leave a Reply Cancel reply
Categories
- Android (1)
- appengine (3)
- Be nice to your users (6)
- CakePHP (13)
- General (6)
- Googlemaps (3)
- Java (16)
- javaScript (5)
- jQuery (11)
- Seam (2)
- Security (5)
- Spring MVC (6)
- Spring Webflow (2)
- Ubuntu (1)
- User Interface (6)
- Wordpress (2)
- Zope (2)
Recent Comments
- paskuale: @Duck Ranger framework’s name: Yii (Yes it is)
- Hanzel: I’m having a hard time understanding why when i click “run as…” in the project it...
- paskuale: Great article, thanks to your article I realized the same thing but with another framework, I don’t...
- Radix: This indeed came first in google and saved heck lot of time for me. Thanks
- Aditya: Spot on!! Thank you!! Had no idea why this error was occurring.
- paskuale: @Duck Ranger framework’s name: Yii (Yes it is)
Archives
- April 2012 (5)
- March 2012 (1)
- February 2012 (1)
- January 2012 (2)
- December 2011 (1)
- July 2011 (2)
- June 2011 (4)
- May 2011 (1)
- December 2010 (3)
- November 2010 (1)
- August 2010 (2)
- July 2010 (2)
- June 2010 (4)
- May 2010 (4)
- April 2010 (5)
- March 2010 (3)
Growing Kiwis
Growing Kiwis is my free service for early childhood education centers, preschools, daycares, kindies and more- any group of children, really.
Let me know what you think!











Thanks! This has been bugging me for an hour. It’s so obvious once you point it out!