1. #1
    Sencha User
    Join Date
    Aug 2012
    Posts
    4
    Answers
    1
    Vote Rating
    0
    dobermanfa is on a distinguished road

      0  

    Default Answered: Production Build Caching Issue

    Answered: Production Build Caching Issue


    Hi,

    I've built an Secha Touch 2 mvc app and built it with the sencha command for production. The app uses a custom app.css.

    - the first entry in app.css is ignored in the production build. Is is not present in Chrome (Win) or in iPhone Safari. If I put an empty css class definition up front it seems to work.
    - the updated app.css is not used by the iPhone Safari client. It still uses the (cached) old version. However, it seems to know that the file has changes (it is requested from the server) but the client cache is not updated (it's requested every time) and the new file is not used.

    Any suggestions?

    Thanks four your help,
    Falk

  2. I found the problem: The mime type of the cache.manifest has to be text/cache-manifest. This was set differently by IIS.

    It works with Chrome, but Safari Console reported an error message.

  3. #2
    Sencha Premium Member
    Join Date
    May 2011
    Posts
    71
    Answers
    5
    Vote Rating
    6
    cyee is on a distinguished road

      0  

    Default


    It might be in localStorage

  4. #3
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,203
    Answers
    3516
    Vote Rating
    856
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Quote Originally Posted by cyee View Post
    It might be in localStorage
    That will have no bearing on this.

    I have not had any issues with the cache.manifest caching things even when updated, the browser should just handle it. Do know that it will load it twice, the first time to see if it changed and for whatever reason the browser will load it a second time to cache it.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  5. #4
    Sencha User
    Join Date
    Aug 2012
    Posts
    4
    Answers
    1
    Vote Rating
    0
    dobermanfa is on a distinguished road

      0  

    Default


    The files are not part of cache.manifest. There is only the html-file included. If I understand this correctly sencha touch does its own caching for the rest of the files (e.g. app.css). When this file changes, the html-app loads the file correctly from the server but still the old version is used.

  6. #5
    Sencha User
    Join Date
    Aug 2012
    Posts
    4
    Answers
    1
    Vote Rating
    0
    dobermanfa is on a distinguished road

      0  

    Default manifest mime type

    manifest mime type


    I found the problem: The mime type of the cache.manifest has to be text/cache-manifest. This was set differently by IIS.

    It works with Chrome, but Safari Console reported an error message.