Thursday, April 1, 2010

media="print" and proxy


Really strange thing happened.


One of our developer tried to do a print-friendly rendering of a page. That is, when you print the page, logo is removed, hyperlinks is followed by their URLs written etc. A usual stuff.


He did so using media="print" trick with CSS.


He made it work nicely with FireFox but not on IE. Still needs some improvement, to support various browsers. That's OK. Not my business.


The weird thing is that it behaves differently when you get the page, css everything via a proxy.

The simplest example. If I start Fiddler to see if all come from where they are supposed to, you see it already different in the print preview...


You would normally suspect that some element of the page such as a css file fails to come, due to some authentication/authorization issue for instance, when you go thru the proxy. But Fiddler reports none. The key, linked as media="print", css seems downloaded OK. If the elements are the same, whether or not via proxy, it should behave in the same way...


After almost one day of fruitless investigation, given up... Asked him to revise it, so it works OK with IE as well, and with or without a proxy.


Mmmm...


No comments: