[APP] Vable Browser 1.98 & Vable Browser Classic [13-Feb-2012]

dkp1977

Senior Member
Oct 6, 2009
1,218
108
0
Stolberg
www.opinion-control.de
Thanks.
Yes it work but when you use HttpWebRequest instread WebBrowser Control to navigate some website css will broke :(

I will try again. Thank you very much.
In webBrowser it would look like this:

webBrowser.Navigate("http://www.whatever.com", null, null, "User-Agent: put custom user-agent string here");

// Edit

You were faster than me. :D Great you managed to do it. So I'll keep my promise and buy the app as soon as the update is available. :)
 
Last edited:
  • Like
Reactions: varavut

varavut

Senior Member
Oct 18, 2009
131
34
0
In webBrowser it would look like this:

webBrowser.Navigate("http://www.whatever.com", null, null, "User-Agent: put custom user-agent string here");

// Edit

You were faster than me. :D Great you managed to do it. So I'll keep my promise and buy the app as soon as the update is available. :)
Thanks.

I submit via yallaapps and the process is very slow I will upload XAP to this thread before sent to yallaapps.
 

varavut

Senior Member
Oct 18, 2009
131
34
0
I very confuse.
When I want to add this site to favorites I will Tap "add to favorites" icon
if I want to change mode to desktop I will show the "desktop" icon or "mobile" icon
if I show the desktop when user is in mobile view they will confuse or not?

Thank you very much.
 

varavut

Senior Member
Oct 18, 2009
131
34
0
Already upload v 1.6 in post #1:)

*no cloud fox (or Firefox sync) integration in this version because I want to change the architecture to MVVM before.
 
Last edited:
  • Like
Reactions: singularity0821

varavut

Senior Member
Oct 18, 2009
131
34
0
Should be quite easy to fix. All you need to do is pass the user agent with every new URI like described above. The agent is passed through the variable set in the options. At least I think that it should work this way. :)
When user tap a link it bot pass to Navigate Method, so I can't add headers.
Thanks
 

varavut

Senior Member
Oct 18, 2009
131
34
0
Update 1.7

v1.7
- fix some problem of desktop view but still has post data problem
- add swipe to show all tabs in option (will instead swipe to change tab)
- fix refresh problem
 

varavut

Senior Member
Oct 18, 2009
131
34
0
nice gesture-enabled browser! bought it.
but
open more and more tabs, by clicking on links on the same site. fix, pls.
Thanks.

Please explain you problem.

if you tap an link in page it will not open new tab except you hold on a link and select open in new tab.
 

Marvin_S

Retired Recognized Developer
Dec 8, 2010
883
239
0
In Vable Browser version 1.2+ if it found that link is not web page it will open Internet Explorer for user can download file(file that can download must support by WP7).
Thanks
Can you share how you detect this?

Also we are working on a way to keep the user agent. I think we managed to get it to work, ill get back to you after we did some extensive testing. Btw your browser and ours is very similar... :)
 

varavut

Senior Member
Oct 18, 2009
131
34
0
Can you share how you detect this?

Also we are working on a way to keep the user agent. I think we managed to get it to work, ill get back to you after we did some extensive testing. Btw your browser and ours is very similar... :)
I download the website response header by send the HttpWebRequest

Code:
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(e.Uri);
request.Method = "HEAD";
request.BeginGetResponse(new AsyncCallback(GetResponseCallback), request);
check the ContentType

Code:
 private void GetResponseCallback(IAsyncResult asynchronousResult)
        {
            try
            {
                var request = (HttpWebRequest)asynchronousResult.AsyncState;
                var response = (HttpWebResponse)request.EndGetResponse(asynchronousResult);
     
                var a =response.Headers[HttpRequestHeader.ContentType];
                var type = a.ToString();
                Debug.WriteLine(type);
                if ((!a.Contains("text") && !a.Contains("html")) && currentNavigatingEventArgs.Uri == request.RequestUri)
                {
                    var webBrowserTask = new WebBrowserTask();
                    webBrowserTask.Uri = request.RequestUri;
                    Dispatcher.BeginInvoke(() => webBrowserTask.Show());
                    RefreshBrowser();//kill the navigation
                }
            }
            catch (Exception e)
            {
               
            }
        }

You can keep the user agent when user tap link?Could you please share it?
 
Last edited:

Marvin_S

Retired Recognized Developer
Dec 8, 2010
883
239
0
I download the website response header by send the HttpWebRequest

Code:
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(e.Uri);
request.Method = "HEAD";
request.BeginGetResponse(new AsyncCallback(GetResponseCallback), request);
check the ContentType

Code:
 private void GetResponseCallback(IAsyncResult asynchronousResult)
        {
            try
            {
                var request = (HttpWebRequest)asynchronousResult.AsyncState;
                var response = (HttpWebResponse)request.EndGetResponse(asynchronousResult);
     
                var a =response.Headers[HttpRequestHeader.ContentType];
                var type = a.ToString();
                Debug.WriteLine(type);
                if ((!a.Contains("text") && !a.Contains("html")) && currentNavigatingEventArgs.Uri == request.RequestUri)
                {
                    var webBrowserTask = new WebBrowserTask();
                    webBrowserTask.Uri = request.RequestUri;
                    Dispatcher.BeginInvoke(() => webBrowserTask.Show());
                    RefreshBrowser();//kill the navigation
                }
            }
            catch (Exception e)
            {
               
            }
        }

You can keep the user agent when user tap link?Could you please share it?
Relly hacky atm:
Code:
Navigating()
{
If (noHeader = true)
{
e.Cancel = true;
Webbrowser.Navigate(e.Uri, null, Headers);
noHeader = false;
}
}

Navigated()
{
noHeader = true;
}
It does not work superb but it kind of works. I wonder if we can intercept a tap on the webbrowser element and than detect wheter you are tapping on a link? Abort the navigation and copy the header and continue the navigation.

Also my navigation does not seem to work if I dont add www is there any wa yto solve this?
Thanks ill let you know if Ive found a better way to solve the user agent problem.

Regards
 
  • Like
Reactions: varavut

varavut

Senior Member
Oct 18, 2009
131
34
0
Relly hacky atm:
Code:
Navigating()
{
If (noHeader = true)
{
e.Cancel = true;
Webbrowser.Navigate(e.Uri, null, Headers);
noHeader = false;
}
}

Navigated()
{
noHeader = true;
}
It does not work superb but it kind of works. I wonder if we can intercept a tap on the webbrowser element and than detect wheter you are tapping on a link? Abort the navigation and copy the header and continue the navigation.
Thanks.

This code seem work great but I worry about post data. Will it parse to new navigate()?


Also my navigation does not seem to work if I dont add www is there any wa yto solve this?
I'm sorry, Could you please explain this sentence?

sorry for my language is not good.

Thanks.
 

Marvin_S

Retired Recognized Developer
Dec 8, 2010
883
239
0
Thanks.

This code seem work great but I worry about post data. Will it parse to new navigate()?



I'm sorry, Could you please explain this sentence?

sorry for my language is not good.

Thanks.
I think postdata will work, not 100% sure, but i believe it does.

Uhm well you have implemented tap and hol to bring the popup menu on a link. Can you not bind the tap and detect if you are on a link? If so, you cancel the navigation action and navigate to this link with the headers :)
 
  • Like
Reactions: varavut

varavut

Senior Member
Oct 18, 2009
131
34
0
I think postdata will work, not 100% sure, but i believe it does.

Uhm well you have implemented tap and hol to bring the popup menu on a link. Can you not bind the tap and detect if you are on a link? If so, you cancel the navigation action and navigate to this link with the headers :)
OK Thanks I will try it again.
 

byobge

Member
Apr 12, 2011
24
3
0
Boston
Forgot to mention another thing I like a lot - the ability to set a Home page (or pages). That's sorely missing in the stock Mango browser. (I like it because it makes it absolutely clear when you're starting a new browser session, and when you're restoring an old one. Mango makes both situations look exactly the same, but behave differently :-()

You should be able to get to articles on the top level of Salon.com without logging in (forgot I'm a member there) - just go to the front page (Salon.com), click on an article title, then click on the Comments link at the end of the article - it wasn't one particluar article that didn't work for me, it was ALL of them.

Thanks again for putting this out there - I'm looking forward to seeing where it goes.

bobg
 
  • Like
Reactions: varavut