12-14-2012 07:46 AM
Let's focus on the first one to get things sorted out.
Yes, Nukul I was able to load a local:/// page havin access uri="*".
Basitj: There are a couple things you can check out because nothing happens is not something we can particularily help with.
- If there is no pop-up saying that the access is blocked, then it is *probably* not a whitelisting issue, which would mean it's strange it all of a sudden stopped working.
Feel free to send me a zip/bar file I can try out. I'll try and help you work through things. I see that your main page in your config file is a local page, so I'm wondering how this could be an issue, but there are probably some gaps in my understanding.
12-14-2012 08:21 AM
Different webkit rules apply for loading a page (main load) and loading a resource.
We know we can navigate to a local:/// page but I bet if you made a xhr or resource load it won't work because there was a security bug fix that no longer allows non main loads to file.
Test case to try is load a local:/// resource from a remote page.
12-14-2012 09:00 AM
This is crazy, it is something to do with whitelisting.
The console says:
Not allowed to load local resource: local:///youtubelauncher.html?ur=http://www.youtub
Is that because of the url parameter?
12-14-2012 09:15 AM
I have only following access tags in config.xml and in exact given format below.
<!-- Expose access to all URIs, including the file and http protocols -->
<access subdomains="true" uri="*" />
<!-- Cordova API -->
<access subdomains="true" uri="file:///store/home" />
<access subdomains="true" uri="file:///SDCard" />
12-14-2012 09:50 AM
Unfortunately I think the only way to solve this atm is to have explicit <access> tag for the domain you are accessing local content from. There were some recent security changes on our part, but this should work around them. I know it seems to be working for me.
12-14-2012 03:00 PM
This may be a dumb idea but try it
Don't use localhost:// - just redirect from where you are
I see this happen constantly in 'normal' webdev
Typically what occurs is that you reference /<blah>/fred.ext
This is an absolute reference
Drop the / at the front of <blah> and you're using RELATIVE URLs
is completely different to...
It'll fing the first without any issyes - the second can be iffy (to say the least)
Take your HTML - dump it all in the root then reference from there
There are caveats with CSS
12-18-2012 03:08 AM
Thanks Jeff, Nukul and Erik. Jeff's right. Adding an explicit access tag with my website's root helped. Just to explicitly let every one know, all following scenarios are successfully redirecting back to my local webworks pages when directed from exter pages (hosted on external webserver).
window.locat = 'local.///whatever.html' works
clicking on <a href='local:///whatever.html' >LINK</> Works
Even having content in other tags embedded like images work too. I have this <img src='local:///myimg.jpg' /> works too.
Thanks again folks.
Now let's get back to my other question in this post: http://supportforums.blackberry.com/t5/Web-and-Web
01-02-2013 06:20 AM - edited 01-02-2013 06:26 AM
This is not working from me.
Though i have explicitly whitelisted that domain in config.xml, still it is not redirecting from server page to local page.
i have used this function to redirect
window.location = "local:///index.html";
I am using BB10 device