[MAGNOLIA-201] "favicon.ico" http request cause unwanted GET Created: 21/Nov/04  Updated: 23/Jan/13  Resolved: 12/May/06

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: 2.0 Final
Fix Version/s: 3.0 RC1

Type: New Feature Priority: Trivial
Reporter: Massimiliano Segreto Assignee: Philipp Bärfuss
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

linux + jsdk 1.4.2_06


Template:
Acceptance criteria:
Empty
Date of First Response:

 Description   

This could cause an unwanted (but minimal) load on webserver

Most browser try to get the "url field icon" from the website, looking for "favicon.ico" in the "/" directory.

Magnolia has no "favicon.ico" in the "/" path, so use the
/server/ResourceNotAvailableURIMapping value to redirect the browser. The browser get the redirect url a do a GET for the new location looking for the "favicon.ico" content at the URL of the "default page" which is obviously a html content.

After the first access the browser always get the redirect for "favicon.ico", but usually does not make any GET to have it because it think to have the right content in local cache (the default html page)

Here a transcript from Firefox + liveHTTPHeader extension trying to browse this url:
http://localhost:8112/caratteri.html


http://localhost:8112/favicon.ico

GET /favicon.ico HTTP/1.1

Host: localhost:8112

User-Agent: Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041001 Firefox/0.10.1

Accept: image/png,/;q=0.5

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 300

Connection: keep-alive

Cookie: JSESSIONID=4EE6BECCCA3977F287D994ACDC3C6317

Authorization: Basic c3VwZXJ1c2VyOnN1cGVydXNlcg==

HTTP/1.x 302 Moved Temporarily

Location: http://localhost:8112/home.html

Content-Type: text/html;charset=ISO-8859-1

Content-Length: 0

Date: Sun, 21 Nov 2004 18:03:57 GMT

Server: Apache-Coyote/1.1

----------------------------------------------------------

http://localhost:8112/home.html

GET /home.html HTTP/1.1

Host: localhost:8112

User-Agent: Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041001 Firefox/0.10.1

Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,/;q=0.5

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 300

Connection: keep-alive

Cookie: JSESSIONID=4EE6BECCCA3977F287D994ACDC3C6317

Authorization: Basic c3VwZXJ1c2VyOnN1cGVydXNlcg==

HTTP/1.x 200 OK

Last-Modified: Sun, 21 Nov 2004 17:42:58 GMT

Content-Encoding: gzip

Content-Type: text/html;charset=ISO-8859-1

Content-Length: 968

Date: Sun, 21 Nov 2004 18:03:57 GMT

Server: Apache-Coyote/1.1

----------------------------------------------------------

http://localhost:8112/caratteri.html

GET /caratteri.html HTTP/1.1

Host: localhost:8112

User-Agent: Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041001 Firefox/0.10.1

Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,/;q=0.5

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 300

Connection: keep-alive

Referer: http://localhost:8112/home.html

Cookie: JSESSIONID=4EE6BECCCA3977F287D994ACDC3C6317

Authorization: Basic c3VwZXJ1c2VyOnN1cGVydXNlcg==

HTTP/1.x 200 OK

Last-Modified: Sun, 21 Nov 2004 18:03:12 GMT

Content-Encoding: gzip

Content-Type: text/html;charset=ISO-8859-1

Content-Length: 741

Date: Sun, 21 Nov 2004 18:03:58 GMT

Server: Apache-Coyote/1.1



 Comments   
Comment by Boris Kraft [ 23/Nov/04 ]

we need a favicon

Comment by Boris Kraft [ 15/Jun/05 ]

we now deliver with favicon, but te above issue might still be true in some cases. A quick check revelaed that the favicon is displayed on firefox, but not on Safari

Comment by Philipp Bracher [ 12/May/06 ]

reopen if still a problem

Generated at Mon Feb 12 03:15:05 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.