Re: [請益] 如何對Content-Disposition標頭加下載標題?
※ 引述《red0whale (red whale)》之銘言:
: 假設我有一個PDF檔叫test.pdf,該檔存在http://www.example.com/download/裡面
: 今天如果有人點進了這個PHP頁面裡頭,就會自動下載這個PDF檔案
: 我的這個頁面被Google的「爬蟲」找到了,並被放在他們的搜尋引擎資料庫裡
: 但是問題在:他們顯示出來的結果標題居然顯示「Untitled」,而且沒有說明內容
: 明明我原先的PDF檔(test.pdf)有標題啊,
: 為什麼他們搜尋出來的結果卻是沒有標題和說明內容呢?
: 請各位幫我解惑一下…
: 謝謝
今天很忙,直接貼我用了什麼關鍵字跟找到的結果
因為看不到你實際的檔案,所以也不知道你是不是踩到這問題
「google search result pdf title」
https://www.google.com.tw/search?q=google+search+result+pdf+title
第一筆
https://webmasters.googleblog.com/2011/09/pdfs-in-google-search-results.html
Q: How can I influence the title shown in search results for my PDF document?
A: We use two main elements to determine the title shown: the title metadata
within the file, and the anchor text of links pointing to the PDF file.
To give our algorithms a strong signal about the proper title to use,
we recommend updating both.
關鍵句:
title metadata within the file
anchor text of links pointing to the PDF
PDF 檔案有個標題設定(所以不是你第一行打很大的字他就知道那是標題)
連過去的連結文字
「pdf title metadata」
https://www.google.com.tw/search?q=pdf+title+metadata
第一筆
https://helpx.adobe.com/acrobat/using/pdf-properties-metadata.html
Choose File > Properties.
Click a tab in the Document Properties dialog box.
--
莉娜用魔法爆破進入屋內。
劫犯從另一個房間裡出現,大叫道︰「妳是誰!」
莉娜︰「我是個可疑的女人!」
劫犯無言以對。
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 60.248.122.206
※ 文章網址: https://www.ptt.cc/bbs/PHP/M.1463984064.A.6AF.html
→
05/24 02:25, , 1F
05/24 02:25, 1F
→
05/24 02:25, , 2F
05/24 02:25, 2F
→
05/24 04:50, , 3F
05/24 04:50, 3F
→
05/24 04:51, , 4F
05/24 04:51, 4F
→
05/24 04:52, , 5F
05/24 04:52, 5F
→
05/24 04:53, , 6F
05/24 04:53, 6F
→
05/24 16:34, , 7F
05/24 16:34, 7F
昨天眼花沒看到實際檔案....
從 Meta 看起來是有設定 Title,但是 PDF 裡面真的是有圖無字
看來真的是 Google 找不到他喜歡的文字所以把標題遮掉了.......
這樣的話,在圖片後面蓋一段字可能能夠讓Google願意改標題,可能...
※ 編輯: GALINE (60.248.122.206), 05/24/2016 22:11:42
→
05/25 00:15, , 8F
05/25 00:15, 8F
→
05/25 00:15, , 9F
05/25 00:15, 9F
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 2 篇):
PHP 近期熱門文章
PTT數位生活區 即時熱門文章