网站何时被视为“静态”? 或“动态”
我创建了一个站点,它解析 XML 文件并将其内容显示在适当的页面上。 我的网站是动态网页还是静态网页?
动态网页和静态网页有何不同?
我觉得它是动态的,因为我从xml文件中解析内容; 最初我的主页上没有任何内容..
您对此有何看法,请解释一下..
I have created a site, which parses XML files and display its content on the appropriate page. Is my site a dynamic web page or static web page?
How do dynamic and static web pages differ?
I feel it's dynamic, because I parse the content from xml files; initially i don't have any content in my main page..
What do you think about this, please explain it..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
我会将您的页面描述为动态的。 “静态”通常意味着位于 Web 服务器上的文件按原样交付给用户; 由于您是从数据文件组装页面,因此即使您没有构建任何动态变化的数据,我也会将它们称为动态页面。
但我不认为这是一个硬性且快速的定义。 如果有人认为该页面是静态的,因为它是由静态页面组装而成的,那么这是另一种看待它的方式。
I would describe your pages as dynamic. "Static" usually means that the file sitting on the web server is delivered as-is to the user; since you're assembling the pages from data files, I'd call them dynamic even if you're not building in any dynamically-changing data.
I don't think this is a hard and fast definition though. If someone feels the page is static because it's assembled from static pages, that's another way to look at it.
这实际上是一个有趣的问题..
我会说这是一个动态网站,因为内容是以编程方式生成的.. 但如果 XML 文件不改变,它的“静态”程度并不比通过 Apache 提供的直接 HTML 文件低。
假设您有一个包含常规 HTML 文件的网站 - 它将被视为静态网页; 但是如果您获取这些 HTML 文件,将它们存储在数据库中,并有一个允许
/view.php?page=index
的简单页面 - 这是否会使其成为动态站点?我想说不,它只是一个通过数据库或 XML 文件(而不是文件系统)提供服务的静态站点。
基本上:如果内容发生变化而无需手动编辑这些 XML 文件,我会说它是一个动态站点。 如果它确实发生了变化,那么我会说它是一个静态站点。
This is actually an interesting question..
I would have said it's a dynamic website, as the content is generated programmatically.. but if the XML files do not change, it's no less "static" than straight HTML files served though Apache.
Say you have a site that is regular HTML files - it would be considered a static web-page; but if you take those HTML files, store them in a database, and have a simple page that allows
/view.php?page=index
- does that make it a dynamic site?I would say no, it's just a static site served through a database, or XML files (instead of a file-system).
Basically: if the content changes without you manually editing those XML files, I would say it's a dynamic site. If it does change, then I would say it's a static site.
静态网页是交付的纯 HTML 内容。 如果您在服务器端处理任何类型的 XML 文件并相应地生成内容,那么这就是动态页面。 静态页面在实际编辑页面时更改内容 修改的。
如果您搜索过,Google 上的第一个结果就解释了这一点。 http://websiteowner.info/articles/pages/pagetypes.asp
另外,说明认为静态网站不定期更新的说法是不正确的。 甚至在我们开始用 Perl 和 HTML 编写东西之前,Web 和 HTML 就已经存在了。 PHP。 有些网站流量很大并且需要手动修改。
Static web pages would be plain HTML content that are delivered. If you are processing any type of XML files at the server side and generating content accordingly, this is a dynamic page. Static pages change content when the page is actually edited & modified.
First result on Google if you had searched for it explains it. http://websiteowner.info/articles/pages/pagetypes.asp
Also, stating that static websites are not updated regularly is not correct. The web and HTML was around even before we started writing stuff in Perl & PHP. There are/were sites that had heavy traffic and were being modified manually.
区分静态和动态的简单方法:
静态:直接的 HTML 文件
动态:HTML 通过服务器端代码和数据存储(XML、数据库等)生成。
a simple way to distinguish between static and dynamic:
Static: straight HTML files
Dynamic: HTML is generated through server-side code and a data store(XML, database, etc.)
KISS - 动态页面更改不更改页面本身 .
您的页面是动态的,因为一旦部署,就可以更改内容,而无需更改页面的 HTML。
任何固定且始终呈现相同内容的内容都被视为静态。
KISS - Dynamic pages change without changing the page itself.
Your pages are dynamic, because once deployed the content can be changed without changing the page's HTML.
Any content that is fixed and always renders the same is considered Static.