Odd error 404 caused by print.css
Posted by Jesse Rodgers on August 30, 2005 at 02:19 PM
There have been an awful lot of error 404’s reported on CLF based pages. If you look at your log files, you will notice they are look a little like:
/url(\"css/UWprint.css\")%20printWhat appears to be calling it is:
<style type="text/css">
@import url("/css/UWprint.css") print;
</style>Which comes just after the IE 6 conditional comment. So that is why that calling print CSS with the above style call doesn’t work in IE 6.
Chris Gray in the Library has come up with a JS based fix:
<!--[if IE 6]>
<style type="text/css" media="print">
@import url("/css/UWprint.css");
</style>
<![endif]-->
<script type="text/javascript">
var agt=navigator.userAgent.toLowerCase();
var is_major = parseInt(navigator.appVersion);
var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
var is_ie6 = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.") != -1));
if (!is_ie6) {
document.write('<style type="text/css">');
document.write('@import url("/css/UWprint.css") print;');
document.write('<\/style>');}
</script>
This problem has been reported in the certain CSS lists already with no real fix but to call your CSS a different way. I suppose it is just another IE bug. I tend to look at as a Fact of Life (FOL) that as long as I know its there, won’t really concern me. Or should it?