PHP MySQL JAVASCRIPT AJAX HTML Interview Questions & Answers Part 2

PHP interview questions,mysql interview questions,java interview questions, html interview questions, XHTML

What is the difference between GET and POST method ?

1.From security perspective, GET is less secured than POST, because when you submit private data such as login information GET will display the information at browser address bar followed by the URL ( by URL encoding) But in POST data is passed by hidden format .

2. There is restriction of sending data over GET method (MAX 255 CHAR) because URL length is restricted .

3. In GET method there is another restriction which is data type . By GET method only ASCII character are allowed but In POST, no restriction , binary data is also accepted .

4. When you resubmit a form using GET method it re-executed but by POST the browser usually alerts the user that data will need to be re-submitted.

5. GET enctype attribute is ' application/x-www-form-urlencoded' and POST enctype attribute is 'multipart/form-data or application/x-www-form-urlencoded'

What is web 2.0 ?

source from webopedia

Web 2.0 is the term given to describe a second generation of the World Wide Web that is focused on the ability for people to collaborate and share information online. Web 2.0 basically refers to the transition from static HTML Web pages to a more dynamic Web that is more organized and is based on serving Web applications to users. Other improved functionality of Web 2.0 includes open communication with an emphasis on Web-based communities of users, and more open sharing of information. Over time Web 2.0 has been used more as a marketing term than a computer-science-based term. Blogs, wikis, and Web services are all seen as components of Web 2.0.

For more information related to web 2.0 see this [.pdf]

How do I add midi/mp3 music to my web page ?

This can be done quite simply with the below tag.

This tag will play the music.mid or music.mp3 once. If you wanted this song to continue without stopping, you would use loop="infinite" instead of the loop="1", which will only play it once. If you needs this to work with Netscape and Internet Explorer, you can use the embed tag to implement music to your page .

<embed src="canyon.mp3" width="145" height="60" type="text/html; charset=UTF-8" autostart="TRUE" loop="true"></embed>

What is <doctype> declaration ?

The doctype declaration should first thing in an HTML document, before the tag. This is not an HTML tag ;its a instruction to the web browser about what version of markup language is
written in.

The doctype declaration refers to a Document Type Definition (DTD). The DTD specifies the rules for the markup language, so that the browsers can easily render the content correctly.

Is there a way to get indexed better by the search engines?

Yes. Put these two statements in the part of your documents:
<meta name="keywords" content="keyword keyword keyword keyword">
<meta name="description" content="description of your site">

Both may contain up to 1022 characters. If a keyword is used more than 7 times the keywords tag will be ignored altogether. Also, you can't put markup (other than entities) in the description or keywords list.

What is meant by iframe?

Microsoft introduce the iframe concept to us.

iframe is used for creating an inline or floating frame. As most of know frames are mainly used to structure the page or for placing a menu bar on the side and so on. But iframe is used in a different context. That is in other words <iframe> is used to embed or insert content on a page of padding. This is done for several reasons. Say the content may be large enough that the user may wish to place it separately and scroll through it. There are many attributes present in <iframe> and some of the attributes used with <iframe> are namely:

NAME:


Used for specifying the name of the frame.



SCROLL:


Used for specifying the scrolling action to be activated. Can take three values namely AUTO, YES or NO. AUTO will allow the browser to take the decision and activate scroll bar when needed YES specify scroll bar is needed and NO specifies scroll bar is not needed.



ALIGN:


This is used for alignment of text and the values that can be taken by it are namely LEFT, RIGHT, TOP, MIDDLE, and BOTTOM.



FRAMEBORDER:


Used for setting borders, around the frames if needed. A value of 1 set the border around the frame and 0 specify for no border.



HEIGHT:


Used to specify the height of the frame and this value is mentioned in pixels.



HSPACE:


Used for specifying horizontal spacing around the frames.


Instead of regular submit button how you put image as a submit ?

<INPUT NAME=foo TYPE=image SRC="path/of/image">

How do I redirect to a new page with a specific interval (without Javascript)?

<meta http-equiv="refresh" content="5; url=http://urlpath">

What is XHTML ?

eXtensible HyperText Markup Language; a partial merge of XML and HTML standards [from wiki]

Post related to : PHP interview questions,mysql interview questions,java interview questions, html interview questions, XHTML


Archive

Enter your email address:

Delivered by FeedBurner

Stat Counter