跳至內容

直接連結

本頁使用了標題或全文手工轉換
維基百科,自由的百科全書

直接鏈接(英語:Inline linking),也稱熱鏈接(hotlinking)、leeching、piggy-backing、直接鏈接(direct linking)、異站圖像抓取(offsite image grabs)等,它是指在一個網站網頁上,未經允許地使用使用鏈接對象直接調用另一個網站上的資源(通常是圖像)。在如今的互聯網上,未經授權的直接鏈接常被簡稱為盜鏈

直接鏈接與HTTP

在萬維網幕後的超文本傳輸協議(HTTP)技術中,並未對鏈路類型做任何區分,所有鏈接的功能均為平等,資源可以位於任何服務器的任何位置。

當訪問一個網站時,瀏覽器首先下載HTML格式的文檔內容。下載的HTML文檔可能調用其他HTML文件、圖像、腳本及樣式表等文件。這些文件可以包含<img>標籤以在頁面上顯示所提供URL位置的圖像。其中的HTML代碼可能不指定服務器,從而使網頁瀏覽器使用與父代碼(<img src="picture.jpg" />)相同的服務器。但它也可以指定在某個服務器上託管的圖像的絕對URL,例如(<img src="http://www.example.com/picture.jpg" />

在瀏覽器下載到包含圖像的HTML圖像後,瀏覽器將聯繫遠程服務器以請求圖像內容。

內容鏈接的常見用法

在一個網站中可以顯示另一個網站的內容是萬維網超文本媒體原始設計中的一部分。常見的用法包括:

  • 未經許可製作作品的副本侵犯版權,而在一份HTML文檔中給出到原始圖像或文件位置的文本鏈接則不會侵權。[1]
  • 網站架構師可能有意將一個網站的圖像隔離或獨立放置在另一個域名或服務器(可能為單台服務器、服務器集群或雲服務)上,從而在不同託管服務器上採用不同的帶寬、安全等策略。舉例來說,熱門網站Slashdot將前端頁面存放在slashdot.org,各個內容存儲在如games.slashdot.orgit.slashdot.org等,而圖像則存儲在images.slashdot.org
  • 一個網站上的文章可以選擇通過內容鏈接的方式引用另一個網站上的版權圖像或內容,從而避免複製原始文件可能引起的權利與所有權問題。但是,由於信息源需要提供帶寬,這種做法通常不被鼓勵並容易視作對資源的濫用和對權利的侵犯,因為訪問者沒有在信息源提供者預期的行為中看到信息源整個頁面的原貌。
  • 許多網頁包含橫幅式廣告。橫幅廣告是由廣告客戶或廣告中間人公司來託管。<img>標籤的目標可能是一個服務器上的CGI腳本,廣告服務器因而可通過其產生的唯一標識符等信息提供針對性廣告。CGI腳本會收集信息、判斷條件,並決定提供哪份圖像。
  • 部分網站從另一個更快的服務器(例如CDN服務器)提供圖像,以改善客戶的訪問體驗。
  • 點擊計數器英語Hit counterWeb計數器英語Web counter會顯示當前網站或頁面已被加載的次數。網站可自行實現計數器功能,有一些第三方公司為網站提供免費或收費的專業計數器及訪客統計服務。

直接鏈接的爭議用法

當網站違背用戶期望時,網站之間模糊的邊際會導致其他問題。有些時候,直接鏈接也可用於惡意目的。

  • 從其他位置檢索到的內容可能不適合當前定義的展示位置。
  • Inline linking to an image stored on another site increases the bandwidth use of that site even though the site is not being viewed as intended. The complaint may be the loss of ad revenue or changing the perceived meaning through an unapproved context.
  • 跨網站指令碼釣魚式攻擊攻擊, may include inline links to a legitimate site to gain the confidence of a victim.
  • 按內容付費的服務可能採用複雜的腳本和內容鏈接技術來限制對其內容的訪問。
  • 內鏈對象可能在客戶端上執行路過式下載, exploiting faults in the code that interprets the objects. When an object is stored on an external server, the referring site has no control over if and when an originally beneficial object's content is replaced by malicious content.
  • The requests for inline objects usually contain the HTTP參照位址信息。This leaks information about the browsed pages to the servers hosting the objects (see web visitor tracking).

行為阻止

客戶端側

大多數網頁瀏覽器都將直接根據網頁指示來獲取圖像。[2] 嵌入式圖像可能以此作為一個網絡信標來跟蹤用戶或將信息傳遞給第三方。有許多廣告過濾工具可不同程度地限制此類行為。

服務器側

部分服務器採用HTTP參照位址等技術檢測直接鏈接,並可根據相同格式返回錯誤、告知、引導或譴責信息,代替原始的目標圖像。大多數服務器都可配置為避免為第三方直接鏈接提供託管的媒體內容。[3][4]

URL重寫(例如Apache HTTP Server的mod_rewrite)經常被用於拒絕或重定向直接鏈接的圖像或媒體內容到其他資源。大多數媒體資源都可通過此種方式重定向,包括視頻文件、音頻文件、動畫資源(例如Flash)等。

Other solutions usually combine URL重寫 with some custom complex server side scripting to allow hotlinking for a short time, or in more complex setups to allow the hotlinking but return an alternative image with reduced quality and size and thus reduce the bandwidth load when requested from a remote server. All hotlink prevention measures risk deteriorating the user experience on third party website.[5]

直接鏈接引起的版權法律問題

The most significant legal fact about inline linking, relative to copyright law considerations, is that the inline linker does not place a copy of the image file on its own Internet server. Rather, the inline linker places a pointer on its Internet server that points to the server on which the proprietor of the image has placed the image file. This pointer causes a user's browser to jump to the proprietor's server and fetch the image file to the user's computer. US courts have considered this a decisive fact in copyright analysis. Thus, in 完美十訴亞馬遜案,[6] the 美國聯邦第九巡迴上訴法院 explained why inline linking did not violate US copyright law:

Google does not...display a copy of full-size infringing photographic images for purposes of the Copyright Act when Google frames in-line linked images that appear on a user’s computer screen. Because Google’s computers do not store the photographic images, Google does not have a copy of the images for purposes of the Copyright Act. In other words, Google does not have any 「material objects...in which a work is fixed...and from which the work can be perceived, reproduced, or otherwise communicated」 and thus cannot communicate a copy. Instead of communicating a copy of the image, Google provides HTML instructions that direct a user’s browser to a website publisher’s computer that stores the full-size photographic image. Providing these HTML instructions is not equivalent to showing a copy. First, the HTML instructions are lines of text, not a photographic image. Second, HTML instructions do not themselves cause infringing images to appear on the user’s computer screen. The HTML merely gives the address of the image to the user’s browser. The browser then interacts with the computer that stores the infringing image. It is this interaction that causes an infringing image to appear on the user’s computer screen. Google may facilitate the user’s access to infringing images. However, such assistance raised only contributory liability issues and does not constitute direct infringement of the copyright owner’s display rights. ...While in-line linking and framing may cause some computer users to believe they are viewing a single Google webpage, the Copyright Act...does not protect a copyright holder against [such] acts....

參見

參考資料

  1. ^ Mike Masnick. Is Inline Linking To An Image Copyright Infringement?. Techdirt. [2014-02-15]. (原始內容存檔於2018-06-23). 
  2. ^ Thomas C Greene. Vista Security Oversold. theregister.co.uk. 2007-02-20 [2007-11-16]. (原始內容存檔於2018-11-12). 
  3. ^ Ross Shannon. Bandwidth Theft. yourhtmlsource.com. 2007-02-26 [2007-11-16]. (原始內容存檔於2021-04-26). Some webmasters will try to directly link to your images from their pages. Luckily, a simple configuration change provides the necessary fix. 
  4. ^ Thomas Scott. Smarter Image Hotlinking Prevention. alistapart.com. 2004-07-13 [2007-11-16]. (原始內容存檔於2013-01-14). 
  5. ^ Aleksandersen, Daniel. Image quality degradation as a hotlink prevention measure and deterrent. [1 September 2016]. (原始內容存檔於2016-12-20). 
  6. ^ 487 F.3d 701 (9th Cir. 2007).