Skip to Content

SAP-Server sends no-cache, Appcache doesn't work

Hi guys

I'm developing a SAPUI5 application that needs to work offline. I'm using the Eclipse plugin provided by SAP to develop the app and upload it to the ABAP-server (SAP ECC 6.0, Enhancement Package 7).

In Chrome my appcache works fine on all platforms, yet it doesn't work in any other browser. I found out that the server sends "cache-control: no-cache, no-store" for my index.html file.

I tried to set the Browser-Cache to 1 day in the properties of index.html in se80 on the SAP server, but that didn't change anything. I googled a lot but just can't find out how to turn this off. Does anyone know how to turn this off?

Thank you so much.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Nov 03, 2015 at 04:59 PM

    Hi Benjamin,

    as I mentioned in this comment Going offline with SAP UI5 try to rename the index.html for example in start.html.

    Best regards,

    Michael

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 02, 2015 at 07:47 AM

    Hi Benjamin,

    Change the header field by using the method set_header_field of the response object inside the OnInitialization event of the BSP page or inside the layout of the BSP page.


    Example:

    response->set_header_field( name = 'Cache-Control' value = 'private, max-age=30879000' ).

    Regards,

    Christian Jianelli

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 02, 2015 at 05:21 PM

    in the index file, you may try to add this to the head tag:

    update the content attribute with whatever you need either no cache or the value you need for offline caching

    Add comment
    10|10000 characters needed characters exceeded

    • Did you forget to add some text after the colon? Are you saying, I could add something to the head tag of a normal html file or to a BSP page?

      I'd like to keep it an html file because I want to use the same files in different environments.