The CSS Box Model is a design and layout concept that consists of content, padding, border, and margin, defining the space around and within an HTML element.
Save For Revision
Save For Revision
Bookmark this item, mark it difficult, or place it in a revision set.
Explain the difference between 'localStorage' and 'sessionStorage'.
'localStorage' persists even when the browser is closed and reopened, while 'sessionStorage' data is only available for the duration of the page session.
Save For Revision
Save For Revision
Bookmark this item, mark it difficult, or place it in a revision set.
What is the 'event.preventDefault()' method in JavaScript used for?
'event.preventDefault()' is used to prevent the default behavior associated with an event, such as preventing a form submission or a link from navigating.
Explain the concept of CORS (Cross-Origin Resource Sharing).
CORS is a security feature implemented by web browsers to restrict web pages from making requests to a different domain than the one that served the web page.
Save For Revision
Save For Revision
Bookmark this item, mark it difficult, or place it in a revision set.
What is the purpose of the 'async' and 'await' keywords in JavaScript?
The 'async' keyword is used to declare an asynchronous function, and 'await' is used to pause the execution of the function until the Promise is settled.
Example:
async function fetchData() { let response = await fetch('https://api.example.com/data'); let data = await response.json(); console.log(data); }
Save For Revision
Save For Revision
Bookmark this item, mark it difficult, or place it in a revision set.
How does the 'localStorage' differ from 'sessionStorage' in HTML5?
'localStorage' persists even when the browser is closed and reopened, while 'sessionStorage' data is only available for the duration of the page session.
Save For Revision
Save For Revision
Bookmark this item, mark it difficult, or place it in a revision set.
Hoisting is a JavaScript behavior where variable and function declarations are moved to the top of their containing scope during the compilation phase.
Example:
console.log(x); // undefined var x = 5;
Save For Revision
Save For Revision
Bookmark this item, mark it difficult, or place it in a revision set.
Explain the 'same-origin policy' in the context of web security.
The 'same-origin policy' is a security measure that restricts web pages from making requests to a different domain than the one that served the web page.
Save For Revision
Save For Revision
Bookmark this item, mark it difficult, or place it in a revision set.
Explain the concept of 'Progressive Enhancement' in web development.
Progressive Enhancement is a strategy where the core functionality and content are delivered to all users, with enhanced features provided to those with modern browsers or devices.
Save For Revision
Save For Revision
Bookmark this item, mark it difficult, or place it in a revision set.
What is the purpose of the 'V8' engine in the context of JavaScript?
The 'V8' engine is an open-source JavaScript engine developed by Google, used in Chrome and Node.js, responsible for executing JavaScript code in the browser or server environment.
Save For Revision
Save For Revision
Bookmark this item, mark it difficult, or place it in a revision set.
Explain the purpose of the 'SQL JOIN' operation in database queries.
The 'SQL JOIN' operation combines rows from two or more tables based on a related column, allowing the retrieval of data from multiple tables in a single query.
Example:
SELECT users.username, orders.order_id FROM users JOIN orders ON users.user_id = orders.user_id;
Save For Revision
Save For Revision
Bookmark this item, mark it difficult, or place it in a revision set.
AJAX (Asynchronous JavaScript and XML) allows web pages to be updated asynchronously by exchanging small amounts of data with the server behind the scenes.
Example:
var xhr = new XMLHttpRequest(); xhr.open('GET', 'https://api.example.com/data', true); xhr.onreadystatechange = function() { if (xhr.readyState == 4 && xhr.status == 200) { console.log(xhr.responseText); } }; xhr.send();
Save For Revision
Save For Revision
Bookmark this item, mark it difficult, or place it in a revision set.
Explain the concept of 'WebSockets' and how they differ from HTTP.
WebSockets provide a full-duplex communication channel over a single, long-lived connection, enabling real-time communication between the client and server, unlike the request-response nature of HTTP.
Save For Revision
Save For Revision
Bookmark this item, mark it difficult, or place it in a revision set.
Explain the concept of 'Cross-site Scripting (XSS)' and how to prevent it.
XSS is a security vulnerability where attackers inject malicious scripts into web pages. To prevent it, developers should sanitize user input, use proper encoding, and implement Content Security Policy (CSP).
Save For Revision
Save For Revision
Bookmark this item, mark it difficult, or place it in a revision set.
What is the purpose of the 'SQL Injection' attack and how can it be prevented?
SQL Injection is an attack where malicious SQL statements are inserted into user inputs, leading to unauthorized access or data manipulation. Prevention involves using parameterized queries and input validation.
Save For Revision
Save For Revision
Bookmark this item, mark it difficult, or place it in a revision set.
Explain the concept of 'Cross-Origin Embedder Policy' (COEP) in web security.
COEP is a security policy that controls whether a document can be embedded in another document across different origins, enhancing security by preventing unauthorized embedding.
Save For Revision
Save For Revision
Bookmark this item, mark it difficult, or place it in a revision set.
Explain the concept of 'Debouncing' in JavaScript.
Debouncing is a technique used to ensure that time-consuming tasks do not fire so often, making it more efficient for tasks like handling input events.
Example:
function debounce(func, delay) { let timeoutId; return function() { clearTimeout(timeoutId); timeoutId = setTimeout(() => func.apply(this, arguments), delay); }; }
Save For Revision
Save For Revision
Bookmark this item, mark it difficult, or place it in a revision set.
WithoutBook uses cookies and similar technologies for site functionality, analytics, and advertising. We may work with partners such as Google to show relevant ads and measure performance. By continuing, you can accept or decline non-essential cookies. Read our Privacy Policy for more information. Privacy Policy.