【发布时间】:2011-03-14 02:36:25
【问题描述】:
我想知道是否可以为使用 adobe reader 插件在 firefox 中打开的 pdf 文件更改 favicon?当我检查源代码时,它使用的是embed。有关如何更改此设置的任何信息?
【问题讨论】:
我想知道是否可以为使用 adobe reader 插件在 firefox 中打开的 pdf 文件更改 favicon?当我检查源代码时,它使用的是embed。有关如何更改此设置的任何信息?
【问题讨论】:
如果它使用embed,那么你只需要在HTML头部指定<link rel="shortcut icon" href"somepath/somefavicon.ico">。
编辑:浏览器对此的支持是粗略的。在这种情况下,最新版本的 Firefox、Opera 和 Safari 将成功显示网站图标,但 Chrome 和 IE8 不会。
【讨论】:
您还可以更改 apache 设置以根据您的设置定义网站图标
这是来自 MAMP 附带的我的 httpd.conf
#
# AddIcon* directives tell the server which icon to show for different
# files or filename extensions. These are only displayed for
# FancyIndexed directories.
#
AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*
AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core
AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^
【讨论】:
如果您将 favicon.ico 放到您网站的根目录,那么您在该网站上打开的 pdf-s 文件实际上会包含该网站图标。您可以使用在线图标生成器从 png-s 生成透明的 ico-s。
示例: 您的网站图标可在以下位置访问: www.yourdomain.com/favicon.ico 然后您的 pdf 将在 Acrobat 插件选项卡中显示此图标: www.yourdomain.com/something/something.pdf
【讨论】: