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.
精彩评论