in reply to How to display an image on a webpage with minimal code
produces:use URI; print URI->new_abs('../images/t-rex.jpg', 'http://www.example.com/home +/');
http://www.example.com/images/t-rex.jpg
You must have noticed another problem with redirection: caching. The browser thinks, because that's what the server told it, that the location of the image is permanently moved to the URL it got back once. So next time, the browser won't ask again.
You can remedy that, at least on HTTP1.1, with a "moved temporarily" status header, status code 307. That way, next time, the browser will repeat the request.
You might have to find other solutions for browsers that only understand pre-1.1 HTTP, if those still exist.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to display an image on a webpage with minimal code
by Melly (Chaplain) on Nov 15, 2006 at 12:59 UTC | |
by bart (Canon) on Nov 16, 2006 at 19:59 UTC | |
by Melly (Chaplain) on Nov 17, 2006 at 09:36 UTC |