The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,862 other subscribers

Archive for the ‘Web Development’ Category

ADAP Open Source REST API Layer For LDAP | Dr Dobb’s

Posted by jpluimers on 2014/05/06

Interesting, as this opens LDAP server to a lot more tools and development environments: ADAP Open Source REST API Layer For LDAP | Dr Dobb’s.

–jeroen

Posted in Communications Development, Development, HTTP, Internet protocol suite, JavaScript/ECMAScript, JSON, LDAP, Power User, REST, Scripting, Security, Software Development, TCP, Web Development | Leave a Comment »

Redirect to another web-site using a frame/frameset

Posted by jpluimers on 2014/04/30

Every once in a while, you have a domain but the hosting is at another party that does not allow setting the “Host header” for name based virtual hosting.

So then you want to redirect the page to the hosting party, preferably with keeping the URL in the address bar.
Some how, when searching how to do this (I do it once every couple of years), I always miss the WikiPedia entry at the bottom of this post.

Basically, there are a couple of ways for this:

  1. frameset
  2. head meta refresh
  3. JavaScript window.location.href (which is different from top.location.href)

Only the first one keeps the current URL in the address bar of the browser. The other ones will show the new target url in the address bar.

Notes:

  • in HTML5, the noframes part is not allowed any more.
  • the meta refresh has no extra quotes around the URL, the quotes are around the full text of “0; url=http://TARGET.URL/PATH”

Examples:

Read the rest of this entry »

Posted in Development, HTML, HTML5, Software Development, Web Development | Leave a Comment »

cool: “A small app to browse through which is what in css” (via: This is why I Code – Google+)

Posted by jpluimers on 2014/04/17

+This is why I Code has pointed me to a really nice app called CSS Vocabulary which interactively shows you what is what in CSS.

Click on the CSS code or the column with CSS syntax elements on the right to see their correspondence.

The app is written by About Ville – Foolproof by design and source code is at the sakamies/css-vocabulary · GitHub repository.

The blog entry is at CSS Vocabulary – Foolproof by design.

–jeroen

via: This is why I Code – Google+ – “A small app to browse through which is what in css. Has….

Posted in CSS, Development, Software Development, Web Development | Tagged: | Leave a Comment »

Fiddler2 to the max: inserting proxy authentication to use DropBox (or other app) behind a corporate firewall

Posted by jpluimers on 2014/04/16


A while ago, I was working with a not so cooperative corporate firewall. All web browsers would work fine, but most other applications would not go through the proxy in a nice way.

For instance, DropBox would show the dreadfull “Connection Error” dialog shown on the right.

That dialog basically means “Dropbox has no clue what happens, try fiddling with your proxy or account settings, then press Reconnect Now” to retry.

Many other applications had issues (for instance Visual Studio connecting to Team Foundation System was very unreliable and the workarounds clumsy).

CNTLM: not the solution

I got inspired by the [WayBack] I code and code: Tutorial: How to use Dropbox behind a corporate proxy server using CNTLM, even though I was pretty sure the corporate firewall was not NTLM based.

And indeed, CNTLM -v -M http://google.com -c CNTLM.INI would give errors like this:

cntlm: Proxy returning invalid challenge!
headers_send: fd 4 warning -999 (connection closed)
Connection closed

HTTP Fiddler: looks promising

So I fired up my old buddy [WayBack] Fiddler 2 HTTP debugging proxy.

Further on, you will learn that Fiddler2 is much more, but right now it is enough to know that it basically sits as a local proxy between your applications and the outside world. Read the rest of this entry »

Posted in .NET, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, base64, Cntlm, Development, DropBox, Encoding, Fiddler, JavaScript/ECMAScript, NTLM, Power User, Scripting, SocialMedia, Software Development, Web Development, Windows, Windows 7, Windows 8, Windows Server 2000, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Vista, Windows XP, Windows-Http-Proxy | Leave a Comment »

Monitoring HTTP Output with Fiddler in .NET HTTP Clients and WCF Proxies – Rick Strahl’s Web Log

Posted by jpluimers on 2014/04/15

Reminder to self: for HttpWebRequest make sure you have your proxy setup correctly.

Monitoring HTTP Output with Fiddler in .NET HTTP Clients and WCF Proxies – Rick Strahl’s Web Log.

–jeroen

Posted in .NET, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, ASP.NET, C#, C# 2.0, C# 3.0, C# 4.0, C# 5.0, Development, Fiddler, Software Development, Visual Studio 11, Visual Studio 2005, Visual Studio 2008, Visual Studio 2010, Visual Studio and tools, Web Development | Leave a Comment »

Sample: Cast Media Player for Streaming with DRM (via: Shawn Shen – Google+)

Posted by jpluimers on 2014/04/01

Sample: Cast Media Player for Streaming with DRM

https://github.com/googlecast/CastMediaPlayerStreamingDRM

Flow Diagrams for Senders and Receivers

To help you decide which Google Cast options are right for your app, we have updated the Google Cast SDK documentation with two flow diagrams:

 

via Leon Nicholls – Google+ – Flow Diagrams for Senders and Receivers To help you decide….

via Shawn Shen – Google+ – * Sample: Cast Media Player for Streaming with DRM* ….

Posted in Chromecast, Development, Google, HTML, HTML5, JavaScript/ECMAScript, Power User, Scripting, Software Development, Web Development | Leave a Comment »

EU Cookie Regulations vs. Google+ plugins (via: Gerwin Sturem; Google Drive)

Posted by jpluimers on 2014/03/31

Interesting article by Gerwin Sturm on EU Cookie Regulations vs. Google+ plugins.

It’s not just that the directive causes this nagging because “of course we can’t remember that users haven’t given us consent for storing cookies, because that would require storing a cookie, so the consent banner will always appear until the user has actually given consent.”

Some other valuable tips are in this article as well. Now go read it (:

–jeroen

Posted in Development, HTML, HTML5, Software Development, Web Development | Leave a Comment »

HTML Best Practice: Get your HEAD in order (via: Eric Law; IEInternals on MSDN Blogs)

Posted by jpluimers on 2014/03/08

Even though 3 years old, this is still relevant. Thanks Ilya Grigorik for pointing me at it.

Make sure your HTML HEAD tag has the elements in the below order:

  • any charset must come first (UTF-8 works best) though even better is to specify this in your http header,
  • any any x-ua-compatible comes second.

Why? Read Best Practice: Get your HEAD in order – IEInternals – Site Home – MSDN Blogs.

So the document element starts like this: Read the rest of this entry »

Posted in Development, HTML, HTML5, Software Development, Web Development | Tagged: | Leave a Comment »

Choose your chart type & Amount of profanity in git commit messages per programming language (via: andrewvos.com)

Posted by jpluimers on 2014/03/07

Funny charts at andrewvos.com – Amount of profanity in git commit messages per programming language.

The source is online too: AndrewVos/github-statistics.

And it led me to this really nice way of choosing your chart type.

Click to enlargeRead the rest of this entry »

Posted in .NET, C#, C++, Development, Java, JavaScript/ECMAScript, Perl, PHP, Ruby, Scripting, Software Development, Web Development | 2 Comments »

HTTP protocol requires you to escape spaces (usually with %20 or with +), but web-browsers will do that for you

Posted by jpluimers on 2014/02/20

Since the time that spaces are allowed in path and file names, it has caused confusion.

I personally like the readability of  spaces, but still tend to avoid them as they usually cause more harm than the readability gains.

An interesting thread about spaces in file names is operating systems – What technical reasons exist for not using space characters in file names? – Super User.

In URLs, you there are various kinds of places where spaces can be used. You have to escape as Xah Lee wonders in does HTTP protocol require space be encoded in file path?.

The escaping is part of the URL Encoding, but the escapes depends on the position of the space. In the query part (after the first ?), you can have it escaped by both %20 and plus sign, but in the path part (before the first ? sign), it can only have a %20.

This is explained by bobince in urlencode – when to encode space to plus (+) and when to %20? – Stack Overflow.

That escaping basically makes path and file names a lot less readable when passed as a URL. It causes posts like these:

But why can you still use spaces when you type a URL in your web browser, or use it in a href, src or other HTML URL attribute?

Xah Lee rightfully earlier wondered about that in webserver – space in url; did browser got smarter or server? – Stack Overflow.

Technically, both are not allowed. But web browser manufacturers understand we humans are lazy, and accommodate for that by encoding these when putting them into the HTTP request.

You can type “https://www.google.com/search?q=foo bar” in your web browser, and depending on the browser, it gets translated into either one of these:

Recap:

  • encode spaces in URLs as %20
  • try to avoid spaces in path and filenames

–jeroen

via:

Posted in Development, Encoding, HTML, Software Development, URL Encoding, Web Development | Leave a Comment »