Chrome中的后退按钮会中断页面

时间:2012-03-20 14:17:58

标签: css google-chrome browser back-button

我有一个带有主题的cakePHP管理员。

当我导航然后按Chrome浏览器中的浏览器后退按钮时,页面会断开并显示如下:

enter image description here

并且前几行HTML如下:

                <header>
                    <section class="container_12">
                            <div class="upper clearfix">

没有定义HTML,没有标题结束标记,没有定义css ...

当我点击刷新时,页面正常加载:

enter image description here

HTML包含<!doctype html>,标题,所有元标记等等。

有什么问题?

<!doctype html>

<!--[if IEMobile 7]><html class="no-js iem7 oldie"><![endif]-->
<!--[if lt IE 7]><html class="no-js ie6 oldie" lang="en"><![endif]-->
<!--[if (IE 7)&!(IEMobile)]><html class="no-js ie7 oldie" lang="en"><![endif]-->
<!--[if (IE 8)&!(IEMobile)]><html class="no-js ie8 oldie" lang="en"><![endif]-->
<!--[if gt IE 8]><!--><html class="no-js" lang="en"><!--<![endif]-->
<!--[if (gte IE 9)|(gt IEMobile 7)]><!--><html class="no-js" lang="en"><!--<![endif]-->

<head>
    <meta charset="utf-8">

    <title>johns | Admin</title>
    <meta name="description" content="">
    <meta name="author" content="">

    <meta name="HandheldFriendly" content="True">
    <meta name="MobileOptimized" content="320">
    <meta name="viewport" content="width=device-width, target-densitydpi=160, initial-scale=1.0">

    <link rel="stylesheet" type="text/css" href="/backend/css/style.css" />     <link rel="stylesheet" type="text/css" href="/backend/css/colors/color4/color.css" />       <link href='http://fonts.googleapis.com/css?family=Droid+Sans:400,700' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=Droid+Serif:400,400italic' rel='stylesheet' type='text/css'>
    <link rel="stylesheet" type="text/css" href="/backend/css/grid.css" />      <link rel="stylesheet" type="text/css" href="/backend/css/fixed.css" />     
<link rel="stylesheet" type="text/css" href="/backend/css/print.css" media="print" />

    <!--[if (lt IE 9) & (!IEMobile)]>
        <script type="text/javascript" src="/backend/js/libs/selectivizr-min.js"></script>      <![endif]-->

    <script type="text/javascript" src="/backend/js/libs/modernizr-2.0.6.min.js"></script>  
    <meta http-equiv="cleartype" content="on">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>    
    <script type="text/javascript" src="/backend/js/plugins/jquery.ui.spinner.js"></script>     <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
    <script type="text/javascript" src="/backend/js/plugins/jquery.easing.1.3.js"></script>     <script type="text/javascript" src="/backend/js/plugins/jquery.mousewheel.min.js"></script>     <script type="text/javascript" src="/backend/js/plugins/jquery.collapsible.min.js"></script>        <script type="text/javascript" src="/backend/js/plugins/jquery.cookie.js"></script>     <script type="text/javascript" src="/backend/js/plugins/jquery.tipsy.js"></script>      <script type="text/javascript" src="/backend/js/plugins/autoresize.jquery.min.js"></script>     <script type="text/javascript" src="/backend/js/plugins/jquery.autotab-1.1b.js"></script>       <script type="text/javascript" src="/backend/js/plugins/jquery.uniform.min.js"></script>        <script type="text/javascript" src="/backend/js/plugins/ui.multiselect.js"></script>        <script type="text/javascript" src="/backend/js/plugins/fullcalendar/fullcalendar.min.js"></script>     <script type="text/javascript" src="/backend/js/plugins/fancybox/jquery.fancybox-1.3.4.pack.js"></script>       <script type="text/javascript" src="/backend/js/plugins/jquery.jBreadCrumb.1.1.js"></script>        <script type="text/javascript" src="/backend/js/plugins/jquery.dataTables.js"></script>     
    <!--[if lte IE 8]>
        <script type="text/javascript" src="/backend/js/plugins/excanvas.js"></script>      </script><![endif]-->

    <script type="text/javascript" src="/backend/js/plugins/jquery.flot.js"></script>       <script type="text/javascript" src="/backend/js/plugins/jquery.flot.pie.min.js"></script>       <script type="text/javascript" src="/backend/js/plugins/jflot.scripts.js"></script>             
    <script type="text/javascript" src="/backend/js/plugins/validation/languages/jquery.validationEngine-en.js"></script>       <script type="text/javascript" src="/backend/js/plugins/validation/jquery.validationEngine.js"></script>        
    <script type="text/javascript" src="/backend/blueimp/tmpl.min.js"></script>     <script type="text/javascript" src="/backend/blueimp/load-image.min.js"></script>       <script type="text/javascript" src="/backend/blueimp/jquery.iframe-transport.js"></script>      <script type="text/javascript" src="/backend/blueimp/jquery.fileupload.js"></script>        <script type="text/javascript" src="/backend/blueimp/jquery.fileupload-ui.js"></script>     <script type="text/javascript" src="/backend/blueimp/application.js"></script>      <script type="text/javascript" src="/backend/blueimp/jquery.xdr-transport.js"></script>
    <script type="text/javascript" src="/backend/js/plugins/jquery.wysiwyg.js"></script>        <script type="text/javascript" src="/backend/js/plugins/controls/wysiwyg.table.js"></script>        <script type="text/javascript" src="/backend/js/plugins/controls/wysiwyg.image.js"></script>        <script type="text/javascript" src="/backend/js/plugins/controls/wysiwyg.link.js"></script>     <script type="text/javascript" src="/backend/js/plugins/controls/wysiwyg.cssWrap.js"></script>      
    <script type="text/javascript" src="/backend/js/plugins/hoverIntent.js"></script>       <script type="text/javascript" src="/backend/js/plugins/superfish.js"></script>     <script type="text/javascript" src="/backend/js/plugins.js"></script>       <script type="text/javascript" src="/backend/js/script.js"></script>        <script type="text/javascript" src="/backend/js/mylibs/helper.js"></script>     
    <!--[if (lt IE 9) & (!IEMobile)]>
        <script type="text/javascript" src="/backend/js/libs/imgsizer.js"></script>     <![endif]-->
    <script type="text/javascript" src="js/init.js"></script>
    <script>
        MBP.scaleFix();
    </script>

    <script>
        var _gaq=[['_setAccount','UA-XXXXX-X'],['_trackPageview']]; // Change UA-XXXXX-X to be your site's ID
        (function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';s.parentNode.insertBefore(g,s)}(document,'script'));
    </script>

    <!--[if lt IE 7 ]>
        <script src="//ajax.googleapis.com/ajax/libs/chrome-frame/1.0.2/CFInstall.min.js"></script><script>window.attachEvent("onload",function(){CFInstall.check({mode:"overlay"})})</script>
    <![endif]-->
</head>

<body class="clearfix">


                <header class="mobile">
                    <section class="container_12">
                            <div class="upper clearfix">
                                <a href="/backend/" class="logo mt20"><img src="/backend/img/johns_logo.png" title="Dashboard" alt="" /></a>                                    <div class="clear">&nbsp;</div>                 
                                <div class="r usermenu">
                                    <ul class="sf_menu clearfix">
                                        <li>
                                        <div class="sf-with-ul" style="width:160px;">
kjhgfd

                                                

                                                        Log out                                                 
                                                                                                                          

                                <nav class="mainnav l">
                                    <ul id="mainnav" class="sf_menu clearfix">
                                        <li><a href="/backend/events"><img src="/backend/img/icons/helloadmin/dashboard.png" alt="Sessions" /><span>Sessions</span></a>                                             <ul>
                                                <li class="last"><a href="/backend/events/add">Add</a></li>
                                                <li class="last"><a href="/backend/events">View</a></li>
                                            </ul>
                                        </li>
                                    </ul>
                                </nav>
                            </div>
                    </section>
                </header>



<script>
    $(function() {
        $( "#datepicker" ).datepicker({dateFormat: 'yy-mm-dd'});
    });
</script>

<div id="main" class="container_12 clearfix" role="main">

    <div class="box twothirds">

        <div class="boxheading clearfix"><h3><img src="/backend/img/icons/fatcow-hosting-icons/32x32/page_copy.png" title="Schools" alt="" />Sessions</h3><a class="move"></a></div>

        <section>

            <table class="display" id="tabled">

                <thead>

                    <tr>

                        <th>Name</th>

                        <th>Starts</th>

                        <th>Track</th>

                        <th class="tview" style="padding-left:10px;">View</th>

                        <th class="tedit">Edit</th>

                        <th class="tdelete">Delete</th>

                    </tr>

                </thead>

                <tbody>

                                                <tr>

                            <td><strong>Something</strong>&nbsp;</td>

                            <td style="padding-left:10px;">8:00 am&nbsp;</td>

                            <td style="padding-left:10px;">MC&nbsp;</td>

                            <td style="padding-left:15px;"><a href="/backend/events/view/1"><img src="/backend/authake/img/icons/information.png" title="View" alt="" /></a></td>

                            <td><a href="/backend/events/edit/1"><img src="/backend/authake/img/icons/pencil.png" title="Edit" alt="" /></a></td>

                            <td><a href="/backend/events/delete/1" onclick="return confirm('Are you sure you want to delete this item?');"><img src="/backend/authake/img/icons/cross.png" title="Delete" alt="" /></a></td>

                        </tr>






                </tbody>

            </table>

            <div class="clear">&nbsp;</div>

        </section>

    </div>



    <div class="box onethird menu">

        <div class="boxheading clearfix"><h3><img src="/backend/img/icons/fatcow-hosting-icons/32x32/setting_tools.png" title="Actions" alt="" />Actions</h3><a class="move"></a></div>

        <ul class="clearfix">

            <li class="last"><a href="/backend/events/add"><img src="/backend/img/icons/add.png" title="Add" alt="" />Add</a></li>

        </ul>

    </div>



    <div class="box onethird">

        <div class="boxheading clearfix"><h3><img src="/backend/img/icons/fatcow-hosting-icons/32x32/alarm_bell.png" title="Notifications" alt="" />Notifications</h3><a class="move"></a></div>

        <section class="clearfix">

            <div class="login_notification_container"></div>

            <div class="clear">&nbsp;</div>

        </section>

    </div>

</div>




<footer role="contentinfo" class="clearfix">
    <section class="container_12">
        <div class="lower clearfix">
            <a href="#" id="top" class="top">top</a>
        </div>
        <div class="smallest">
            <div class="l">
                <span class="footer_copyright">&copy; Copyright 2012 johns</span>
            </div>
            <div class="r">
                <span class="footer_copyright">&copy; Copyright 2012 johns</span>
            </div>
        </div>
    </section>
</footer>

</body>

2 个答案:

答案 0 :(得分:0)

也许您在自己的浏览器中遇到问题。您能否将我们链接到网站,以便有人可以说它是否正常工作? (可能),这是您的浏览器设置的问题。无论如何,发布链接都会有所帮助。

答案 1 :(得分:0)

这里发生了什么AJAX?听起来有些东西是“捕获”与AJAX调用相关的后退按钮,然后以某种方式弄乱了它。如果你回去两次会怎么样?