0

我遇到一些脚本缓存或 CSS 缓存阻止我更新这是我想做的更新

在此处输入图像描述

它在本地和本地主机上工作。但是当我将它部署到 appengine时,它​​会像这样出现,就像它没有样式一样。

在此处输入图像描述

可以做什么?HTML是

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>map</title>
    <link rel="stylesheet" type="text/css" href="/static/theCss2.css?234" />
    <script src="/static/jquery.min.js" type="text/javascript"></script>
    <script src="/static/us1Config.js?1222343" type="text/javascript"></script>
    <script src="/static/theJava.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function(){
            addEvent('map_1');
            addEvent('map_2');
            addEvent('map_3');
            addEvent('map_4');
            addEvent('map_5');
            addEvent('map_6');
            addEvent('map_7');
            addEvent('map_8');
            addEvent('map_9');
            addEvent('map_10');
            addEvent('map_11');
            addEvent('map_12');
            addEvent('map_13');
            addEvent('map_14');
            addEvent('map_15');
            addEvent('map_16');
            addEvent('map_17');
            addEvent('map_18');
            addEvent('map_19');
            addEvent('map_20');
            addEvent('map_21');
            addEvent('map_22');
            addEvent('map_23');
            addEvent('map_24');
            addEvent('map_25');
            addEvent('map_26');
            addEvent('map_27');
            addEvent('map_28');
            addEvent('map_29');
            addEvent('map_30');
            addEvent('map_31');
            addEvent('map_32');
            addEvent('map_33');
            addEvent('map_34');
            addEvent('map_35');
            addEvent('map_36');
            addEvent('map_37');
            addEvent('map_38');
            addEvent('map_39');
            addEvent('map_40');
            addEvent('map_41');
            addEvent('map_42');
            addEvent('map_43');
            addEvent('map_44');
            addEvent('map_45');
            addEvent('map_46');
            addEvent('map_47');
            addEvent('map_48');
            addEvent('map_49');
            addEvent('map_50');
            addEvent('map_51');
        })
    </script>
    <style>
        .unselectable {
            -moz-user-select:none;
            -webkit-user-select:none;
        }
    </style>
</head>

<body>




<div onselectstart="return false;" class="unselectable" >
<div id="wrapper">

<h1 id="logo" class="sprite_index_in_in_en_logo spritetext">hipheap.com - The right choice for buying &amp; selling in usa</h1>


    <!-- map code -->
    <div id="map_base">

    <span class="tip" id="tip"></span>

<!-- the svg code starts here -->
<svg version="1.1" id="map" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
     viewBox="0 0 1080 720" xml:space="preserve">

  ...  
</svg>
</div>
<div class="clear"></div>

</div>
</div>

</body>
</html>
4

3 回答 3

1

添加这些元标记

<meta http-equiv="Cache-control" content="no-cache">  
<meta http-equiv="expires" content="-1" /> 
于 2013-06-10T20:06:57.257 回答
1

将文件命名为不同的名称。这将强制浏览器将其视为新文件,重新下载并应用新样式。

我个人做基于日期的版本号,例如:

<link rel="stylesheet" type="text/css" href="css/mobile_20130405.min.css" />

变成

<link rel="stylesheet" type="text/css" href="css/mobile_20130610.min.css" />

也许这对您的项目进行更改过于简单,但只需更改文件名即可立即应用新样式。

于 2013-06-10T20:07:02.447 回答
-1

解决方案是禁用 google pagespeed 服务。

于 2013-06-10T20:59:06.513 回答