Skip to Content
avatar image
Former Member

browser cache issue SAP UI5

Hi ,

        I have developed a SAP UI5 application and moved it to the production server. subsequent to that i have made some changes  to the code in development server and moved it to production server. But when we access SAP UI5 application from the browsers the new code is not getting updated in the application. To make this work every time i need to clear the browser cache manually. Even after running the report " " we need to clear cache in the browser manually.

In the application index we are using this code

<meta http-equiv="X-UA-Compatible" content="IE=edge">

<META HTTP-EQUIV="Pragma" CONTENT="no-cache">

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

<META HTTP-EQUIV="Expires" CONTENT="-1">

<script

   src="resources/sap-ui-core-all.js"

   id="sap-ui-bootstrap"

   data-sap-ui-libs="sap.m, sap.ui.commons,  sap.suite.ui.commons, sap.ui.table, sap.ui.ux3,sap.viz"

   data-sap-ui-theme="sap_bluecrystal"

    data-sap-ui-appCacheBuster="./"  >

</script>

Please suggest how make the new code getting reflected in the browser without clearing the browser cache manually.

Thanks & Regards,

Jayasree.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • avatar image
    Former Member
    Jan 10, 2015 at 06:47 PM

    For a production solution you should look at the cache buster mechanism.

    The mechanism changes the URL to prevent browser caching issues.

    Cache Buster - UI Frameworks based on HTML5, JavaScript and CSS - SAP Library

    Application Cache Buster - UI Frameworks based on HTML5, JavaScript and CSS - SAP Library

    Regards,

    Jason

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Pinaki Patra

      Clearing/disabling caching is fine for testing, however Jayasree mentioned deploying to production, where you can't rely on user clearing their cache.

      Regards,

      Jason

  • Jan 09, 2015 at 10:53 AM

    if your code does not work, disable the browser cache.

    In chrome => F12 => Network => Disable cache.

    As developer I never use caching in my browser.

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 10, 2015 at 05:58 PM

    Hi

    you can do what Kai has said or

    you can switch to in-cognito(Ctrl+Shift+N) mode if you are using chrome.


    In this mode  browser will never cache.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 13, 2015 at 01:29 PM

    Hello ,

    In web.xml do following changes:

    inside :

    <!-- ============================================================== -->

      <!-- UI5 resource servlet used to handle application resources      -->

      <!-- ============================================================== -->

    <context-param>

    Add:

      <param-name>com.sap.ui5.resource.DEV_MODE</param-name>

      <param-value>true</param-value>

      </context-param>

    -Kind Regards

    Ajay Nayak

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 14, 2015 at 11:25 AM

    Hi,

    This problem occurs in Microsoft Internet Explorer. However, in case of MS Explorer 10, the problem can be sorted out in the following way -

    Go to Settings --> General --> Browsing History --> Settings

    and please select the following option -

    Check for the newer versions of the stored webpages -

    • Every time I visit the webpage

    This will work and every time it will give refreshed version of the webpage only.

    Regards,

    Subhabaha Pal

    Add comment
    10|10000 characters needed characters exceeded