Adv

A ‘English Tutorials’ kategória archívuma

Hungarian Web Storage version

In this Article I am endeavor to do a demonstration in HTML5 to be introduced data storage modul (Web Storage) of a client side. Naturally it will not change the World as it seems – since the “cloud” we know that it will -, but nevertheless it assures a great option which we could solve only with different tricks so far (e.g.: Cookie). But the Cookie had many disadvantage (limited size 4KB, traffic through the forwarding per request etc.). Well on the other hands the HTML5 Web Storage by the current definition can store 5MB data per source. Plenty of data can be stored here. It is important aswell that no unnecessary traffic will spring up because it is not sending data only if we ask. (by the way it is not done to make 5MB storages)

The Web Storage itself stores the data in a key/value pair form and we can search back with this in a later time when we need it. The type of the key is text while the type of the value can be anything. Let’s see the types of the storage:

1. Session Storage

The data will be stored here until the end of the browsing Session. After that they will be deleted (this can redeem the cookies). As long as the data will not be important to us in a later time, or for users, it is worthwhile to use this solution due to saving of the resources.

2. Local Storage

It is a different case like the previous. The data will be stored here and remains until we will not delete the key/value pairs or the user will not do this with his/her browser. Now You could ask why is this so good? Because e.g.: if a user opens a new window he/she can get the data or if he/she quits from his/her browser and re-enter, the data will be available. Tovább olvasom »

Hungarian version

Got an idea from You that would be good to deal with the text marking a little bit. So I thought we should see some examples for the innovations and for the text marking aswell.

Let’s see the things we should know about according to the texts. Starting with the basics our texts should take into paragraph with the <p> element. Long ago there was an attribute called “align” but it was disused in HTML4 too neither HTML5 support this. Its use is very simple:

<p>It is a new paragraph</p>

The next is the <q> element which serves to insert short cites in. Some of the browsers show this between apostrophe. It has only one attribute. With its help we can mark the source where we cite from.
For this purpose we can use the <blockquote> element too. We can show longer cites with this but i recommend the use of the <q> element because in the case of the latter the browers running new paragraphs pell-mell. Its use the same as the element of <q>:

<q cite="http://www.magyarorszag.hu/">http://html5.ugyesen.com/ - HTML5 webportal</q>

Tovább olvasom »

Hungarian Version!

More of You have indicated, that the lists and the changes of the lists have been out of the articles so far. Now I would like to dissolve this gap. In my opinion there are less changes that happened according to HTML4.
You can make lists (ordered: (<ol> … <li>) or unordered (<ul>…<li>) or mixed lists (ordered and unordered) in a similar manner. So far we had opportunity to create lists in html aswell so let’s see an example for this:

The build-up of an unordered list:

<ul>
<li>Budapest</li>
<li>Pécs</li>
</ul>

The build-up of an ordered list:

<ol>
 <li>Budapest</li>
 <li>Pécs</li>
</ol>

Tovább olvasom »

Hungarian geolocation tutorial

What realy Geolocation is? The Geolocation modul of HTML5 returns the geographical position of device (computer, tablet, mobil etc.) that displays the webpage. We can send this to Google Maps. The only flaw is that it is not defined what helps to determine this location. (built-in GPS, based by cell informations or by IP Address etc.) If the Technical Specification in the final version is going to determine this a little bit specifically then we are going to get a very useful and fast spread tool in our hands.
Until that it is worthwhile to deal with this as curiosity. Unfortunately if there is no GPS modul in the device it can be locate our position approximately with 35-50km accuracy based by my experience. But I have got 200km deviation too. Let’s start then.

Checking the browser.

First of all we are going to check that whether our browser supports the new device or not. The code below only queries that our browser capable to use geolocation or not. If not then it returns an error signal. If it is capable then returns a blank screen. Tovább olvasom »

Hungarian Geolocation introduction

Update1

The working source can be available here. What is My IP? I put this up here because many of you seek.

Before we start the geolocation let me make a little retrospection. In this article we are going to see how we queried the data of browsers and users in the past. Our best assistance was the “user agent”.

The user agent acts as a client in a network protocol used in communications within a client–server distributed computing system.
Most frequently people use this in case of World Wide Web access applications (web browsers, web crawler etc.). The browers forwarding the “user agent” to the web server which describes the client hardware platform, the operating system, the browsers type and version and its language settings.

Browser information Tovább olvasom »