Skip to content

Default favicon.ico handler #1445

@marschall

Description

@marschall

I wanted to ask what peoples option is on adding a default favicon.ico handler, probably in Seaside-Tools-Web.

The reason for this is that

  • Browsers per default always request at favicon.ico resulting in a 404 which shows up when using browser developer tools.
  • When using other web application frameworks on port 8080 cached versions of these, eg. the Tomcat logo may be displayed.

The implementation would be relatively simple

WARequestHandler << #WAFaviconHandler

handleFiltered: aRequestContext 
	aRequestContext response
		contentType: (WAMimeType main: 'image' sub: 'x-icon');
		binary;
		nextPutAll: WAToolFiles basicNew faviconIco

class >> initialize
	WADispatcher default register: self new at: 'favicon.ico'

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions