Ruby on Rails: Where to put the .png iphone boomark icon?
I'm trying to add an icon to my rails applications so that the icon shows up on an iphone's homescreen if a user decides to bookmark it. I have tried a couple of things and its just not working. Where exactly do I have to place the .png file? Do I have to provide multiple sizes in order to support the iphone 4 and the ipad开发者_运维问答? To I have to restart the server once I have copied the image over? Do I have to at extra lines of code to one of my views?
Any help is greatly appreciated!
Just in case someone comes along like I did.. this is how you do it on in rails, .erb:
<%= favicon_link_tag 'mb-icon.png', :rel => 'apple-touch-icon', :type => 'image/png' %>
This is the reference I found.
http://api.rubyonrails.org/classes/ActionView/Helpers/AssetTagHelper.html
In your HTML head place:
<link href="http://DOMAIN.COM/iphone-home-icon.png" rel="apple-touch-icon"/>
精彩评论