What does a cookie's 'Path' attribute set to '/' mean, and why might using a more specific path be beneficial?
- A.A root path of / means the cookie is sent only to the home page (the root document), while a longer path (e.g., Path=/api/) widens the scope to cover sibling directories of the application in the browser
- B.With Path=/ the cookie is stored in the root folder of the disk (a profile path), with a specific path like /api/ moving the file to a subfolder for all requests to that location in the browser profile on disk
- C.Path=/ means the cookie is sent with all requests to the domain. A more specific path (e.g., Path=/api/) means the cookie is only sent to matching paths, reducing exposure on pages that don't need it
- D.Setting Path=/ blocks the cookie from all requests made by JavaScript (a script restriction), with a path like /api/ restoring script access for those endpoints only in the browser when the page is served from the same host that serves the API
Why C is correct