What is HTML5? What is the difference between HTML and HTML5 ? Explain HTML-5What is the difference between HTML and XHTML? XHTML and HTML most important differencesIs jQuery a W3C standard?What are the functions for IMAP?What Is a Persistent Cookie?So if md5() generates the most secure hash, why would you ever use the less secure crc32() and sha1()?How to set the browser timeout ? ~ Interview Questions & Answers

Thursday, April 18, 2013

What is HTML5? What is the difference between HTML and HTML5 ? Explain HTML-5

HTML5 will be the new standard for HTML.
The previous version of HTML, HTML 4.01, came in 1999. The web has changed a lot since then.
HTML5 is still a work in progress. However, the major browsers support many of the new HTML5 elements and APIs.

HTML5 - New Features

Some of the most interesting new features in HTML5:
  • The <canvas> element for 2D drawing
  • The <video> and <audio> elements for media playback
  • Support for local storage
  • New content-specific elements, like <article>, <footer>, <header>, <nav>, <section>
  • New form controls, like calendar, date, time, email, url, search

What is the difference between HTML and XHTML? XHTML and HTML most important differences

The Most Important Differences from HTML:

Document Structure

  • XHTML DOCTYPE is mandatory
  • The XML namespace attribute in <html> is mandatory
  • <html>, <head>, <title>, and <body> is mandatory

XHTML Elements

  • XHTML elements must be properly nested
  • XHTML elements must always be closed
  • XHTML elements must be in lowercase
  • XHTML documents must have one root element

XHTML Attributes

  • Attribute names must be in lower case
  • Attribute values must be quoted
  • Attribute minimization is forbidden

Thursday, November 3, 2011

Is jQuery a W3C standard?

No

Tuesday, June 28, 2011

What are the functions for IMAP?

imap_body - Read the message body
imap_check - Check current mailbox
imap_delete - Mark a message for deletion from current mailbox
imap_mail - Send an email message

What Is a Persistent Cookie?

A persistent cookie is a cookie which is stored in a cookie file permanently on the browser's computer. By default, cookies are created as temporary cookies which stored only in the browser's memory. When the browser is closed, temporary cookies will be erased. You should decide when to use temporary cookies and when to use persistent cookies based on their differences:
*Temporary cookies can not be used for tracking long-term information.
*Persistent cookies can be used for tracking long-term information.
*Temporary cookies are safer because no programs other than the browser can access them.
*Persistent cookies are less secure because users can open cookie files see the cookie values.

Wednesday, June 8, 2011

So if md5() generates the most secure hash, why would you ever use the less secure crc32() and sha1()?

Crypto usage in PHP is simple, but that doesn’t mean it’s free. First off, depending on the data that you’re encrypting, you might have reasons to store a 32-bit value in the database instead of the 160-bit value to save on space. Second, the more secure the crypto is, the longer is the computation time to deliver the hash value. A high volume site might be significantly slowed down, if frequent md5() generation is required.

Friday, May 27, 2011

How to set the browser timeout ?

The set_time_limit() function enables the setting the timeout for the browser. The following snippet set the time out for 15 minutes / 900 seconds set_time_limit(900); The default time limit is 30 seconds or max_execution_time value available in php.ini file.