How to make user agent work everytime to show the browser in desktop mode in c# wp - C, C++, C# and Other Windows Phone Development

used user agent in
webBrowser.Navigate(new Uri(" link "),null,"user-Agent");
This works well.But only one time site opens in desktop mode and there after any search in browser opens in mobile site mode. Want to always open in desktop mode.
Example:
To make settings as in internet explorer for windows phone (website preference) which works in every Uri link.

Google: Windows phone Web browser user agent and click the second link.
Sent from my XT1060 using XDA Free mobile app

You have to manually change your browser's user agent. Unfortunately I cannot post links but if you go on stackoverflow, just search for 'windows phone browser in desktop mode'

Related

Touc Pro 2 going to mobile version of web pages -why???

I love my TP2 (vodafone version) but if I go to any site that has a mobile version it redirects me to that even though I want to see the full version. It is driving me mad.
BBC.co.uk redirects to bbc.co.uk/mobile
telegraph.co.uk redirects to m.telegraph.co.uk
Are others having this problem. I seemed to stop it yesterday after I tried changing the user agent string to a mozilla one but then it has gone back to the original user agent now after I rebooted the phone.
Try using skyfire for your browsing needs it has never done me wrong just dont visit any sites that are too personal like bank accounts and the like, ive benn told its not secure. there should also be a setting that lets you identify your handset as a desktop computer using opera. but ive had that same issue with a reset where i have to go in and set it again. Also just got netfront 3.5 and I havent had too much time with it but its a unique experience .
It has something to do with the browser. Thd symbian OS browser is the same.
Thanks for the tips but Skyfire is OK but nowhere near the browsing an screen quality experience of Opera.
My Experia didnt do this so it is only a setting somewhere but not sure what?
Are you navigating to sites by opening the "Internet" tab on TF3D and entering the URL into the search box at the top of the screen? If you do that, Google picks it up and returns you mobile versions of all the sites. If I put "bbc.co.uk" in there, a page of results comes up, and the first one is "bbc.co.uk/mobile".
To navigate to a page properly, open the "Internet" tab as normal but then click on the great big "launch browser" button (with a picture of the earth). Then select the address box at the top of the screen and enter your URL here instead.
Is that any better?
Nope I am not doing that as I have disabled TF3D because I hate it, but thats another story.
No I am not referring to the search page results and following pages that google formats, I am talking about typing plane old pages into Opera after launching opera from the programs menu.
don't have TP2 yet, but in my FUze opera -> menu -> settings -> display -> uncheck mobile view. that should do it. I'm still getting the hang of opera after using skyfire in the Kaiser.
Yes that is already unchecked too.
I believe that the BBC checks what browser you are using and then directs you to the page it thinks you want to see.
At the bottom of their home page there is a preferences link. Tells you to bookmark the version you are happiest to see.
Guess the Telegraph does the same. That would explain why setting your browser to say it is mozilla gave you the usual BBC page.
No idea on a long term fix except to bookmark! They are getting too clever for their own good!!!
The bbc and others take you to the crappy mobile site even if you dont want it. It drives me mad.
Have you tried going to the URL opera:config in opera and changing the settings there. I don't know if it will overwrite on soft reset but under user prefs there is a Custom User-Agent setting.
You could look at changing that perhaps?
Might be something with spoof useragent ID?
I fould this:
1 = Opera (default user agent string of Opera)
2 = Mozilla
3 = Internet Explorer
4 = Mozilla, Opera not mentioned
5 = Internet Explorer, Opera not mentioned
but that is probably not the whole story!!!
I have changed the max number of open tabs on this page to 4 from 2. following advice from someone here. That worked fine
Yes I make the changes that fix the problem then when I soft reset they go back to the old settings. I reckon it is because it is a Vodafone rom because it always sets it back to a Vodafone user agent string.
Strange, I make the changes in the editor and nothing happens but then I located the opera.ini file that the editor should edit in the \windows\opera folder and I edited it with a text editor in windows then uploaded the edited file. Nothing changed until I rebooted and then it was fine.
I changed my user-agent string to a standard Mozilla one and this has fixed my problem for some sites including the one I wanted to fix the mostbut not the telegraph.co.uk one. They must use something else. Need to play a bit more.
Download Opera Beta 9.7
Works great for me. No re-direction to mobile sites what so ever. There is an option in the settings of beta version to turn mobile view on/off. By default it's OFF.
When I install 9.7 beta on my vodafone TP2 and run it, it hangs and I have to reboot the device.
Sorted!!!!!
Don't you hate it when something so simple doesn't work!
OK, Tested BBC and telegraph after a reset and they both work.
Not my solution entirely but it came from here on the first post
http://forum.xda-developers.com/showthread.php?t=470001
Thank you gtrab.
The issue was that the config tool with opera was not saving the configuration properly so after a reset my opera:config seemed to be going back to an old version. One that I had hacked and broken!!!! ( I have no idea why that one saved and other ones didn't
Solution was to use total commander to get hold of the windows/opera9/opera.ini file and edit this on my computer before replacing back into the opera9 folder
I have gone back to the vodafone useragent
Custom User-Agent=Vodafone/1.0/HTC_Touch_Pro2/1.14.161.5 (50207) Opera/9.50 (Windows NT 5.1; U; en)
Default Spoof UserAgent
Spoof UserAgent ID=1
And it seems the important one
UAProf URL Enabled=0
Now I am getting the web pages as I see them on the desktop. Horah!!!!
Oh awesome thankyou. I searched everywhere for an answer but you found it. I will go and give it a try.

Any way to fully spoof a user agent?

I know dolphin browser HD and skyfire have options to change the user agent in the settings but some sites that I have tried force the mobile version anyways. With that said, is there any method of fully spoofing the user agent to desktop? Any help is greatly appreciated.
"Open your browser, enter "about:debug" (without quotes )into the address bar, then hit the "Go" button on your keyboard—don't tap the search/URL suggestion that comes up. You'll notice that the browser now does, well, nothing. But hit your Menu key, choose the "More" option, then select Settings. Scroll down some, and you'll see a new collection of advanced options there, including a "UAString" option. Click that, then choose between Android, desktop, or iPhone user strings to change what browser web sites think you're visiting with. "
SELECT "DESKTOP"
Try this and see if it works for you.
Sent from my Evo Killer!!!
OP is using Dolphin and Skyfire browsers, which don't need about:debug for UA spoofing.
I could be wrong but I remember reading somewhere that some sites are able to use your installed Flash player to determine that you're not using a desktop browser. I think there was a modified Flash player that worked around that to allow you to view sites like Hulu, but I don't know where one could download it. Maybe search the forums for Hulu Flash player?
Good luck!

Change Default User Agent

Has anyone figured out how to set the default's browser user agent as desktop? I know we can use request desktop site, but then it does not always work if you already some mobile sites. I did about:debug and was able to change the user agent to desktop, but it was only a temporary fix. Anyone know how we could change Desktop to default?
The setting in about:debug sticks for me but the browser still tends to pull mobile sites for some reason.
I don't know sorry. But I do know that you can do it with Dolphin HD browser if you don't mind using a different browser (I don't really like Dolphin to be honest..)
This is a really annoying feature. I totally loved the freedom that came with default user agent as desktop now i am stuck with forced mobile versions of websites
Something that i used to laugh at iphone users for. Whats going on with google
Type about:debug in the browser URL. Then recheck settings
Sent from my Nexus One using Tapatalk
the about:debug is not the solution! Stop recommending it. It has to be redone every reboot or everytime browser not used in a while.

Browser DeskTop Default?

Does anyone know how to make the browser default to Desktop? There's nothing I want to see in mobile view.
Type "about:debug" without the quotes in the address bar of the browser and hit go. A message about java will show up on the top. Click it and ignore any errors. Now hit menu and settings. there will be a new option called debug. Click it and go to uastring change it to desktop. Restart the browser and your done. You might need to reboot not sure
Thanks.. That worked great until I rebooted. Youtube still went to the mobile site. I went back to the java menu and the agent was still checked desktop. Works fine as long as the java script console is on.. Might have to use another browser..
Netconn said:
Thanks.. That worked great until I rebooted. Youtube still went to the mobile site. I went back to the java menu and the agent was still checked desktop. Works fine as long as the java script console is on.. Might have to use another browser..
Click to expand...
Click to collapse
I know on htc devices using about:debug was only good for that browsing session. You'd have to redo it anytime you close then reopen browser. You could try to set your homepage to about:debug to make it a little easier, but the browser would have to be modded to force it to keep those settingd. Its on my list of things I want to do but will likely be quite a while before I get to it. Search the forum for browser UAstring mod. You may find something that can help. I know some htc roms had it, not sure about samsung though.
Sent from my SGH-T999 using xda app-developers app
Use a different browser. Maybe dolphin or xscope or firefox.
I guess I'll use Opera, it works just fine and the desktop agent stays. I liked the stock browser and got used to it. Oh well, no problem.

mobile website loading not desktop version

Can anyone else confirm that going to www.crutchfield.com loads a mobile version instead of the regular desktop version? Any idea how I might see the regular version?
I dont have an RT device so cant duplicate and it appears that internet explorer on windows phone 7 loads the desktop version of the site.
Usually the URL for mobile sites has the http://m. or http://mobile. prefix instead of http://www. manually removing m or mobile usually forces sites into desktop mode. Most mobile sites also have a button near the very bottom (alongside where you expect to see copyright info) to reload the desktop site. Hopefully 1 of these 2 will be the case.
On my windows phone (samsung focus, original), it loads the same mobile version as on my surface.
You cant change the url because it will just continue to auto detect you.
RobbieRobski said:
You cant change the url because it will just continue to auto detect you.
Click to expand...
Click to collapse
My little test with both facebook and gmail.com worked fine. facebook.com on its own directed to the mobile site. http://facebook.com over-rode the mobile site and loaded the full version. You just have to be incredibly specific.
Regardless, you can use the IE developer tools (Tools menu, or press F12, which on Surface is Fn+PgDn). Use Tools->Change user agent string, and select another browser. Then refresh the page, and it should show correctly. (Idiotic web developers trying to be overly "clever" about detecting mobile browsers...)

Categories

Resources