Inline linking facts for kids
Inline linking, also known as hotlinking, is when a website shows content, like an image, that is actually stored on a different website. Imagine you're looking at a picture on one website, but that picture isn't actually saved on that website's server. Instead, your computer is getting the picture directly from another website where it's originally stored.
This is different from simply linking to a website, which just takes you to a new page. With hotlinking, the content appears right on the page you are viewing, even though it comes from somewhere else.
Contents
How Hotlinking Works
When you visit a website, your web browser first downloads the main text and code of the page. This code, called HTML, often tells your browser to get other things like images, videos, or special styles.
Sometimes, the HTML code for an image will point to a different website where that image is stored. For example, an image tag might look like this: ``. When your browser sees this, it goes to `example.com` to get the picture and then displays it on the page you are looking at.
This means the image is never actually copied to the first website's server. Your browser just fetches it directly from its original home.
Why Websites Use Hotlinking
Hotlinking can be used for several reasons, both helpful and sometimes tricky:
- Sharing Content Without Copying: Some websites use hotlinking to show images or other files from another site without making their own copy. This can sometimes help avoid problems with copyright because they aren't actually copying the file.
- Organizing Websites: Big websites might store all their images on a separate server. This helps them manage the huge amount of data and traffic better. For example, a news site might have its articles on one server and all its photos on another.
- Showing Ads: Many online ads are hotlinked. An advertising company hosts the ad image, and websites display it using a hotlink. This allows the ad company to track how many times the ad is seen.
- Counting Visitors: Some simple tools that count how many people visit a page (called "hit counters") work by hotlinking a tiny image from a special server. Every time the image is loaded, the counter goes up.
Problems with Hotlinking
While hotlinking can be useful, it can also cause problems:
- Bandwidth Theft: When a website hotlinks an image from another site, it uses the original site's bandwidth. Bandwidth is like the amount of data a website can send. If too many people view a hotlinked image, it can cost the original site money or slow down their own website. This is often called "leeching" or "piggy-backing."
- Loss of Context: An image hotlinked from another site might be shown without its original explanation or surrounding text. This can change the meaning of the image or make it confusing.
- Security Risks: Sometimes, hotlinked content can be used in harmful ways. For example, a bad actor might hotlink an image from a trusted site onto a fake website to make the fake site look more real and trick people.
- Tracking Users: Hotlinked images can sometimes be used to track what pages you visit online. This happens because when your browser requests the image, it often sends information about the page you are currently on to the server hosting the image.
Stopping Hotlinking
Website owners who don't want their content hotlinked can try to prevent it.
- Server-Side Prevention: Most websites can be set up to detect if an image request is coming from another website. If it is, the server can refuse to send the image or send a different image instead, like a message saying "Hotlinking Not Allowed." This often involves special rules on the server that check where the request came from.
- Browser Tools: Some tools you can add to your web browser can help block hotlinked content, especially if it's used for tracking or ads.
Hotlinking and Copyright
In many countries, including the United States, courts have looked at whether hotlinking breaks copyright laws. The main idea is that when you hotlink an image, you are not actually making a copy of that image on your own server. Instead, you are just telling a user's web browser where to find the image on its original server.
Because the hotlinking website doesn't store a copy of the image, some courts have said that it doesn't directly break copyright laws that protect against making unauthorized copies. However, this is a complex area, and it doesn't mean hotlinking is always okay. It can still cause problems for the original website owner, especially with bandwidth costs or if they don't want their content used in certain ways.
See also
- Deep linking