Mark Ku's Blog

Front-end-interview

Opening

  • Please introduce yourself from a technical perspective — walk me through what you've worked on over the past few years. Keep it within five minutes.

Warm-up

  • Interviewer self-introduction: role overview, responsibilities, and what we're looking for in this position
  • Ask the candidate to highlight relevant experience based on what was just described
  • What was your role at your last job? Can you walk me through a project you're most proud of?
  • What are your expectations? What's the one thing you most want to learn this year?
  • Have you been following any new technologies lately? Any takeaways? Have you tried them out? Any open-source work to share?
  • Do you enjoy writing code? What aspect of coding do you find most interesting?
  • Whiteboard: write a string reversal function
  • What did you learn from your previous job?
  • Have you been reading any programming-related books recently?

What to observe

  • Attitude
  • Genuine interest in front-end development
  • Willingness to learn new things
  • Culture and communication fit with the team
  • Whether foundational skills are solid enough

Technical Questions (target: 2+ years of experience)

  • After a user logs in on one page, how does the next page know they're authenticated?
  • Where do you typically store frequently used user data?

Performance

  • Have you implemented caching before? When should caching be used?
  • How do you optimize a website's static assets? How do you bundle them — into how many files, and how do you decide? How do you debug after bundling?
  • If a static file is cached and a new version is released, how do you force an update? Version numbers in filenames? Any other approaches?
  • Have you used a CDN before?
  • Walk me through a few techniques you've used to speed up page load times.
  • An article-listing website needs to frequently query 50+ posts for the homepage — how would you handle that?
  • Have you ever dealt with complaints about slow page loading? What was the situation and how did you resolve it? Where do you look first?
  • You have around 500 records to display paginated on a web page — how would you approach it? What about 50,000 records?
  • When do you populate an in-memory cache? If it sacrifices startup time and slows down development, how do you handle that?
  • When there are multiple application servers, how do you handle caching? If the cache lives in a database, who is responsible for updating it?
  • Have you ever encountered slow database queries in production? How would you investigate? How do you determine whether the bottleneck is network, query, or something else?

SEO

  • How does fetching data via Ajax affect SEO?
  • What are the key factors in SEO? What optimizations have you implemented? What tools have you used?
    Meta tags, keywords, title, responsive design, content quality, server-side rendering, routing, URL rewrite, canonical URL, user experience, robots.txt
  • When a site is under maintenance, crawlers may still visit — how do you handle that?

Testing

  • What languages/frameworks have you written tests in?
  • If the function you're testing calls updateDB, how do you handle that in your test?
  • What is TDD? Does it make a practical difference compared to writing tests after the code?
  • Have you used any design patterns specifically to support TDD?
  • What about BDD?
  • What end-to-end testing tools have you used?

Data Analysis

  • What is the purpose of using GA? Have you collected custom events with GA? How?
  • Have you used the ELK Stack?

Design

  • If you needed to log the input and output of every request, how would you implement that?
  • When would you use an interface?

DevOps

  • What is DevOps?
  • Have you used any CI/CD tools? What are the benefits?
  • Have you used cloud services? What are the advantages?

Debugging

  • If a user's order data disappeared on the frontend, where would you start looking?
  • How would you query logs across 10 servers?

Advanced

  • Three clients — a website, a mobile browser, and a mobile app — all consume the same API. The mobile app gets a new version that requires a different data format for one field. How do you handle this without breaking the others?
  • Have you built a real-time application? If a backend service needs to push a message to a specific user, Andy, how would you route it? How do you know which connection ID maps to Andy? If the mapping is stored per-server and there are multiple servers, how do you resolve the mapping?

Coding

JavaScript

  • What is the difference between placing <script> in the <head> vs. at the end of <body>? What about <link rel="stylesheet">?
  • What is the difference between <script async> and <script defer>?
  • Implement: duplicate([1,2,3,4,5]) → result: [1,2,3,4,5,1,2,3,4,5]
  • == vs. ===
  • How do you make a cross-origin AJAX request from client A to domain B?
  • Explain closures
  • Front-end frameworks: React — state vs. props; Angular — directives
  • Node.js / Express: how does Express handle errors, requests, responses, and next?
  • Deferred / Promise: what are resolve and reject? Where have you used Promises?
  • Explain JavaScript hoisting
  • Primitive types vs. reference types
  • List the differences between regular functions and arrow functions
  • Walk me through what happens when you type "google.com" into the browser address bar and press Enter
  • Why is setInterval not precise with timing?
  • What is the difference between var and let?

CSS

  • ID selectors vs. class selectors
  • How do you debug CSS issues?
  • Which CSS frameworks have you used?
  • How does responsive web design (RWD) work?
  • CSS sprites
  • Icon fonts
  • List and describe the CSS display property values you know

Vue

  • What is your understanding of single-page applications (SPA)? What are their advantages and disadvantages?
  • What is the difference between v-show and v-if?
  • How do you dynamically bind class and style?
  • What is the difference between computed and watch? When would you use each?
  • How do you understand the Vue component lifecycle?
  • What are the different ways components can communicate in Vue?
  • How do you implement inheritance in Vue?
  • What is the difference between Vue.extend and mixins?
  • If a Vue observed object is mutated but the view doesn't update, what would you do?

Reference

https://github.com/h5bp/Front-end-Developer-Interview-Questions https://github.com/Asing1001/front-end-interview https://juejin.cn/post/6844903918753808398

Author

Mark Ku

擁有 10+ 年經驗的資深軟體工程師,現為 AI 應用 Builder,專注於大型平台架構與簡化複雜系統設計,從電商系統到訂閱與收費平台,結合 AI Agent、AI 整合與自動化開發,打造高效率且可持續演進的產品技術基礎。Read More

Found this useful?

The author's free tools, daily podcasts and newsletter are all here.

Mark Ku · This article is licensed under CC BY 4.0. Credit the author and link back to the original when reusing it.

Comments

Subscribe to Newsletter

Subscribe to get new posts delivered instantly — never miss a tech share.

By submitting, you agree to receive emails. You can anytime.

Popular Posts

View all
Mark Ku
··599

Oracle Cloud Always Free Tier: Linux Host and Static IP for a $0 Cloud Solution

Oracle Cloud Always Free Tier: Linux Host and Static IP for a $0 Cloud Solution
Mark Ku
··493

Say Goodbye to Postman's Fee Trap! A Hands-on Guide to Bruno, the Open-Source Git-Native API Testing Powerhouse.

Say Goodbye to Postman's Fee Trap! A Hands-on Guide to Bruno, the Open-Source Git-Native API Testing Powerhouse.
Mark Ku
··333

A Free, Open-Source, Notion-like Knowledge Base — A Complete Guide to Deploying and Backing Up Outline Wiki

A Free, Open-Source, Notion-like Knowledge Base — A Complete Guide to Deploying and Backing Up Outline Wiki
Mark Ku
··271

Training Your Own AI Voice: Hardware Requirements, Open-Source Model Comparison, and LoRA Fine-Tuning

Training Your Own AI Voice: Hardware Requirements, Open-Source Model Comparison, and LoRA Fine-Tuning
Mark Ku
··222

Setting Up Samba on Ubuntu to Share Folders with Windows 11

Setting Up Samba on Ubuntu to Share Folders with Windows 11
Mark Ku
··217

Building an Efficient API Management Platform: Deploying Kong Gateway from Scratch - Part 1

Building an Efficient API Management Platform: Deploying Kong Gateway from Scratch - Part 1
面試官筆記 - 1 - Mark Ku's Tech Notes