如何绕过一些缓存或同样?

时间:2013-06-10 20:05:19

标签: html css google-app-engine python-2.7

我正在经历一些脚本缓存或CSS缓存阻止我更新这是我想要做的更新

enter image description here

它在本地和本地主机上运行。但是当我deploy it to appengine出现这样的时候就像它没有风格一样。

enter image description here

可以做些什么? 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>

3 个答案:

答案 0 :(得分:1)

添加这些元标记

<meta http-equiv="Cache-control" content="no-cache">  
<meta http-equiv="expires" content="-1" /> 

答案 1 :(得分: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" />

也许这对于您的项目的更改过于简单,但文件名更改就是立即应用新样式所需的全部内容。

答案 2 :(得分:-1)

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