Home > Common Problem > What is the difference between dynamic URL and static URL

What is the difference between dynamic URL and static URL

清浅
Release: 2019-04-23 12:03:11
Original
8367 people have browsed it

The differences between dynamic URLs and static URLs are: the page address of dynamic URLs is long and inconvenient to remember and copy. The pages of static URLs are fixed, while dynamic URLs return different pages according to different user requests

URLs are divided into two types: static and dynamic. A static URL represents a page containing HTML code. A dynamic URL is the result of a search within a website driven by a database running on a script. Next, we will This article introduces the differences between the two in detail, I hope it will be helpful to you.

What is the difference between dynamic URL and static URL

【Recommended course: PHP Tutorial

What are static and dynamic web pages

Static web pages

Static web pages refer to pages that contain HTML code, which completely defines the page structure and content. Static pages are stored on the server and when a user makes a request by entering their URL, the server loads the exact same page with the exact same pre-built content. Users can interact with the page by clicking on available links, but a static page will never return unformatted information.

Dynamic web pages:

A dynamic web page is a page that contains "server-side" code that when a user makes a request, the server generates a unique page each time it is loaded content. Typically dynamic pages use server-side code to access database information. In this case, the content of the website is stored in a database, and the displayed page content is generated based on the information stored in the database: the user requests data (contained in the database), and in response, the server assembles the data on the fly And generate page content based on the request

What is the difference between dynamic URL and static URL

What are static and dynamic URLs

Usually, you can do this by looking at the file extension in the URL To determine whether the page is static or dynamic.

Static URL

A static URL is the page address of a static web page, a page that has the same hard-coded content every time it is loaded. Static URLs never change and typically end with the extension "htm" or ".html".

Example: http://www.php.cn/course.html

Dynamic URL

Dynamic URL is The page address of a dynamic web page, a web page generated by a website driven by a search database. Have ".php", ".asp" or ".jsp" file extensions, which contain variable strings (for example: ?&=)

Example: http://www.example.com/forums/ thread.php? threadid = 12345&sort =Date

? The following URLs are called query parameters, which represent database row identifiers and are used to retrieve specified data from the database table. Every time the URL parameters change, the generated page will be different. Dynamic URLs can contain multiple url parameters and multiple "?" characters.

The difference between static URL and dynamic URL

(1) Static URL will not change, but the parameters of dynamic URL will change

(2) The page content of a static URL is fixed, while a dynamic URL does not have a specific file, but returns the requested page from the database according to the user's request

(3) Compared with the static URL, the dynamic URL The address is too long, difficult to remember and complicated to type manually

(4) Dynamic URLs are more difficult to understand, and generally have a lower click-through rate than static URLs.

Summary: The above is the entire content of this article, I hope it will be helpful to everyone.

The above is the detailed content of What is the difference between dynamic URL and static URL. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template