【问题标题】:Website Rendering Problem: Safari 4 displays flash of content, then white screen网站渲染问题:Safari 4 显示内容闪烁,然后是白屏
【发布时间】:2011-09-22 07:38:24
【问题描述】:

我正在开发一个rails application,并且我从 Safari 4 用户那里得知一个奇怪且不规则的渲染错误,其中页面短暂出现,但很快消失并被空白页面取代。

我无法在 Lion 上的 Safari 5 中复制该问题,但我在 iOS 版 Safari 4 上多次遇到该问题。如果无法访问 Snow Leopard 或 Safari 4,我无法对此进行任何测试。

有时重新加载页面允许用户访问内容,但有时需要十多次尝试才能真正发生。

此外,在某些情况下,页面显示正常,但网站上会出现一些部分 HTML 标记。这可能有关系,也可能没有关系,但我只在 iOS 中遇到过这个问题。

目前我最好的猜测是问题是由图像的数据 URI 嵌入中的一些故障或某种其他类型的脚本错误引起的,但除此之外我不知道。

在此处访问网站 — http://www.fairviewhs.org

来自嵌入的 ruby​​ 布局:

<head>
  <%= include_stylesheets :screen, :media => 'screen, projection' %>
  <%= include_stylesheets :print, :media => 'print' %>
  <%= stylesheet_link_tag "event_calendar", :media => 'screen, projection, print' %>
  <!--[if lt IE 8]>
  <%= stylesheet_link_tag "compiled/ie", :media => 'screen, projection' %>
  <![endif]-->
  <link rel="stylesheet" href="/fancybox/jquery.fancybox-1.3.4.css" type="text/css" media="screen" />
  <script src="<%= javascript_path "load" %>" type="text/javascript" charset="utf-8"></script>
  <script type="text/javascript" charset="utf-8">
    head.js(
      "https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js",
      "http://gettopup.com/releases/latest/top_up-min.js",
      "<%= javascript_path "rails" %>",
      "<%= javascript_path "application" %>",
      "<%= javascript_path "jquery.sap" %>",
      "<%= javascript_path "sap" %>",
      "<%= javascript_path "forms" %>",
      "<%= javascript_path "nested_form" %>",
      "<%= javascript_path "event_calendar" %>",
      "<%= javascript_path "/fancybox/jquery.fancybox-1.3.4.pack.js" %>",
      "<%= javascript_path "/fancybox/jquery.easing-1.3.pack.js" %>",
      "<%= javascript_path "/fancybox/jquery.mousewheel-3.0.4.pack.js" %>",
      "<%= javascript_path "midiswag" %>"
    );
  </script>
  <%= csrf_meta_tag %>
  <%= favicon_link_tag %>
  <meta charset="utf-8" />
  <%- if @title.blank? -%>
    <title>Fairview High School</title>
  <%- else -%>
    <title>Fairview High School > <%= @title %></title>
  <%- end -%>
</head>

【问题讨论】:

    标签: javascript html ruby-on-rails css uri


    【解决方案1】:

    我找到了一台装有 Snow Leopard 的旧电脑——问题是文件 http://gettopup.com/releases/latest/top_up-min.js 中的脚本错误

    我仍然不知道为什么该问题仅出现在 Snow Leopard 和 iOS 的 Safari 4/5 中,但从 &lt;head&gt; 中删除该行代码确实可以解决问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-07-22
      • 1970-01-01
      • 1970-01-01
      • 2017-03-11
      • 2011-08-19
      • 1970-01-01
      • 2023-03-28
      • 1970-01-01
      相关资源
      最近更新 更多