Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apple-touch-icon #130

Closed
wvengen opened this issue Jun 17, 2013 · 3 comments
Closed

apple-touch-icon #130

wvengen opened this issue Jun 17, 2013 · 3 comments

Comments

@wvengen
Copy link
Member

wvengen commented Jun 17, 2013

With people using iPads, iPhones and similar products from other brands, I get a lot of messages like this in my log/production.log:

ActionController::RoutingError (No route matches [GET] "/images/apple-touch-icon.png"):

I think it would be nice to have a default touch icon, as well as get rid of the useless error messages. http://mathiasbynens.be/notes/touch-icons

@sjmulder
Copy link
Contributor

There are a couple of touch-icon links in layouts/_header.html.haml currently, but the files aren’t there yet.

If you remove the href attributes or set it to bogus values, Safari will fall back to requesting the default URLs if it can’t find the ones specified in the header. For example, this page:

<!DOCTYPE html>

Yields these requests:

"GET / HTTP/1.1" 200 -
"GET /bar HTTP/1.1" 404 -
"GET /foo HTTP/1.1" 404 -
"GET /apple-touch-icon-120x120-precomposed.png HTTP/1.1" 404 -
"GET /apple-touch-icon-120x120.png HTTP/1.1" 404 -
"GET /apple-touch-icon-precomposed.png HTTP/1.1" 404 -
"GET /apple-touch-icon.png HTTP/1.1" 404 -

Note that the touch icons are only requested after clicking the Add Bookmark button.

I think it’s best to remove the touch-icon link elements for now to prevent the 4 extraneous requests, and maybe add proper icons later.

@carchrae
Copy link
Contributor

i'm still getting bogus (404) errors emailed to me. i don't like this because it hides real errors - (it takes some scanning to realise this is an error caused by a lack of apple-touch-icon)

https://stackoverflow.com/questions/12480497/why-am-i-getting-error-for-apple-touch-icon-precomposed-png

An ActionView::MissingTemplate occurred in home#index:

  Missing template home/index, application/index with {:locale=>[:en], :formats=>[:png], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :haml]}. Searched in:
  * "/home/foodsoft/foodsoft/app/views"
  * "/home/foodsoft/foodsoft/plugins/documents/app/views"
  * "/home/foodsoft/foodsoft/plugins/messages/app/views"
  * "/home/foodsoft/foodsoft/plugins/wiki/app/views"
  * "/home/foodsoft/.rvm/gems/ruby-2.6.6/gems/twitter-bootstrap-rails-2.2.8/app/views"
  * "/home/foodsoft/.rvm/gems/ruby-2.6.6/gems/doorkeeper-5.0.3/app/views"
  * "/home/foodsoft/.rvm/gems/ruby-2.6.6/gems/kaminari-core-1.2.0/app/views"

  app/controllers/application_controller.rb:93:in `set_currency'


-------------------------------
Request:
-------------------------------

  * URL        : http://127.0.0.1:3001/apple-touch-icon.png
  * HTTP Method: GET
  * IP address : 127.0.0.1
  * Parameters : {"controller"=>"home", "action"=>"index", "foodcoop"=>"apple-touch-icon", "format"=>"png"}
  * Timestamp  : 2021-09-15 17:28:57 UTC
  * Server : *********
    * Rails root : /home/foodsoft/foodsoft
  * Process: 7586

@carchrae
Copy link
Contributor

submitted a PR - i haven't tested if this resolves it (i don't have an ios device), but i think it should.

and yes, perhaps a committee should be formed to choose the image, but i went rouge! :D

image

wvengen pushed a commit that referenced this issue Jan 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants