- What are the main features of OOP?
Four main features of OOP are-
- What is overloading?
Overloading is a feature that allows a class to have more than one method having the same name if their argument lists are different.
- What is overriding?
Overriding is a feature if subclass (child class) has the same method as declared in the parent class.
- What are the differences between HTML5 and HTML?
- SVG, canvas and other virtual vector graphics are supported in HTML5, whereas in HTML, using vector graphics was only possible by using it in conjunction with different technologies like Flash, VML, and Silver-light, etc.
- HTML5 uses web SQL databases, application cache for temporarily storing data, meanwhile, in HTML, only browser cache could be utilized for this purpose.
- HTML5 is not based on SGML, and that allows it to have improved parsing rules which provide enhanced compatibility.
- In HTML5, inline MathML and SVG can be used in text whereas this wasn’t possible in HTML.
- HTML5 supports new kinds of form controls, for example: dates and times, email, number, range, tel, url, search etc.
- There are many new elements introduced in HTML. Some of the most important ones are: summary, time, aside, audio, command, data, datalist, details, embed, wbr, figcaption, figure, footer, header, article, hgroup, bdi, canvas, keygen, mark, meter, nav, output, progress, rp, rt, ruby, section, source, track, video.
- What is CRUD?
- What is the basic form of SQL SELECT Statement?
SELECT column1, column2, …
- What is the basic form of SQL UPDATE Statement?
SET column1 = value1, column2 = value2, …
- What is the basic form of SQL DELETE Statement?
DELETE FROM table_name WHERE condition;
- What is the basic form of SQL INSERT INTO Statement?
INSERT INTO table_name (column1, column2, column3, …)
VALUES (value1, value2, value3, …);
- How to optimize and reduce web application load time?
Although there are numerous techniques a web developer can use in reducing load time, but it can be done by optimizing images, enabling browser caching and minimizing HTTP requests.
- What are the differences in using HTTP / 2 as opposed to HTTP 1.1?
The advantage of HTTP / 2 compared to HTTP / 1.1 is
- HTTP headers data compression
- Server push technologies
- Over a single TCP connection parallel loading of page elements
- Prioritization of request
- What is CORS?
- What is the purpose of each of the HTTP request type when using a RESTful web service?
The purpose of each of the HTTP request types, when used with a RESTful web service, is as follows:
Retrieves data from the server (should only retrieve data and should have no other effect). This is also called an idempotent method.
This HTTP request type is usually used for creating an entity i.e. a resource without an id. Once the request is successfully created, an id of the newly created entity is returned as part of the response to this HTTP request. It is often used when uploading a file or submitting a completed web form.
Similar to POST, but used to update an existing entity. You pass the id of the existing resource along with PUT request type.
Removes the resource from the server. Similar to PUT you need to pass the id of the resource to be deleted.
Provides a means to test what a machine along the network path receives when a request is made. As such, it simply returns what was sent.
Same as the GET method for a resource, but returns only the response headers (i.e., with no entity-body). Similar to the GET request, HEAD Is also idempotent i.e. no side effect on Server.
Allows a client to request information about the request methods supported by a service. The relevant response header is Allow and it simply lists the supported methods. (It can also be used to request information about the request methods supported for the server where the service resides by using a * wildcard in the URI.)
Primarily used to establish a network connection to a resource (usually via some proxy that can be requested to forward an HTTP request as TCP and maintain the connection). Once established, the response sends a 200 status code and a “Connection Established” message.
- What is the difference between GET and POST?
The GET Method
- GET requests can be cached
- GET is used to request data from a specified resource
- GET requests to remain in the browser history
- GET requests can be bookmarked
- GET requests should never be used when dealing with sensitive data
- GET requests to have length restrictions
- GET requests is only used to request data (not modify)
The POST Method
- POST requests are never cached
- POST requests do not remain in the browser history
- POST requests cannot be bookmarked
- POST requests have no restrictions on the data length
- POST is used to send data to a server to create/update a resource
- In HTML what tag can be used for a multi-line text input control?
For multi-line text input control, use the “textarea tag”.
- How XHTML is different from HTML?
- XHTML requires that all tags should be in lowercase
- XHTML requires that all tags should be closed properly
- XHTML requires that all attributes are enclosed in double quotes
- XHTML forbids inline elements from containing block level elements
- List out the new APIs provided by HTML 5 standard?
HTML 5 comes with the number of new APIs
- Media API
- Text track API
- Application Cache API
- Data transfer API
- User Interaction
- Command API
- Constraint Validation API
- History API
- Explain what is an ETag and how does it work?
An ETag is an opaque identifier allocated by a web server to a specific version of a resource found at a URL. The ETag is a part of HTTP, the protocol for the world wide web and when the server reads the ETag from the client request, the server can then tell whether to send the file or tell the client just to use their local copy.
- What are the differences between session and cookies?
- Cookies are stored in the browser as a text file format.
- It is stored a limit amount of data. It is only allowing 4kb[4096bytes]
- It is not holding the multiple variables in cookies.
- Access the cookies values in easily. So it is less secure.
- The setcookie() function must appear BEFORE the tag.
- Closing the browsers at the time.
- Setting the cookie time to expire the cookie.
- Sessions are stored in server side.
- It is stored an unlimited amount of data.
- It is holding the multiple variables in sessions.
Destroy Sessions :
- Using unset() session, destroy the sessions.
- Using session_destory(), destroy the sessions.