…meie igapäevast IT’d anna meile igapäev…


How to set the language of the Google Calendar RSS/Atom feed

Filed under: Infotehnoloogia,Nipid — Sander @ 10:55:02
Tags: , , , ,

At home, Google Calendar feed was in Finnish. At work, in English. In InoReader, my current feed reader, Serbian (I think…). In my previous feed reader, Russian.

And no, I didn’t want it that way. Unfortunately, for some reason, instead of using my selected language in Calendar, Google seems to use a badly implemented combination of location sniffing and browser/client accept-language header to specify the language of the feed.

Officially there is no way to set the language of the feed (parameter reference). The “locale” in the same page does not work for feeds, nor does “lan=en” as recommended here. However, non-feed related Google Calendar forum post pointed me to the right direction.

You have to append hl=en (or other google-supported two-letter language code) to your feed URL. So that /calendar/feeds/[email]/private-[key]/basic becomes /calendar/feeds/[email]/private-[key]/basic?hl=en – or, with the other parameters, /calendar/feeds/[email/private-[key]/basic?futureevents=true&max-results=100 to /calendar/feeds/[email/private-[key]/basic?futureevents=true&max-results=100&hl=en.


Clear ASP.NET application cache

Filed under: Nipid,Programmeerimine — Sander @ 16:46:59

From time to time I’ve needed a way to clear ASP.NET cache – you know, the views cached with <%@ OutputCache Duration="3600" VaryByParam="None" %>. Usually the reason has been that changes in the development server needed to be shown while the caching is still “on”.

I used to do this with a change to web.config (add extra line, undo, save – the file is changed, cache is invalidated), but I wanted something that wouldn’t require me to access the test server every time.

if (!string.IsNullOrEmpty(HttpContext.Request.Params["emptycache"]))


    foreach (DictionaryEntry entry in HttpContext.Cache)





Add that snippet to appropriate page/class (for me, HomeController’s Index() method, as I use ASP.NET MVC) – and whenever your URL has ?emptycache=1 in it, application cache is cleared. As simple as that.


How to remove border from clicked links

Filed under: CSS,HTML,Nipid — Sander @ 12:02:54


By default, all browsers draw a border around the clicked links – Firefox and IE do a dotted line (first on the image on right) and Chrome (second) has an orange border. While normally this is not an issue – they do it to help user understand that the link has been clicked and is now active. In short, it is an accessibility and usability feature, meant to persist while the page is loading after the link was clicked.

Second (and for some people, more important functionality), is moving between the links using tab key. The outline helps to see what link is currently selected, so user can press enter to navigate.

However, there are times when we do not want or need the border around the link – accordion menus (which are on the picture above) are a perfect example. When user clicks on a menu item, we already have designs in place that show him which item became active – in case of accordion menus, the sub-items become visible.

We also may have tabs, to which we add  “active” class after click, distinguishing the selected element from its siblings – or a myriad of other Web 2.0 features, where the border just becomes unneeded ugly reminder of the time when JavaScript and CSS did not exist.

How does browser apply the border? Easy – it simply applies default design for :focus CSS pseudo-selector. And herein lies the key to removing the border – we override the style:

a:focus { outline: none; }

Or, to remove it from all selectable elements (accordion tabs are usually header tags, tab elements are list elements etc):

:focus { outline: none; }

Järgmine lehekülg »

Create a free website or blog at WordPress.com.