Consider HTML5 as an open web platform. What are the building blocks of HTML5?
more semantic text markup new form elements video and audio new javascript API canvas and SVG new communication API geolocation API web worker API new data storage
Describe the difference between a cookie, sessionStorage and localStorage.
localStorage - stores data clientside. data persists until user clears browser cache/local stored data. (window)
sessionStorage - data is also stored clientside but is destroyed when browser closes.
cookie - stored data that is usually accessed server-side. It can expire.
What is a DOM?
the Dom stands for Document Object model. Its the browsers Internal programmable representation of the web page. The Dom can be manipulated by languages like JavaScript, changing the page without changing the HTML
The DOM is a type of API
What is HTML?
What is HTML5?
What is XML?
What is an API?
What happens when you type in a URL browser
How does the internet work?
How would you design Twitter?
Explain the basic web Architecture
What are the 4 HTTP status codes?
Status Code: success 2XX, redirection 3XX, Client-Side Error 4XX, Server Side Error 5XX
What is a cookie and what does it do?
Cookie - is a small piece of of text stored on user’s computer
cookies are messages in web servers that get sent to your browser. your browser stores these messages in a small file .txt, when you request another page from the server, the browser sends the cookie back to the server.
What is a CDN?
CDN stands for content delivery network. CDN is the transparent backbone of the internet. All of us interact with CDN on a daily basis
CDN stores cached version of its content in geographical locations. Cache server will take less time to reach the user
CDN building blocks
Points of interest, Caching servers, SSD/RAM
Pop are located data centers responsible for communicating closer w people in its vicinity, each Pop contains numerous caching servers
Servers nearest to the website visitor respond to the request. The content delivery network copies the pages of a website to a network of servers that are dispersed at geographically different locations, caching the contents of the page. When a user requests a webpage that is part of a content delivery network, the CDN will redirect the request from the originating site’s server to a server in the CDN that is closest to the user and deliver the cached content. CDNs will also communicate with the originating server to deliver any content that has not been previously cached.
The process of bouncing through CDNs is nearly transparent to the user. The only way a user would know if a CDN has been accessed is if the delivered URL is different than the URL that has been requested.
what is DNS?
when you visit a domain, first it looks in the DNS cache, if not, it will do a DNS query .
computer contacts ISP recursive DNS servers, recursive servers have their own cache, process generally ends here
if not found, query root nameservers
Domain Name Servers (DNS) are the Internet’s equivalent of a phone book. They maintain a directory of domain names and translate them to Internet Protocol (IP) addresses.
This is necessary because, although domain names are easy for people to remember, computers or machines, access websites based on IP addresses.
Information from all the domain name servers across the Internet are gathered together and housed at the Central Registry. Host companies and Internet Service Providers interact with the Central Registry on a regular schedule to get updated DNS information.
When you type in a web address, e.g., www.jimsbikes.com, your Internet Service Provider views the DNS associated with the domain name, translates it into a machine friendly IP address (for example 216.168.224.70 is the IP for jimsbikes.com) and directs your Internet connection to the correct website.
After you register a new domain name or when you update the DNS servers on your domain name, it usually takes about 12-36 hours for the domain name servers world-wide to be updated and able to access the information. This 36-hour period is referred to as propagation.
Explain the database driven website architecture
What is AJAX?
AJAX = Asynchronous JavaScript And XML.
AJAX just uses a combination of:
A browser built-in XMLHttpRequest object (to request data from a web server)
JavaScript and HTML DOM (to display or use the data)
- Ajax isnt a technology, its several. coming together, in powerful ways
Update a web page without reloading the page
Request data from a server - after the page has loaded
Receive data from a server - after the page has loaded
Send data to a server - in the background
- AJAX incorporates XHTML and CSS
- the DOM
- JavaScript
- XMLhttpRequest
- XML and XSLT
How would you design a parking lot?
class parkingLot (zip code: int) - placeVehicle(vehicle: vehicle)
class parkingSpot(Id: long, enum Size )
What does a doctype do?
It tells the browser what version the language the page is written in.
It tells your browser how to render your document.
What’s the difference between full standards mode, almost standards mode and quirks mode?
Quirks mode - for older browsers.
Full standards - the behavior of the website is exactly as described by HTML/CSS specifications.
Almost standards is in between.
What’s the difference between HTML and XHTML?
XHTML is identical to HTML but more strict. Does not allow for mistakes. Stricter error handling.
What are data- attributes good for?
The data-* attributes is used to store custom data private to the page or application.
The data-* attributes gives us the ability to embed custom data attributes on all HTML elements.
What is the difference between classes and IDs in CSS?
ID and Classes can both be used to select an element to modify using CSS.
ID is more specific.
Ideally you would want 1 ID and multiple classes.
Describe Floats and how they work.
It pushes the element to the side you’ve chosen.
All other elements will take up the space (if float left, other elements will take up the right side)