Edgewall Software
Modify

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#11833 closed enhancement (fixed)

Remove duplicate `link rel="icon"`

Reported by: anonymous Owned by: Jun Omae
Priority: normal Milestone: 1.1.5
Component: web frontend Version: 1.1dev
Severity: minor Keywords:
Cc: Branch:
Release Notes:

Removed favicon link supporting IE8 and earlier.

API Changes:
Internal Changes:

Description

Currently there are duplicated

<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
<link rel="icon" href="/favicon.ico" type="image/x-icon" />

Using shortcut icon only is enough if you want to keep IE compatibility. Also, since favicon.ico is in the root, it will work in all browsers regardless.

Attachments (0)

Change History (11)

comment:1 by Jun Omae, 9 years ago

Removing <link rel="shortcut icon" /> seems to be right if supported version of IE is 9.0+. See http://en.wikipedia.org/wiki/Favicon#How_to_use.

comment:2 by Christian Boos, 9 years ago

Milestone: next-dev-1.1.x
Severity: normalminor
Version: 1.1dev

Assuming IE 9+ on trunk seems reasonable.

comment:3 by Peter Suter, 9 years ago

Is there a list of target browsers supported by Trac versions somewhere? I assume we should document this similar to supported versions of dependencies.

comment:4 by Ryan J Ollos, 9 years ago

jQuery has a list of supported browsers, which is just one factor to consider when developing a list of supported browsers for Trac. The list of actively supported browsers in jQuery 2.x looks like a reasonable target for browser support in Trac 1.2.

comment:5 by Ryan J Ollos, 9 years ago

Lately I've been thinking it would be useful to have a table showing the supported dependencies (and browsers) for all versions of Trac that are currently maintained.

comment:6 by Ryan J Ollos, 9 years ago

Milestone: next-dev-1.1.x1.1.5

Should we apply the change in milestone:1.1.5? … or even milestone:1.1.4?

comment:7 by Jun Omae, 9 years ago

Should we apply the change in milestone:1.1.5? … or even milestone:1.1.4?

1.1.5 is okay to me.

If it is fixed in 1.0-stable, it would be good with the following:

  • trac/web/chrome.py

    diff --git a/trac/web/chrome.py b/trac/web/chrome.py
    index f3b7e1b..28aa71f 100644
    a b class Chrome(Component):  
    758758        if chrome['icon']:
    759759            src = chrome['icon']['src']
    760760            mimetype = chrome['icon']['mimetype']
    761             add_link(req, 'icon', src, mimetype=mimetype)
    762             add_link(req, 'shortcut icon', src, mimetype=mimetype)
     761            if mimetype == 'image/x-icon':
     762                add_link(req, 'shortcut icon', src)
     763            else:
     764                add_link(req, 'icon', src, mimetype=mimetype)
    763765
    764766        # Logo image
    765767        chrome['logo'] = self.get_logo_data(req.href, req.abs_href)

comment:8 by Ryan J Ollos, 9 years ago

Owner: set to Ryan J Ollos
Status: newassigned

comment:9 by Ryan J Ollos, 9 years ago

Release Notes: modified (diff)
Resolution: fixed
Status: assignedclosed

Fixed in [13936].

comment:10 by Ryan J Ollos, 9 years ago

Owner: changed from Ryan J Ollos to Jun Omae

comment:11 by Jun Omae, 9 years ago

I get the following error on my auto-build environments.

======================================================================
ERROR: test_icon_links (trac.web.tests.chrome.ChromeTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/run/shm/52c4f3cabccc54744a7c40d5b2d1e1ed620eb786/py26-sqlite/trac/web/tests/chrome.py", line 258, in test_icon_links
    links['shortcut icon'][0]['href'])
KeyError: 'shortcut icon'

Fixed in [13938]. Please run make unit-test at least before commits.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jun Omae.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jun Omae to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.