1. Explain what are the key responsibilities of a Web Developer?
Design, develop, test and deploy web applications and also keep the code on safe place like SVN, git etc. And after deployment if required to maintenance then need to give the support also.

2. What web developer should know?
A good web developer should know
HTML
CSS
SQL
Java/PHP etc
JQuery
JavaScript

3. Explain what is CORS? How does it work?
(CORS) Cross-Origin Resource Sharing is a mechanism that enables many resources (e.g., JavaScript, fonts etc.) on a web page to be requested from another domain outside the domain from which the resource originated. It is a mechanism supported in HTML5 that manages XMLHttpRequest access to a domain different.

4. What is HTTP? And how it works?
HTTP stands for Hypertext Transfer Protocol. When you enter HTTP:// in your address bar in front of the domain, it tells the browser to connect over HTTP. HTTP uses TCP (Transmission Control Protocol), generally over port 80, to send and receive data packets over the web. To put it simply it is a protocol that’s used by a client and server which allows you to communicate with other websites. The client sends a request message to a HTTP server (after the TCP handshake) which hosts a website, the server then replies with the response message. The response message contains completion status information, such as “HTTP/1.1 200 OK”.

status

5. What is HTTPS?
HTTPS stands for Hypertext Transfer Protocol Secure (also referred to as HTTP over TLS or HTTP over SSL). When you enter HTTPS:// in your address bar in front of the domain, it tells the browser to connect over HTTPS. Generally sites running over HTTPS will have a redirect in place so even if you type in HTTP:// it will redirect to deliver over a secured connection. HTTPS also uses TCP (Transmission Control Protocol) to send and receive data packets, but it does so over port 443, within a connection encrypted by Transport Layer Security (TLS).

6. What is the Difference Between HTTP and HTTPS?
1. HTTP URL in your browser’s address bar is HTTP:// and the HTTPS URL is HTTPS://.
2. HTTP is unsecured while HTTPS is secured.
3. HTTP sends data over port 80 while HTTPS uses port 443.
4. HTTP operates at application layer, while HTTPS operates at transport layer.
5. No SSL certificates are required for HTTP, with HTTPS it is required that you have an SSL certificate and it is signed by a CA.
6. HTTP doesn’t require domain validation, where as HTTPS requires at least domain validation and certain certificates even require legal document validation.
7. No encryption in HTTP, with HTTPS the data is encrypted before sending.

7. Explain what is long polling?
Long polling is a web application development pattern used to emulate pushing data from the server to the client. When the long polling is used, the client sends a request to the server, and the connection remains intact until the server is ready to send data to the client. The connection will be closed only after the data is sent back to the client or connection timeout occurs.

8. Explain what is DTD (Document Type Declaration)? And what is the difference between CDATA and PCDATA in DTD?
A DTD means Document Type Definition (DTD) which defines the structure, legal elements and attributes of an XML document.
PCDATA: A PCDATA is a Parsed Character Data. XML parsers usually parse all the text in an XML document.

CDATA: While CDATA is an Unparsed Character Data, the term CDATA is used about text data that should not be parsed by the XML parser.

9. Mention some tips you can use to reduce the load time of a web application that you have written?
Reduce image size
Remove unnecessary widgets
HTTP compression
Placing CSS at the top and script reference at the bottom or in external files
Reduce lookups
Minimize redirects
Caching etc.

10. Explain the purpose of each of the HTTP request types when used with a RESTful web service.
The purpose of each of the HTTP request types when used with a RESTful web service is as follows:

GET: Retrieves data from the server (should only retrieve data and should have no other effect).
POST: Sends data to the server for a new entity. It is often used when uploading a file or submitting a completed web form.
PUT: Similar to POST, but used to replace an existing entity.
PATCH: Similar to PUT, but used to update only certain fields within an existing entity.
DELETE: Removes data from the server.
TRACE: 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.
OPTIONS: 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.)
HEAD: Same as the GET method for a resource, but returns only the response headers (i.e., with no entity-body).
CONNECT: 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.

11. Explain the basic structure of a MIME multipart message when used to transfer different content type parts. Provide a simple example.
A simple example of a MIME multipart message is as follows:

MIME-Version: 1.0
Content-Type: multipart/mixed; boundary=frontier

This is a message with multiple parts in MIME format.
–frontier
Content-Type: text/plain

This is the body of the message.
–frontier
Content-Type: application/octet-stream
Content-Transfer-Encoding: base64

PGh0bWw+CiAgPGhlYWQ+CiAgPC9oZWFkPgogIDxib2R5PgogICAgPHA+VGhpcyBpcyB0aGUg
Ym9keSBvZiB0aGUgbWVzc2FnZS48L3A+CiAgPC9ib2R5Pgo8L2h0bWw+Cg==
–frontier–
Each MIME message starts with a message header. This header contains information about the message content and boundary. In this case Content-Type: multipart/mixed; boundary=frontier means that message contains multiple parts where each part is of different content type and they are separated by –frontier as their boundary.

Each part consists of its own content header (zero or more Content- header fields) and a body. Multipart content can be nested. The content-transfer-encoding of a multipart type must always be 7bit, 8bit, or binary to avoid the complications that would be posed by multiple levels of decoding. The multipart block as a whole does not have a charset; non-ASCII characters in the part headers are handled by the Encoded-Word system, and the part bodies can have charsets specified if appropriate for their content-type.

12. What is a “MIME type”, what does it consist of, and what is it used for? Provide an example.
MIME is an acronym for Multi-purpose Internet Mail Extensions. It is used as a standard way of classifying file types over the Internet.

Web servers and browsers have a defined list of MIME types, which facilitates transfer of files of a known type, irrespective of operating system or browser.

A MIME type actually has two parts: a type and a subtype that are separated by a slash (/). For example, the MIME type for Microsoft Word files is application/msword (i.e., type is application and the subtype is msword).

76 total views, 1 views today