ASP
ASP usually refers to server-side web programming: a server runs code, creates a response, and sends HTML or data to the browser.
What you will learn
- How browser-side and server-side code divide responsibilities
- What happens between a request and a response
- Why input validation and output escaping belong on the server too
Browser and server
HTML, CSS, and browser JavaScript run on the user's device. Server-side code runs on a server and can access databases, authenticate users, and create a response before it reaches the browser.
Browser -- request --> Server
Browser <-- HTML or JSON -- ServerA typical flow
- The browser sends a request such as
GET /articles. - The server checks the request and obtains the required data.
- Server-side code builds HTML or JSON.
- The browser receives the response and renders or uses it.
Security basics
- Validate input on the server even when the browser already validates it.
- Escape output for its destination, such as HTML, an attribute, or SQL parameters.
- Do not place secrets or database credentials in browser JavaScript.
ASP is a broad idea rather than one single language. The same request-and-response model applies to many server-side technologies.