Tag Archives: html5

HTML5 Makes Mobile Browsing Fun

iPhone and Nexus One

Although iPhone is not a buzz word anymore, it returns on the stage with its probably main rival – the Google Nexus One. Now maybe everybody have seen one of these two devices and has played around with it. What makes really fun when browsing is the support of special keyboards

Where Did .com Came From on the Keyboard?

You’ve probably seen that sometimes on the virtual keyboard of the mobile there is a special “virtual” button that places the “.com” string directly when entering a web address. That’s really fancy! It helps a lot of the lazy fingered.

Help Us HTML5

What HTML5 is supposed to help is that it can tell the mobile device which keyboard to open. You’re probably familiar with the “input” element:

<input type="text"...

and here comes the surprise. HTML5 gives us more. You can use not only “text” and “password”, but also “number”, “url” and “email”. See the picture bellow:

That’s really great, isn’t it?

jQuery localStorage plugin (alpha)

After submitting the HTML5 localStorage wrap plugin for jQuery, there comes the new version, hopefully more stable and reliable!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
(function(jQuery) {
 
   var supported = true;
   if (typeof localStorage == 'undefined' || typeof JSON == 'undefined')
      supported = false;
   else
      var ls = localStorage;
 
   this.setItem = function(key, value, lifetime) {
      if (!supported)
         return false;
 
      if (typeof lifetime == 'undefined')
         lifetime = 60000;
 
      ls.setItem(key, JSON.stringify(value));
      var time = new Date();
      ls.setItem('meta_ct_'+key, time.getTime());
      ls.setItem('meta_lt_'+key, lifetime);
   };
 
   this.getItem = function(key) {
      if (!supported)
         return false;
 
      var time = new Date();
      if (time.getTime() - ls.getItem('meta_ct_'+key) &gt; ls.getItem('meta_lt_'+key)) {
         ls.removeItem(key);
         ls.removeItem('meta_ct_'+key);
         ls.removeItem('meta_lt_'+key);
         return false;
      }
      return JSON.parse(ls.getItem(key));
   };
 
   this.removeItem = function(key) {
      if (!supported)
         return false;
 
      ls.removeItem(key);
      ls.removeItem('meta_ct_'+key);
      ls.removeItem('meta_lt_'+key);
      return true;
   };
 
   jQuery.localStorage = this;
 
})(jQuery);
 
if (!$.localStorage.getItem('test')) {
   $.localStorage.setItem('test', ['stoimen'], 5000);
   console.log('dynamic');
} else {
   console.log('from cache');
}