

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


How a request becomes a page, and what makes the page accessible and safe Computer Science | Undergraduate (Level 4) | December 2026
WHAT IS INSIDE
A browser resolves a URL to an IP address through DNS , opens a TCP connection (with TLS for HTTPS), and sends an HTTP request with a method, path, headers and optional body. The server responds with a status code , headers and body. The status classes are worth memorising: 2xx success, 3xx redirection, 4xx client error, 5xx server error. GET is safe and idempotent, POST creates and is neither, PUT replaces and is idempotent, PATCH amends, DELETE removes.
Cookies carry state over a stateless protocol; HTTP/2 multiplexes many requests over one connection and HTTP/3 runs over QUIC. Caching is decided by headers such as Cache-Control , ETag and Last-Modified , and understanding it explains most 'why am I seeing an old version' questions. The critical rendering path - HTML parsed into the DOM , CSS into the CSSOM , combined into the render tree, then layout and paint - determines what blocks first paint.
HTML describes meaning , not appearance. A semantic document uses header , nav , main , article , section and footer rather than generic containers, which helps assistive technology, search engines and future maintainers. Headings form a hierarchy: one h1 per page and no skipped levels. Lists, tables and forms each have elements that carry the meaning; a table is for tabular data, never for layout.
Accessibility follows the WCAG principles - perceivable, operable, understandable, robust. In practice that means text alternatives on images, labels tied to inputs, sufficient colour contrast, keyboard operability, visible focus and correct landmarks. ARIA attributes can add semantics but the first rule of ARIA is not to use it when a native element already carries the meaning. Forms need label for , appropriate input type for mobile keyboards, and error messages announced to screen readers.
Web Development: HTTP, HTML, CSS and JavaScript Fundamentals
CSS resolves conflicts by cascade : importance, then specificity, then source order. Specificity is scored by inline styles, IDs, classes and attributes, then elements; !important overrides normal declarations but should be a last resort. The box model - content, padding, border, margin - determines size, with box-sizing: border-box making width include padding and border. Inheritance carries text properties down, which is why a font set on the body applies everywhere unless overridden.
Flexbox lays out in one dimension and handles alignment and distribution along a main axis. Grid lays out in two dimensions with explicit rows and columns, and is the right tool for page structure. Media queries and fluid units support responsive design, and the mobile-first approach starts with the smallest screen and adds complexity upward. Custom properties make theming possible, and normal flow should be understood before either layout module is used.
JavaScript is single-threaded with an event loop : synchronous code runs to completion, then the microtask queue (promises) drains, then the task queue. The DOM is a tree of nodes; querySelector selects, addEventListener responds, and event bubbling allows delegation from a parent. fetch returns a promise; async/await is syntactic sugar that makes asynchronous code read sequentially, with errors handled by try/catch.
Security is a client responsibility as well as a server one. XSS injects executable script; the defence is output encoding and a strict Content Security Policy , not blocklisting characters. CSRF makes a logged-in browser send a forged request; the defence is a synchroniser token or SameSite cookies. SQL injection is prevented by parameterised queries. Storing secrets in client code is never safe, and authentication state must be validated on the server for every request.
For an HTTP question, state the method, the expected status code and one security consequence. That single sentence structure answers most short-answer questions on the topic.