开发者

jQuery Templates MIME type

Which is the correct MIME type to use for a jQuery Template, for both ASP.NET MVC and HTML:

type="x-jquery-tmpl"

OR

type="text/html"

I have seen both used. For Example:

http://api.jquery.com/tmpl/ uses the first MIME 开发者_运维技巧type and http://weblogs.asp.net/scottgu/archive/2010/05/07/jquery-templates-and-data-linking-and-microsoft-contributing-to-jquery.aspx uses the second...


Either is fine; it's arbitrary. The key is not to use a type that the browser interprets as script, such as text/javascript.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜