All 42 questions
What happens from entering a URL until the browser displays the page?
Asked in 12 of 201 interviews · last asked Oct 12 · Concept · Senior
Show answer
The browser resolves the hostname through DNS, often using cached results. It opens or reuses a connection; HTTPS uses TLS, over TCP or within QUIC. It sends an HTTP request and receives the server’s response. It parses HTML and CSS, loads resources, runs JavaScript, calculates layout, paints, and combines layers to display the page.
- Cached content can avoid a network request; existing connections can avoid a new connection setup.
- HTTP/1.1 and HTTP/2 use TCP; HTTP/3 uses QUIC over UDP.
- HTML builds the DOM; CSS builds the CSSOM. Together, they guide rendering.
- Scripts can block HTML parsing, and later resource loads or page changes can trigger more rendering.
What the interviewer checks: The interviewer checks whether you can connect networking, HTTP communication, and browser rendering in the correct order.
Common mistake (in 3 of 5 reviewed answers): Many answers forget that the browser sends an HTTP request and receives the server’s response before processing the page.
Other ways it was asked
- “What happens internally when a user clicks a URL in a browser?”
- “When you enter google.com in a web browser and press Enter, what happens next on your PC?”
- “When a user enters a URL in a browser and presses Enter, can you explain the complete end-to-end journey of the request and response, from the user's device until the webpage is displayed, including the technologies and terminology involved?”
What is the difference between local storage and session storage in web browsers?
Asked in 3 of 201 interviews · last asked Oct 22 · Concept · Junior
Show answer
localStorage keeps data across browser sessions, while sessionStorage keeps data for one tab’s session. Both survive page reloads. localStorage has no automatic expiry, but users or the browser can clear it. sessionStorage is normally cleared when its tab closes, though restoring a browser session may restore it.
- Both store string keys and values and are accessed through JavaScript.
- localStorage is shared across tabs with the same origin; sessionStorage is separated by origin and tab.
- Use localStorage for saved preferences and sessionStorage for temporary tab-specific data.
- Unlike cookies, neither is automatically sent with HTTP requests.
What the interviewer checks: The interviewer is checking whether you understand storage lifetime, tab sharing, and when to use each option.
Other ways it was asked
- “What is the difference between cookies, local storage, and session storage in the browser?”
- “What are session storage and local storage, how do they differ, and when is their data cleared?”
Where should an authentication token be stored on the frontend?
Asked in 2 of 201 interviews · last asked Nov 4 · Scenario · Mid-level
Other ways it was asked
- “Where would you store authentication tokens in a frontend application, and how would you manage them?”
How would you persist a user's theme preference, and would you choose localStorage or sessionStorage?
Asked in 2 of 201 interviews · last asked Sep 7 · Scenario · Mid-level
Other ways it was asked
- “How would you persist a user's selected theme when they navigate to another page?”
- “What is localStorage, and when would you use it to persist a user's theme preference?”
- “Should theme details be stored in localStorage or sessionStorage?”
Where would you store a selected team identifier—in a cache or in cookies?
Asked once · last asked Sep 7 · Scenario · Mid-level
Other ways it was asked
- “Where would you store a selected team identifier: in a cache, cookies, or local storage?”
Can a page read the response data of an image loaded from another origin through an `<img>` element?
Asked once · last asked Oct 1 · Concept · Junior
Does an image loaded through an `<img>` element from another origin load, or is it blocked?
Asked once · last asked Oct 1 · Concept · Junior
Other ways it was asked
- “Does an image loaded through an `<img>` element from another origin load without CORS headers, or is it blocked?”
How would you render HTML for a form retrieved from an external API when the API requires a client secret that must not be exposed to the front end?
Asked once · last asked Feb 9 · Scenario · Mid-level
How can you deploy a normal HTML website, such as test.test.com, using Apache on a single-tenant server?
Asked once · last asked Apr 16 · Tooling · Mid-level
How do you ensure browsers load updated CSS and images instead of cached versions?
Asked once · last asked Jun 5 · Scenario · Senior
Other ways it was asked
- “After a deployment, browsers keep loading an old CSS file with the same filename. How can you make users receive the updated styles without manually clearing their cache?”
- “How would you make browsers load an updated image after it has been replaced?”
How do caches and cookies differ in their lifespan, security, and client-side storage?
Asked once · last asked Aug 27 · Concept · Junior
How would you share the selected team between customer and admin panels on different subdomains?
Asked once · last asked Sep 7 · Scenario · Senior
Why do we escape HTML in the email body?
Asked once · last asked Sep 29 · Concept · Junior
What can a page on one subdomain access on another subdomain under the same-origin policy?
Asked once · last asked Oct 1 · Scenario · Mid-level
How does the same-origin policy treat an image loaded from another origin through an `<img>` element?
Asked once · last asked Oct 1 · Concept · Junior
What are HTTP-only cookies and why do you use them? Can they be tampered with?
Asked once · last asked Oct 8 · Concept · Mid-level
How does a browser determine which protocol to use, and does the protocol affect the subsequent request sequence?
Asked once · last asked Oct 12 · Concept · Junior
When you type google.com in Firefox and press Enter, what happens in the background?
Asked once · last asked Oct 13 · Concept · Mid-level
In a web application, how would you decide which data belongs in the URL and where the other screen data should live?
Asked once · last asked Oct 23 · Concept · Mid-level
Why would you check local storage before fetching watch-list information from an API?
Asked once · last asked Oct 26 · Scenario · Mid-level
Other ways it was asked
- “Why did you check local storage first instead of fetching the watch-list information from the API?”
How would you build a simple login page with a backend API?
Asked once · last asked Nov 2 · Design · Mid-level
Let's say I want to pull a custom font or data widget from an external domain. What is CORS policy, and why does the browser enforce it?
Asked once · last asked Nov 4 · Concept · Mid-level
How would you safely integrate third-party widgets or external scripts and prevent them from executing malicious code?
Asked once · last asked Nov 4 · Scenario · Senior
In a browser, how do you use developer tools or built-in browser features to check whether a problem is caused by cached files, cookies, or a blocked request?
Asked once · last asked Nov 9 · Tooling · Mid-level
How do you store information in the browser with JavaScript so it survives a refresh?
Asked once · last asked Nov 10 · Tooling · Mid-level
How do you analyze an API call through DevTools?
Asked once · last asked Nov 10 · Tooling · Mid-level
Can you build a clean, responsive React authentication interface with registration, credential-based login, navigation between pages, and a dashboard accessible only after successful login?
Asked once · last asked Nov 11 · Write code · Junior
Other ways it was asked
- “Can you create a basic user authentication interface using React? Users should be able to register, log in with their credentials, and access the dashboard after a successful login. The application should have proper navigation between pages, and users who are not logged in should not be able to access the dashboard. Please make the interface clean, responsive, and functional.”
What is the difference between a cookie and a session?
Asked once · last asked Nov 17 · Concept · Junior
Where in a backend application are static files served to the client?
Asked once · last asked Nov 18 · Concept · Junior
Where are cookies stored?
Asked once · last asked Feb 23 · Concept · Junior
What’s the difference between client-side and server-side in a web app?
Asked once · last asked Aug 14 · Concept · Junior
What is web browsing, and how does it work?
Asked once · last asked Aug 14 · Concept · Junior
What happens after a browser completes a DNS lookup?
Asked once · last asked Aug 25 · Concept · Mid-level
What is a deep link?
Asked once · last asked Aug 27 · Concept · Junior
What is the difference between a cache and a cookie?
Asked once · last asked Aug 27 · Concept · Junior
Where would you store a generated unique request key on the frontend to prevent duplicate payment submissions?
Asked once · last asked Oct 1 · Scenario · Mid-level
How would you implement a counter that increments on each page refresh without using an external data source?
Asked once · last asked Oct 1 · Scenario · Mid-level
How can built-in browser features be used to reduce the number of requests sent to a server?
Asked once · last asked Oct 6 · Tooling · Mid-level
How do you update static frontend files?
Asked once · last asked Nov 18 · Scenario · Junior
What are static files used for in a web application?
Asked once · last asked Nov 18 · Concept · Junior
What types of static files can a web server serve?
Asked once · last asked Nov 18 · Concept · Junior
How would you approach working within the constraints of a WordPress and Pantheon setup early in your career?
Asked once · last asked Nov 20 · Scenario · Junior
More HTML and CSS interview questions
- All HTML and CSS interview questions
- HTML Basics and Semantic HTML Interview Questions
- CSS Fundamentals Interview Questions
- CSS Layout and Responsive Design Interview Questions
- DOM and Browser API Interview Questions
- Browser Rendering and Web Performance Interview Questions
How this list is made
Every question here was asked by a real interviewer in a real job interview that a candidate ran MeetAssist in. After the call, the interviewer's questions are pulled from the transcript. Practice sessions, tests, exams and anything that was not a job interview are dropped.
Questions are rewritten so they make sense on their own: names of people, employers and clients are removed, and speech-to-text mistakes are fixed. Small talk, logistics and questions about one candidate's own résumé are left out. Rephrasings of the same question are merged, and the count is the number of different interviews it came up in.
The interviews come from candidates who use MeetAssist, so they lean towards software, data and AI roles: the shares describe these interviews, not every HTML and CSS interview. Answers to the most asked questions are written and checked by an editor; a "common mistake" is shown only when reviews of real answers in these interviews show it, with the count.
201 interviews, 154 candidates, Oct 2025 to Nov 2026. Updated every month with new interviews.
Or add the Chrome extension