2016-09-25 64 views
0

我一直在更改默認的Leave Request應用程序,我的問題是當我在web-ide中更改一行並運行它時,瀏覽器正在運行以前的文件。所以我認爲它緩存了controller.js文件,我是正確的,當我清除瀏覽器緩存並刷新網絡現在新線路被應用。因此,我想知道如何禁用這種行爲,因爲在開發應用程序時,每次刷新瀏覽器緩存並刷新Web-ide都非常令人沮喪。
經過一番搜索,我發現我可以添加一個index.html文件並從中調用該組件,並指定啓用緩存攔截器。但是,當我使用index.html時,它不會加載應用程序,也許我引用了錯誤。 index.html文件如下:SAP Fiori My Leave Request如何停止緩存

<!DOCTYPE html> 
<html> 
<head> 
<meta http-equiv="X-UA-Compatible" content="IE=edge"> 
<meta charset="utf-8"> 
<title>openSAP - Developing Web Apps with SAPUI5</title> 
<script 
      id="sap-ui-bootstrap" 
      src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js" 
      data-sap-ui-theme="sap_bluecrystal" 
      data-sap-ui-libs="sap.m" 
      data-sap-ui-compatVersion="edge" 
      data-sap-ui-preload="async" 
      data-sap-ui-resourceroots='{ 
      "com.mci": "./" 
      }'> 
</script> 
<script> 
/* sap.ui.getCore().attachInit(function() { 
     sap.ui.xmlview({ 
      viewName: "hcm.myleaverequest" 
     }).placeAt("content"); 
    });*/ 
    sap.ui.getCore().attachInit(function() { 
     new sap.ui.core.ComponentContainer({ 
     name : "hcm.myleaverequest" 
    }).placeAt("content"); 
}); 
</script> 
</head> 
<body class="sapUiBody" id="content"> 
</body> 
</html> 

回答

0

爲避免緩存,您可以在瀏覽器中使用「Private」(或「隱身」)模式或在Chrome中,您可以在調試窗口中禁用緩存:

自定義和控制開發工具 - >更多工具 - >網絡條件 - >禁用緩存