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.
【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 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!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment