Cache-Control: post-check, pre-check

An interesting resource about what those Cache Control headers actually mean! Sure made things a lot more clear for me!

Cache-control: pre-check, post-check

Internet Explorer applies the following logic to objects served with these extensions:

  1. Upon first request, the object is cached and is served from cache until the post-check interval expires.
  2. Once the post-check interval expires IE fetches the object from cache and checks for an updated one in the background. If a newer object is available it caches it. Upon every subsequent request this updated (and now cached) object is served until the pre-check interval expires.
  3. Once the pre-check interval elapses the object is treated as expired. IE will first ask the HTTP server if the object has changed since it was requested by the browser. If it has, IE will load the updated object.

read full article: http://aspnetresources.com/blog/cache_control_extensions.aspx

Google Promote

New to me is Google Promote. I’ve just spotted it today while wasting my time checking where I score for certain terms. You can call me old fashion.

Either way, for this little gimmick to appear you’ll have to be logged in to your Google account. Once you’re logged in you’ll see 2 icons next to your search result. The first one being “Promote” and the second one being “Remove”. If you click promote you’ll see the search result moving to the top of your page. When clicking “Remove” the search result dissapears magically to the bottom of your page. Google has even included a “puffy cloud” that says “poof” when you click this icon!

As for now, i have not seen any change in my search results or comments from other users. Perhaps Google hasn’t released it everywhere yet?

Protect your usb wires… oldskool!

Just when you think you saw everything… I ended up on a Japanese website that, in contradiction to most of them, for once doesn’t sell some weird cartoon porn. It’s quite possible that the people who invent those Japanese toys and products have too much time on their hands.

So here it comes! Protect your usb wires.. oldskool! With this slick combination lock, it will for sure take the criminal trying to use your precious mouse at least 5 or 10 minutes! Don’t wait any longer, get in touch with Thanko today and order your personal USB lock! *eek*

http://thanko.jp/usblock/

PHP Get monday, sunday, last monday & last sunday

A function I’ve put togheter for a work-related project to get date of monday, sunday, last monday & last sunday.. Might add in next monday and sunday later.


/**
* Get Mondays and Sundays
*
* Get monday, sunday, last monday & last sunday
* Example usage:
* // to retreive the dates using today as starting point
* $mondaysAndSundays = getMondaysAndSundays();
* // to retreive the dates using a custom date as starting point
* $mondaysAndSundays = getMondaysAndSundays('1987-04-14');
*
* @param date $offset Provide a date from where to calculate from in strtotime() translatable format. If none is given, today's date will be used.
*
* @return array
*
*/
function getMondaysAndSundays($offset=false)
{

if(!$offset) $offset = strtotime(date('Y-m-d'));
else $offset = strtotime($offset);

// this week
if(date('w',$offset) == 1)
{
$mas['monday'] = date('Y-m-d',$offset);
}
else
{
$mas['monday'] = date('Y-m-d',strtotime("last Monday",$offset));
}

if(date('w',$offset) == 6)
{
$mas['sunday'] = date('Y-m-d',$offset);
}
else
{
$mas['sunday'] = date('Y-m-d',strtotime("next Sunday",$offset));
}

// last week
if(date('w',$offset) == 1)
{
$mas['lastmonday'] =  date('Y-m-d',strtotime('-1 week',$offset));
}
else
{
$mas['lastmonday'] = date('Y-m-d',strtotime('-1 week', strtotime(date('Y-m-d',strtotime("last Monday",$offset)))));
}

if(date('w') == 6)
{
$mas['lastsunday'] = date('Y-m-d',strtotime('-1 week',$offset));
}
else
{
$mas['lastsunday'] = date('Y-m-d',strtotime("last Sunday",$offset));
}

return $mas;
}

What?! You Didn’t Google Him?

When you’re applying for a job, especially if it is in the IT sector, it’s getting quite common for an employer to look for you on any search engine. But shouldn’t we start Googling our (blind?) dates? Who knows, he might just be that old dirty guy from around the corner!

The man she forgot to google

« Older Entries

Newer Entries »

Archives

Twitter!