What does the pound sign #, question mark, and connector & respectively do in the URL link?

Source: Internet
Author: User

In a URL can contain a lot of content, not only contains 26 English letters, 10 Roman numerals, Chinese characters, you can also have the pound "#", Question mark "?" Three of the most common symbols, such as connectors &, what are the functions of these symbols in the Web?

#, the pound: represents a page in a location, known as the anchor point, often used in a page between different locations of the jump, simply said in a page, the URL is not changed, by adding "#buy" character at the end of the URL can jump to the current page has been defined in the anchor point (id= "buy" The same # changes will also increase the browser's history, that is, we can go back to the previous position through the "Back" button, and familiar with the web development of friends may also be used in some AJAX operations, in order to achieve different access status and change the page access content, You can also achieve the effect of a non-flush loading.

For example: https://zhan.leiue.com/fanly-mip.html#buy (visit the link to jump directly to the location where the Fanly MIP theme page is purchased)

?, question mark: Often used in dynamic Web sites, to implement different parameter values and generate different pages or return different results, such as WordPress dynamic link is/?p=id, where p represents the post article, ID represents the article ID, so that the article ID to access different articles. Of course, we also often use the question mark + any parameter to achieve the page refresh, so that the latest page or cache refresh.

For example: https://i.leiue.com/avatar/?size=100 (Visit the link to get the Tears Snow User Center Default user picture, and its size is the image pixels, so it will be a 100px avatar display)

&, connector: Since it is called a link symbol, that is the function of the connection, it can also be said that the different parameters of the spacer, generally with the question mark, a dynamic URL link to start with a question mark the first parameter, with the & connector to concatenate multiple parameters and values.

For example: https://i.leiue.com/avatar/?size=100&time=20171120 (or the head of the tear snow Personal Center for example, because the avatar is a cache function, if the user modified the Avatar, Access to the original address may be the picture is not modified, then we are guaranteed to get 100px size of the avatar and to refresh the cache can use the connector & add an arbitrary parameter, so as to get the latest avatar)

Simple summary: Would like to share a "URL link in the pound #, question mark?, connector & what does SEO have to do with" such a topic, but found that tears before the blog seems to have no specific introduction of these three in the URL of the common symbol of the role, so in order to let everyone know it and know its why, Mel had to separate to write these two articles!

Unless noted, otherwise are Tears Snow Blog original articles, reproduced please link to the form of the address of this article

This article link: https://zhangzifan.com/t/6928.html

What does the pound sign #, question mark, and connector & respectively do in the URL link?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.