像按钮这样的Facebook压倒了IE7(Facebook like button overwhelms IE7)
我最近注意到我网站上的Facebook like按钮似乎压倒了IE7,但不是其他浏览器。 浏览器减慢到无法使用的程度。 我在我的虚拟机中将内存增加了三倍,看它是否会有所帮助,但事实并非如此。
标记:
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script> <fb:like show_faces="false" width="35" font="" layout="button_count"></fb:like>
如果我删除这些行,问题就会消失。
我注意到装载漩涡在IE7中保持旋转(似乎永远不会完成),所以我打开了Fiddler。 该页面似乎每秒刷新一次。 发出GET请求以刷新页面,并将?fb_xd_fragment附加到我的查询字符串。
所有这些请求的referer标题是http://static.ak.facebook.com/connect/xd_artiber.php?version=6 。
也会抛出JavaScript错误。
有谁知道更改Facebook标签上的任何特定设置是否可以解决问题? 有谁知道任何变通方法?
我发布了一个样品提琴手(这是我的第一个,所以请耐心等待): http : //jsfiddle.net/jhoppe/yQdsT/如果我去编辑小提琴的文字,例如,我可以很容易了解页面性能如何降低。 与我页面上的其他内容配对,性能变得难以忍受
I recently noticed that the Facebook like button on my site seems to overwhelm IE7, but not other browsers. The browser slows down to the point in which it is unusable. I tripled the memory in my virtual machine to see if it would help, but it didn't.
Markup:
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script> <fb:like show_faces="false" width="35" font="" layout="button_count"></fb:like>
If I remove these lines, the issue goes away.
I noticed that the loading swirl keeps swirling in IE7 (never seems to finish), so I opened Fiddler. The page seems to refresh about once a second. A GET request is made to refresh the page, and ?fb_xd_fragment is appended to my query string.
The referer header on all of these requests is http://static.ak.facebook.com/connect/xd_artiber.php?version=6.
JavaScript errors are also thrown.
Does anyone know if changing any particular settings on the Facebook tags fixes the issue? Does anyone know of any workarounds?
I've posted a sample fiddler (this is my first one, so please bear with me): http://jsfiddle.net/jhoppe/yQdsT/ If I go to edit the text of the fiddle, in example, I can easily see how the page performance has degraded. Paired with other content on my page, the performance becomes unbearable
原文:https://stackoverflow.com/questions/10883106
最满意答案
是。 看到这篇文章 。 这里有一个例子:
Console.BackgroundColor = ConsoleColor.Blue; Console.ForegroundColor = ConsoleColor.White; Console.WriteLine("White on blue.");
Yes. See this article. Here's an example from there:
Console.BackgroundColor = ConsoleColor.Blue; Console.ForegroundColor = ConsoleColor.White; Console.WriteLine("White on blue.");
相关问答
更多-
这就是ASP.NET 5.0的工作方式,而不是C#6.0。 基于使用DNX创建跨平台控制台应用程序 dnx命令用于在程序集中执行托管入口点(Program.Main函数)。 默认情况下,dnx run命令在当前目录中查找要运行的项目。 要指定其他目录,请使用-project开关。 另请阅读GitHub上的MS ASP.NET公告: 使用桌面CLR统一入口点语义 支持实例化入口点类型(Program)。 Main方法应该是public static void Main或public static int Ma ...
-
是。 看到这篇文章 。 这里有一个例子: Console.BackgroundColor = ConsoleColor.Blue; Console.ForegroundColor = ConsoleColor.White; Console.WriteLine("White on blue."); Yes. See this article. Here's an example from there: Console.BackgroundColor = ConsoleColor.Blue; Console. ...
-
您的输出编码可能设置为ASCII。 发送输出之前尝试使用这个: Console.OutputEncoding = System.Text.Encoding.UTF8; (MSDN 链接到支持文档。) 这里有一个小控制台测试应用程序,你可以找到方便: C# using System; using System.Text; public static class ConsoleOutputTest { public static void Main() { Console.Outpu ...
-
您不能写入本地计算机中的文件。 它会导致严重的安全漏洞。 最好的办法是将数据保存在服务器中。 以下可能工作,但需要一些服务器端工作。 (function(console){ var url = "domain.com/../userdata/" console.save = function(data, filename){ var ajaxreq = new XMLHttpRequest(); ajaxreq.open("POST", url+filena ...
-
使用Stopwatch课程 。 但是对每一行这样做似乎有点不可能......这意味着你必须在每一行之后添加例如Console.WriteLine() 。 用法示例: Dim sw As New Stopwatch sw.Start() yourMethod() sw.Stop() Console.WriteLine(String.Format("{0} ms", sw.Elapsed.TotalMilliseconds)) Use the Stopwatch class. However doing ...
-
.Net中的控制台问题(Console issue in .Net)[2022-06-24]
Joe Albahari的关于线程的免费电子书是一个很好的介绍。 I got the solution. The actual problem is with ReadKey(); It doesn't read from the keyboard. Perhaps, it takes the buffer data. -
使用C将输入写入控制台(Write input to console using C)[2022-03-14]
使用CreateProcess()通过重定向的STDIN句柄启动cmd.exe (这是system()所做的),然后您可以在代码中将数据写入cmd 。 请参阅使用重定向输入和输出创建子进程 。 但是,在net user命令的特定情况下,您应该使用NetUserGetInfo() , NetUserSetInfo() , NetUserChangePassword()等函数。 Use CreateProcess() to launch cmd.exe (which is what system() does) ... -
str包含调用String.Format()函数后的字符串值。 该功能记录在此处: http : //msdn.microsoft.com/en-us/library/b1csw23d.aspx 在您的代码中,{0}被替换为eea.SignalTime.ToLongDateString()的格式化表示,{1}被替换为eea.SignalTime.ToLongTimeString()的格式化表示。 所以回答 我想要理解的是,我不知道这个小程序中方法中的Console.Write(str)行。 Main如何知道 ...
-
你可能意味着Debug.WriteLine不是吗? 如果是这样,请使用sysinternals 调试查看器来查看任何应用程序(包括服务)发送的每个调试消息 编辑:一步一步 用Debug.WriteLine替换Console.WriteLine 下载调试查看器 运行调试查看器并启动您的服务 Debug Viewer将显示发送给Debug的每条消息。 (你可以过滤只看到对你有用的东西) 瞧! You probably mean Debug.WriteLine don't you ? If so, use the ...
-
彩色控制台输出[重复](Colored console output [duplicate])[2022-03-09]
C#你使用以下内容: Console.BackgroundColor = ConsoleColor.Blue; Console.ForegroundColor = ConsoleColor.White; Console.WriteLine("White on blue."); Console.Read(); 请记住,您也可以在JavaScript中执行此操作: console.log('%c Hello world', 'background-color: #0000FF; color: #FFFFFF' ...