Party - Dave's Blog

Search
My timeline on Mastodon

Changing the User Agent string in UWP WebView

2018 Oct 23, 9:32

There's no perfect way to change the user agent string for the UWP WebView (x-ms-webview in HTML, Windows.UI.Xaml.Controls.WebView in XAML, and Windows.Web.UI.Interop.WebViewControl in Win32) but there are two imperfect methods folks end up using.

The first is to call UrlMkSetSessionOption. This is an old public API that allows you to configure various arcane options including one that is the default user agent string for requests running through urlmon. This API is allowed by the Microsoft Store for UWP apps. The change it applies is process wide which has two potential drawbacks. If you want to be able to have different UA strings set for different requests from a WebView that's not really possible with this solution. The other drawback is if you're using out of process WebView, you need to ensure you're calling into UrlMkSetSessionOption in the WebView's process. You'll need to write third party WinRT that calls UrlMkSetSessionOption, create the out of proc WebView, navigate it to some trusted local page, use AddWebAllowedObject or provide that URI WinRT access, and call into your third party WinRT. You'll need to do that for any new WebView process you create.

The second less generally applicable solution is to use NavigateWithHttpRequestMessage and set the User-Agent HTTP header. In this case you get to control the scope of the user agent string changes but has the limitations that not all sub resource downloads will use this user agent string and for navigations you don't initiate you have to manually intercept and re-request being careful to transfer over all POST body state and HTTP headers correctly. That last part is not actually possible for iframes.

PermalinkCommentsuser-agent uwp webview

Tweet from David Risney

2016 Oct 8, 4:19
A runoff or ranked voting system could have really helped http://www.nytimes.com/2016/10/08/opinion/howard-dean-how-to-move-beyond-the-two-party-system.html 
PermalinkComments

JavaScript Types and WinRT Types

2016 Jan 21, 5:35PermalinkCommentschakra development javascript winrt

Retweet of thegrugq

2015 Aug 16, 8:13
Ok, Hackers watching party on September 15.
PermalinkComments

Retweet of runasand

2015 Jul 22, 8:01
Great article about #HackingTeam's third-party acquisition of zero-day vulnerabilities and exploits by @vlad902: http://tsyrklevich.net/2015/07/22/hacking-team-0day-market/ …
PermalinkComments

Retweet of doomquasar

2015 Mar 8, 11:53
We finally did what we should've done forever ago: filled a party bag with restaurant names so we never have to decide again.
PermalinkComments

Windows Store on Windows 8 Fun For Independent Developers

2013 Jun 24, 1:00
Having worked on Windows 8 I'm not in a neutral position to review aspects of it, however I'll say from a high level I love taking the following various positives from smart phone apps and app stores and applying it to the desktop:
  • Independent developers can easily publish apps.
  • One trusted place for a user to find apps.
  • User can trust apps are limited to a declared set of capabilities.
  • One common and easy way for users to buy and try apps.
  • Easy mechanism for independent developers to collect revenue.
Relieving the independent developer of software development overhead, in this case Windows taking care of distribution and sales infrastructure is wonderful for me with my third party developer hat on. This combined with my new found fun of developing in JavaScript and the new Windows Runtime APIs means I've been implementing and finishing various ideas I've had - some for fun and some for productivity on my Surface. Development notes to follow.
PermalinkCommentsstore technical windows windows-store

(via Classic pro-science-careers music video PSA: Chemical...

2012 Jun 29, 10:03


(via Classic pro-science-careers music video PSA: Chemical Party)

Xeni says: “The EU wasn’t always so terrible at promoting science careers through funny internet music videos! (thanks, Guido)”

PermalinkCommentshumor chemistry video

Party Down: Season 1

2010 Jul 5, 4:28

I just finished watching both seasons of this very funny and engaging TV series Id previously never heard of and I highly recommend it. Adam Scott stars as an actor who has given up on his dream of acting and joins a catering company working along side actors trying to make it in LA. There are many ties to Veronica Mars: the shows creator is Rob Thomas (the creator of Veronica Mars), the show features Ken Marino and Ryan Hansen, and has guest stars of Kristen Bell, Jason Dohring, and Enrico Colantoni, among others. It has many of the same talented people from Veronica Mars but Party Down is more like a smarter and funnier The Office given the relationship between Adam Scott and Lizzy Caplan and their subtle mockery of their wackier workmates and inept boss.
PermalinkCommentsmovie review netflix Party Down: Season 1

WebSandbox - Microsoft Live Labs

2010 May 6, 7:16"Today web gadgets, mashup components, advertisements, and other 3rd party content on websites either run with full trust alongside your content or are isolated inside of IFrames. As a result, many modern web applications are intrinsically insecure, often with unpredictable service quality. Live Labs Web Sandbox addresses this problem."PermalinkCommentsweb browser web-sandbox technical javascript html windows live security sandbox microsoft silverlight

RFC 5849 - The OAuth 1.0 Protocol

2010 Apr 21, 6:49"OAuth provides a method for clients to access server resources on behalf of a resource owner (such as a different client or an end-user). It also provides a process for end-users to authorize third-party access to their server resources without sharing their credentials (typically, a username and password pair), using user-agent redirections."PermalinkCommentsoauth authorization security privacy internet web rfc standard technical

Tao Effect Blog » Blog Archive » Steve Jobs’ response on Section 3.3.1

2010 Apr 11, 2:16Lots of links, info, and thoughts on Apple's change to the iPhone SDK terms of service that now state "Applications must be originally written in Objective-C, C, C++, or JavaScript..." Means no other languages or third party platforms...PermalinkCommentssteve-jobs apple sdk api tos legal law iphone ipod ipad technical

Company Holiday Party Photo

2009 Dec 19, 3:23

sequelguy posted a photo:

Company Holiday Party Photo

Sarah & me at her company holiday party.

PermalinkCommentsparty holiday me sarah work company

Lessons Learned From Paintball

2009 Dec 16, 2:47

Dressed for Paintball.I played paintball for the first time at Eric's bachelor party a couple months ago. With the worst of my bruises fading I'm examining what I've learned:

PermalinkCommentspaintball lessons

Zombie Cake on Flickr - Photo Sharing!

2009 Oct 19, 4:32"This was our Zombie Wedding cake made by Mike's Amazing Cakes in Seattle! They're awesome! They made the Bride and Groom on top look like us down to the tux and dress, and the zombies matched our wedding party too!"
PermalinkCommentsphoto cake wedding zombie

How to Google Maps on Vimeo

2009 Aug 31, 4:53From Ira as part of The Balloon Project "... took the lo-fi diy map making essentials (portable helium tank, party balloons, and a disposable video camera) to Paris, France, where they launched a video camera into the sky not knowing where it would go, and created some very unique aerial cartography of the Place de la Concorde.' I'd love to see this run through photo stitching software like Photosynth and then layered on Google Maps.PermalinkCommentsmap balloon art ira-mowen france paris

The IKEA Fancy Dress Dinner Party

2009 Aug 11, 9:11Invite your friends for a fancy dress party with wine, dinner and board games of course, at IKEA. "...Jason downplayed our real intent, but let the very nice man know that we were here to play board games, and that we had chosen IKEA for the location because it was so much nicer that any of our own actual homes..."
PermalinkCommentshumor video prank ikea party parody

Translation Party

2009 Aug 7, 7:03Starting with an English phrase, Translation Party converts back and forth between English and Japanese until the result no longer changes.PermalinkCommentshumor language google javascript english japanese translation via:waxy

Mix an Exploding Drink - Wired How-To Wiki

2009 Jun 4, 3:14You've seen the YouTube clips demonstrating the riotous effect of dropping Mentos into Diet Coke. Why not turn the fizzy fun into an epic party prank of your own? Here's our recipe for a little cocktail we call the Manhattan Project.PermalinkCommentsvia:boingboing mentos meme wired humor coke soda howto alcohol drink for:hellosarah

Parents at Eileen's Party

2009 Jun 1, 2:30

sequelguy posted a photo:

Parents at Eileen's Party

PermalinkCommentscalifornia family parents eileensparty
Older Entries Creative Commons License Some rights reserved.