这是一个不做功课的情况.:-)
除了动态加载优势之外,当我可以从我的服务器加载一个包含19kb jQuery zip文件+附加JavaScript代码的单个文件时,从Google服务器中包含一个JavaScript库(在我的情况下是jQuery)是否有意义?写了 - 所有压缩与JS压缩器和HTTP放气.
使用Google服务器,我将进行2次(并行)HTTP往返.一个用于获取jquery文件,另一个用于获取站点JavaScript代码.一个19kb,另一个说20-25kb.在正常情况下,从我的网站下载一次30-35kb.
如何使用SharpSVN访问SVN存储库,并允许用户从Windows窗体中选择项目.
在分析一些ASP.NET MVC项目时,我看到了遍布各地的匿名类型.
HTML助手有它们:
<%=Html.TextBox("view.Address", "address", new { Class = "text_field" })%>
Run Code Online (Sandbox Code Playgroud)
很多动作的返回类型都有:
JsonNetResult jsonNetResult = new JsonNetResult
{
Formatting = Formatting.Indented,
Data = new {Something= “”}
}
Run Code Online (Sandbox Code Playgroud)
我知道这来自LINQ:
from p in context.Data
select new { p.Name, p.Age };
Run Code Online (Sandbox Code Playgroud)
这些是否真的是在LINQ之外完成任务的正确方法?它们是否会损害代码的可重用性和可读性?
我正在使用通过新W3C 规范中指定的Chrome和 IE 9公开的新webTiming API。
出于某种原因,我得到了loadEventEndas 0。这限制了我计算实际加载时间。
这是输出和代码
connectStart is: 1308411426685
responseStart is: 1308411429541
domLoading is: 1308411429548
connectEnd is: 1308411426685
domInteractive is: 1308411430023
fetchStart is: 1308411426667
secureConnectionStart is: 0
domainLookupStart is: 1308411426667
responseEnd is: 1308411429543
requestStart is: 1308411426685
loadEventEnd is: 0
domComplete is: 0
redirectStart is: 0
unloadEventEnd is: 1308411429545
domContentLoadedEventStart is: 1308411430023
domContentLoadedEventEnd is: 0
domainLookupEnd is: 1308411426667
navigationStart is: 1308411426667
unloadEventStart is: 1308411429545
loadEventStart is: 0
redirectEnd is: 0 …Run Code Online (Sandbox Code Playgroud) 我在几乎空的ASP.NET MVC项目的Site.Master页面中有以下代码.
<li>
<%= Html.ActionLink("Home", "Index", "Home")%>
</li>
<li>
<%= Html.ActionLink("Feed List", "FeedList", "Home")%>
</li>
<li>
<%= Html.ActionLink("Monitored Feeds", "MonitoredFeeds", "Home")%>
</li>
<li>
<%= Html.ActionLink("About", "About", "Home")%>
</li>
Run Code Online (Sandbox Code Playgroud)
我还没有添加任何文件夹到名为Feeds的Views文件夹.在Feeds文件夹中,我有两个视图; FeedList.aspx和MonitoredFeeds.aspx.我还将以下代码添加到HomeController中,如下所示.
[HandleError]
public class HomeController : Controller
{
public ActionResult Index()
{
ViewData["Title"] = "The Reporter";
ViewData["Message"] = "Welcome to The Reporter.";
return View();
}
public ActionResult About()
{
ViewData["Title"] = "About Page";
return View();
}
public ActionResult FeedList()
{
ViewData["Title"] = "Feed List";
return View();
}
public ActionResult MonitoredFeeds()
{ …Run Code Online (Sandbox Code Playgroud) c# ×2
performance ×2
.net ×1
actionlink ×1
actionresult ×1
asp.net-mvc ×1
html ×1
http ×1
javascript ×1
jquery ×1
linq ×1
svn ×1
w3c ×1