participant Backend
participant Frontend
Frontend->Backend: request /
Backend->Frontend: HTML
Note right of Frontend: Execute Javascript...
HTML
CSS
Javascript
2-multi-file
participant Backend
participant Frontend
Frontend->Backend: request /index1
Backend->Frontend: HTML
Note right of Frontend: Page1 done
Frontend->Backend: request /index2
Backend->Frontend: HTML
Note right of Frontend: Parse HTML
Frontend->Backend: request /static/style.css
Backend->Frontend: CSS File
Frontend->Backend: request /static/index.js
Backend->Frontend: JS File
Note right of Frontend: Execute Javascript...
HTML 是如何实现登陆的
participant Backend
participant Frontend
Frontend->Backend: request /login
Backend->Frontend: HTML
Frontend->Backend: POST /login (userA with password)
Note left of Backend: Check with DB
Note left of Backend: Save in session: abcd -> userA
Backend->Frontend: HTML with Header Set-Cookies 'abcd'
Note right of Frontend: Login Success
Frontend->Backend: request /secret with Header Cookies: abcd
Note left of Backend: Check in session: abcd
Backend->Frontend: Secret data