You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "David Azevedo (JIRA)" <ji...@apache.org> on 2016/08/02 20:42:20 UTC

[jira] [Comment Edited] (CB-3071) App cache is invalidated after complete restart of an app

    [ https://issues.apache.org/jira/browse/CB-3071?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15404746#comment-15404746 ] 

David Azevedo edited comment on CB-3071 at 8/2/16 8:42 PM:
-----------------------------------------------------------

I now changed in my config.xml 
<preference name="OverrideUserAgent" value="Mozilla/5.0 My Browser" />
To
<preference name="AppendUserAgent" value="[my_app_name_here]" />

And undone changes to CDVViewController.m and is working now.

If we look at the if in CDVViewController.m

    if (appendUserAgent) {
        _userAgent = [NSString stringWithFormat:@"%@ %@", localBaseUserAgent, appendUserAgent];   <<=== Now I Am Hiting Here
    } else {
        // Use our address as a unique number to append to the User-Agent.
        _userAgent = [NSString stringWithFormat:@"%@ (%lld)", localBaseUserAgent, (long long)self];  <<=== Before i was Hiting Here
    }

So if there is a reason to include the unique thing, at least it is not being included when we set to append user agent

Ill try some tests on my side to see if something breaks on my app, while i wait for your return.

If i see something break because of this ill report

Thank you!


was (Author: davixz):
I now changed in my config.xml 
<preference name="OverrideUserAgent" value="Mozilla/5.0 My Browser" />
To
<preference name="AppendUserAgent" value="2taps" />

And undone changes to CDVViewController.m and is working now.

If we look at the if in CDVViewController.m

    if (appendUserAgent) {
        _userAgent = [NSString stringWithFormat:@"%@ %@", localBaseUserAgent, appendUserAgent];   <<=== Now I Am Hiting Here
    } else {
        // Use our address as a unique number to append to the User-Agent.
        _userAgent = [NSString stringWithFormat:@"%@ (%lld)", localBaseUserAgent, (long long)self];  <<=== Before i was Hiting Here
    }

So if there is a reason to include the unique thing, at least it is not being included when we set to append user agent

Ill try some tests on my side to see if something breaks on my app, while i wait for your return.

If i see something break because of this ill report

Thank you!

> App cache is invalidated after complete restart of an app
> ---------------------------------------------------------
>
>                 Key: CB-3071
>                 URL: https://issues.apache.org/jira/browse/CB-3071
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.5.0
>            Reporter: Shazron Abdullah
>         Attachments: apache server 200 on GET requests from IOS Cordova client.pdf, apache server 304  on GET requests from cordova client.pdf, headers
>
>
> I have this report from a developer:
> We've recently upgraded from 2.2 to 2.5 on IOS.
> In 2.2, our application leveraged cached assets after a complete restart of the application.  In 2.5 the same scenario always requests new assets from the web server.  The web server has not changed, and it returns caching instructions with the content.  Once the application is running, the cached assets are utilized as we expect.
> Is this by design?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org