robertjd
robertjd

Reputation: 4913

Know if HTTP request is from Chrome URL auto-complete?

We have a web application that responds to GET /logout and deletes your session cookies. If you start typing any other URL that beings with /l into the URL bar, Chrome will auto-suggest /logout. When it does this, it makes a request to /logout to pre-fetch the content. The result is that the user is un-expectedly logged out.

How can my HTTP server know if a request is from this pre-fetch behavior?

What I've tried:

Upvotes: 3

Views: 181

Answers (1)

crdumoul
crdumoul

Reputation: 66

Change your logout to use POST instead of GET.

Upvotes: 1

Related Questions