开发者

jQuery Templates MIME type

开发者 https://www.devze.com 2023-01-30 15:25 出处:网络
Which is the correct MIME type to use for a jQuery Template, for both ASP.NET MVC and HTML: type=\"x-jquery-tmpl\"

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

精彩评论

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