【问题标题】:It seems that not all of my HTML page loads in some browsers似乎并非我的所有 HTML 页面都在某些浏览器中加载
【发布时间】:2013-06-11 09:36:05
【问题描述】:

这是一个奇怪的问题。我不太确定发生了什么。我不知道是 MAMP 服务器导致问题还是 Laravel。我以前从未见过。

我在我的 MAC OS X 上使用 Google Chrome。在控制台中我收到 GET 错误。但是当我去网络时,它仍然显示为错误,当我点击像响应这样的标签时,它显示没有加载......即使页面上有内容。然后当我点击标题时,它说状态是 200... 太好了... 困惑了吗?

甚至预览都是空的...带有没有加载的错误消息。

现在,如果我回到控制台并刷新它会在不同的行显示错误......所以一旦它在 74 处,然后我刷新并得到 81,如果我再次刷新它会显示另一个数字......非常奇怪。

即使是我在 HTML 底部加载的 javascript 有时也能正常工作,有时却不行...

这更奇怪,因为它都在 Firefox 中运行。我尝试清空 Chrome 中的缓存......没有任何效果。有任何想法吗?有什么建议吗?

更新

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8"/>
    <title>Yaloub</title>
    <meta name="keywords" content="Yaloub, app network"/>
    <meta name="description" content="Yaloub is a app network."/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <link href="http://fonts.googleapis.com/css?family=Noto+Sans" rel="stylesheet" type="text/css"/>
    <link rel="stylesheet" href="http://localhost:8888/Yaloub/public/assets/css/style.css"/>
    <!--[if lt IE 9]><script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="http://localhost:8888/Yaloub/public/assets/ico/apple-touch-icon-144-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="http://localhost:8888/Yaloub/public/assets/ico/apple-touch-icon-114-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="http://localhost:8888/Yaloub/public/assets/ico/apple-touch-icon-72-precomposed.png">
    <link rel="apple-touch-icon-precomposed" href="http://localhost:8888/Yaloub/public/assets/ico/apple-touch-icon-57-precomposed.png">
    <link rel="shortcut icon" href="http://localhost:8888/Yaloub/public/assets/ico/favicon.png">
</head>
<body>
    <div id="wrap">
    <!-- Navbar -->
    <div class="navbar">
            <img src="http://localhost:8888/Yaloub/public/assets/ico/logo-page.png" alt=" " style="position:absolute;"/>
            <ul class="nav pull-right">
                                                        <!--<li><a href="http://localhost:8888/Yaloub/public/user">Logged in as user</a></li>-->
                <li><a href="http://localhost:8888/Yaloub/public/user/logout">Logout</a></li>
                                </ul>
        <div style="clear:both;"></div>
    </div>
    <!-- ./ navbar -->

    <!-- Container -->
    <div class="main container">
        <!-- Notifications -->
                    <!-- ./ notifications -->

        <!-- Content -->
        <section>
  <ul id="apps">
        <li class="app">
        <div class="app-frame">
            <a href="http://localhost:8888/Yaloub/public/ebooks" class="thumbnail"><img src="http://localhost:8888/Yaloub/public/assets/img/whitepage.png" alt="Ebooks" style="width: 200px; height: 200px;"/></a>
        </div>
        <div class="app-controls">
            <ul>
                <li class="app-controls-appname">Ebooks</li><li class="app-controls-favorite"><a href="app/ebooks/favorite/add"><div><span>Favorite</span></div></a></li><li class="app-controls-right-button app-controls-settings"><a href="app/ebooks/settings"><div><span>Settings</span></div></a></li>
            </ul>
        </div>
    </li>
        <li class="app">
        <div class="app-frame">
            <a href="http://localhost:8888/Yaloub/public/videos" class="thumbnail"><img src="http://localhost:8888/Yaloub/public/assets/img/videos.png" alt="Videos" style="width: 200px; height: 200px;"/></a>
        </div>
        <div class="app-controls">
            <ul>
                <li class="app-controls-appname">Videos</li><li class="app-controls-favorite"><a href="app/videos/favorite/add"><div><span>Favorite</span></div></a></li><li class="app-controls-right-button app-controls-settings"><a href="app/videos/settings"><div><span>Settings</span></div></a></li>
            </ul>
        </div>
    </li>
        <li class="app">
        <div class="app-frame">
            <a href="http://localhost:8888/Yaloub/public/photos" class="thumbnail"><img src="http://localhost:8888/Yaloub/public/assets/img/photos.png" alt="Photos" style="width: 200px; height: 200px;"/></a>
        </div>
        <div class="app-controls">
            <ul>
                <li class="app-controls-appname">Photos</li><li class="app-controls-favorite"><a href="app/photos/favorite/add"><div><span>Favorite</span></div></a></li><li class="app-controls-right-button app-controls-settings"><a href="app/photos/settings"><div><span>Settings</span></div></a></li>
            </ul>
        </div>
    </li>
    </ul>
</section>
<section id="app-settings">
<form method="POST" action="http://localhost:8888/Yaloub/public/app/appname/settings/add" accept-charset="UTF-8">
    <input type="hidden" name="_token" value="kfVaUXWVq8HuujqEuJQeVrD5kjr1HZR4Q0YNAm0q"/>
    <fieldset>
        <label for="app-settings-name">Name:</label>
        <input tabindex="1" type="text" name="app-settings-name" id="app-settings-name" />
        <label for="app-settings-url">URL:</label>
        <input tabindex="2" type="text" name="app-settings-url" id="app-settings-url" />
        <label for="app-settings-clientid">Client id:</label>
        <input tabindex="3" type="text" name="app-settings-clientid" id="app-settings-clientid" />
        <button tabindex="4" type="submit" class="btn">Save</button>
        <button tabindex="5" class="btn">Delete</button>
    </fieldset>
</form>
</section>
        <!-- ./ content -->
        <div style="clear:both;"></div>
    </div>
    <!-- ./ container -->

    <!-- the following div is needed to make a sticky footer -->
    <div id="push"></div>
    </div>
    <!-- ./wrap -->

    <footer id="footer">
      <div class="container">
        <p class="muted credit">&copy; All right reserved to Yalub.</p>
      </div>
    </footer>
    <script src="http://localhost:8888/Yaloub/public/assets/js/mootools-core-1.4.5-full-nocompat-yc.js"></script>
    <script src="http://localhost:8888/Yaloub/public/assets/js/site.js"></script>
</body>
</html>

当我刷新它时会发生以下情况,它会向我发送另一行错误:

这里是再刷新一次,记得我没碰过代码:

【问题讨论】:

  • 您能否发布一些与您的问题相关的屏幕截图和代码?
  • Chrome 似乎很困惑。如果返回 200,它不应在控制台中显示为错误。我唯一能想到的是正文长度标头和接收到的实际字节之间的差异。你试过其他浏览器吗?
  • 是的。它适用于 Firefox。
  • 我有一个非常相似的问题。我在本地运行 LAMP Laravel 框架,它给出了您在此处描述的确切错误。该错误仅显示在 Chrome 控制台中,但它会阻止您进行开发,因为它会导致加载源代码出现问题。您找到问题所在了吗?
  • 不知道。这很奇怪。我做了一些谷歌搜索,但找不到任何东西。

标签: macos laravel mamp laravel-4


【解决方案1】:

正如 11digitlabs 提到的 here 从您的 php.ini 中禁用 Xcache

【讨论】:

  • 我没有通过 php.ini。这就是我添加最后一个短语的原因,因为它是我尝试过的解决方案并且对我有用。当您是对的时,我不想添加另一个答案。希望没事。
【解决方案2】:

在 linux 服务器上也发生了同样的情况。 PHP 5.4.17 和阿帕奇。 主要影响通过 PHP 提供的 wordpress 网站和图像。

图片问题我看过很多关于它是内容长度问题的报告。

但是这对影响 wordpress 没有任何影响。 HTML 以分块形式发送,因此只能假设最终块失败或损坏,但难以分析。

对我来说,解决方法是在 apache 中为问题站点使用 setEnv downgrade-1.0。 讨厌,但唯一有效的东西。 HTML1.0 没有分块,所以它完成了这项工作。

【讨论】:

    【解决方案3】:

    在对这个确切的问题进行了一些可怕的调试之后,我发现了一些与 laravel-datatables-package 相关的问题,这些问题导致 apache 在 error_log 中抛出分段错误错误。我在github issue 上记录了这些问题。

    我会分析你的 apache error_logs,也许会从 eloquent 查询切换到 fluent,只是为了测试。

    【讨论】:

      猜你喜欢
      • 2016-09-02
      • 2014-04-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-03-11
      • 2013-04-15
      • 2019-11-27
      相关资源
      最近更新 更多