Possible Duplicate:
Client-side detection of HTTP request method
I'm working on Javascript that is injected on any page. The script is injected on servers that I'm not controlling. (Injection is done with an add-on or bookmarklet.)
The Javascript needs to know whether the page was loaded as the result of an HTTP GET or POST. The reason for this is that if the page was loaded with a GET, the URL is an identifier for the page that can be bookmarked, shared with others, etc. In case of a POST, I need to handle it differently.
Can this be done? I have found no way of accessing the request from Javascript, but perhaps there is some trick that I don't know of.