当前位置:网站首页>What are absolute and relative paths, and what are their advantages and disadvantages?
What are absolute and relative paths, and what are their advantages and disadvantages?
2022-06-11 00:22:00 【Hua Weiyun】
Absolute path refers to the complete URL containing the domain name . A relative path is a path that does not contain a domain name 、 The relative URL of the linked page relative to the current page .

Such as A、B Two pages URL:
http:// website /pageA.html
http:// website /pageB.html
page A Link to page B When using this code :
<a href="../pageB.html">
This is the relative path .
If you use the complete URL:
<a href="http:// website /pageB.html">
This is the absolute path .
One 、 Absolute path
advantage :
1、 Encounter lazy plagiarism 、 Collector , You can also increase the chain and weight of the website , Now collectors can edit the collected content , Forget this one .
2、RSS When the output , The content will be Feed Aggregate web crawler display , Links to the original site may be retained , However, this function is not applicable now .
3、 Help to prevent and solve the problem of website standardization .
shortcoming :
1、 Unless the link is dynamically inserted , Otherwise, it is not easy to test on the test server .
2、 Unless the link is dynamically inserted , Otherwise, it will be more difficult to move the page .
Two 、 Relative paths
advantage :
1、 Mobile content is easier , No need to update links on other pages .
2、 It's easier to test on the test server .
3、 Save code .
shortcoming :
1、 Page movement position , The links inside may need to be changed .
2、 Being copied and collected is not good for the website .
3、 Search engine analysis URL There may be errors in the process , The link on the page cannot be read correctly URL.
Whether it's an absolute path or a relative path , Website URL External display is absolute , The relative path is only for the station , And it is not easy to be recognized by search engines .
up to now , Some advantages of absolute path and relative path no longer exist .
Today's development of the Internet , The focus on the website has shifted , At the same time, the search engine is right SEO The algorithm has been gradually improved .
Users' expectations for audio media and video are redundant with text content , image RSS、Feed And share such features , Many websites have been abandoned .
author : Good advice
source :https://www.badpon.com/2603.html
边栏推荐
- 对接请求方式
- Excel单元格
- Is the financial management of qiniu school reliable and safe
- In the month of safety production, Huangpu launched a publicity campaign for gas safety in shops
- Bluetooth development (7) -- L2CAP layer connection process
- 富文本活动测试1
- Go language channel understanding and use
- [database] MySQL index interview questions
- [JVM] thread
- [pyGame] can the little dinosaur on chrome be played with code? It looks like fun~
猜你喜欢

Opencv实战之图像的基本操作:这效果出来惊艳了众人(附代码解析)

452. detonate the balloon with the minimum number of arrows

yum源更新

Things about Bluetooth development (1) -- starting with packet capturing data
![[fireworks in the sky] it's beautiful to light up the night sky with gorgeous fireworks. A programmer brought a fireworks show to pay New Year's greetings to everyone~](/img/3b/2fcd5ff2ea08c4c63428899babd522.png)
[fireworks in the sky] it's beautiful to light up the night sky with gorgeous fireworks. A programmer brought a fireworks show to pay New Year's greetings to everyone~

【AcWing】4. Multiple knapsack problem I
![[pyGame games] tank battle, how many childhood games do you remember?](/img/30/951fdbb944e026701af08c0c068cd8.png)
[pyGame games] tank battle, how many childhood games do you remember?

字符串时间排序,对时间格式字符串进行排序
![[JVM] memory model](/img/01/4a9ab79e340f19c5f6cf682577bf2a.jpg)
[JVM] memory model

第一章 总论-会计基础
随机推荐
Njupt South Post collection_ Experiment 2
Mysql database table backup
【Pygame小游戏】剧情流推荐:什么样的游戏才能获得大家的喜欢呢?(魔鬼恋人、霸总娇妻版)
Yii2 ActiveRecord 使用表关联出现的 id 自动去重问题
Leetcode-713 subarray with product less than k
Njuptn Nanyou Discrete Mathematics_ Experiment 4
SQL查询,子查询作为结果字段
MD5Util
[turtle confessions collection] "the moon at the bottom of the sea is the moon in the sky, and the person in front of us is the sweetheart." Be happy for the rest of your life, and be safe for ever ~
[pyGame] this classic bomber super game is online. Do you love it? (source code attached)
[pyGame games] here it is. This Gobang game is super A. share it with your friends~
canvas绘画折线段
【JVM】类加载机制
【Go语言学习】——并发编程
USB IP core FPGA debugging (I)
LeetCode 1673. Find the most competitive subsequence**
安全培训管理办法
Wireshake introduction learning notes
Multipass中文文档-教程
MP框架基本操作(自用)