Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
189 views
in Technique[技术] by (71.8m points)

html - Should I include a <meta generator> tag?

Suppose I have some sort of proprietary web framework. Should I include a <meta generator="My framework"> tag in the generated files?

I noticed that StackExchange 0.9 applications do that, and wondered what are the pros/cons of doing it. Does it have any effect, or is it just useful for people looking at the source to see?

question from:https://stackoverflow.com/questions/3632166/should-i-include-a-meta-generator-tag

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I've never seen a tag formatted like that before, with an attribute called generator and the generating software as its value. Usually you'll see it presented as name="generator" and the generating software as its corresponding content, for example:

<meta name="generator" content="WordPress 3.0.1" /> <!-- leave this for stats -->

Previously I was unaware of any standard for this, however it looks like HTML5 has gone ahead and standardized the use of "generator" as a metadata name. It describes it thus:

The value must be a free-form string that identifies one of the software packages used to generate the document. This value must not be used on pages whose markup is not generated by software, e.g. pages whose markup was written by a user in a text editor.

In the past when dynamic web apps weren't that prevalent, certain web site editors, like FrontPage (there, I said it), would automatically insert generator tags when you create new HTML documents or publish sites using them. This was taken to mean "This page was created using FrontPage". I don't think any modern editors or IDEs do this anymore, but I could be wrong. It's definitely commonly used in dynamic web apps today, however.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...