Firefox Add-On of the ... month? Issue #1: HttpRequester

Let me quickly introduce an interesting add-on for Firefox to you. It's called HttpRequester and it's very very useful add-on for basically any developer.

What it does, it enables you to quickly send an HTTP request using the method which is not easily done through the browser (PUT/POST/DELETE).

You can also use a "browser view" instead of plain-text view.

Read More

Return HTTP status code 404 and error content in ASP.NET MVC

Google and all other search engines say "don't do soft 404". The proper way to return a 404 is with a 404 status code and some content that indicates that the requested page is not available. But the key thing is to return Real 404 HTTP status code and avoid any solution that replaces 404 with 301. This is completely wrong and has a potential to do damage to your site.

How to do this? Well, as always in IT there are different ways. Here's how I usually do it.

Add this to web.config:

<system.webServer>
    <httpErrors errorMode="Custom" existingResponse="Replace">
      <remove statusCode="404" />
      <error statusCode="404" responseMode="ExecuteURL" path="/Error/NotFound" />
    </httpErrors>
  </system.webServer>

Create a new Error controller with a NotFound Action:

Read More

Direct social sharing URLs

There are cases when you don't want to add some plugin to your blog or to the website you're building simply to have social sharing links on your site.

You might also want to be in full control of your design.

In cases like these it's hand to have a set of commonly used social links.

So, here hey are.

Facebook

https://www.facebook.com/sharer/sharer.php?u={siteUrl}

Twitter

https://twitter.com/intent/tweet?url={siteUrl}&via=DomagojSalopek&text={socialTitle}

Documentation

Google Plus

https://plus.google.com/share?url={siteUrl}

Documentation

Linked In

https://www.linkedin.com/cws/share?url=@fullUrl

Pinterest

https://pinterest.com/pin/create/bookmarklet/?media={socialImage}&url={siteUrl}&is_video=false&description={socialTitle}
Read More

Getting started with Virtualization - Create a Ubuntu Virtual Machine

This will be brief but (excuse me for saying so myself) a cool little blog post about getting started with virtualization. We'll get into an example right away and some minutes from now you'll be testing your website in real IE6 on a virtual machine. Don't care about IE6? Fine, later in the article we'll quickly create our own little machine where you can install any software you might find useful.

We'll install Ubuntu. Why? Because it's free and cool.

Read More
SEO

SEO for Developers

Hey, you! Thanks for visiting. I don't know if you found this website via a search engine or by social media link or whatever, but thank you for stopping by. As a matter of fact, this will be the topic of our little post: how to improve your SEO, from the technical side of things.

This will be the post about what you as developers can do about SEO. We'll stay on the technical side of the equation, and leave the "snake oil salesmanship" to so-called "SEO experts, gurus and rockstars". Therefore we'll only mention the things that are proven to be SEO-friendly, and much more important than that, we'll see how you can implement those things using some popular Web Development technologies.

Read More