Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
アドレス バーにページ アドレスを入力したクライアントを識別する方法はありますか。 リクエストを送信する前に、この情報が必要です。 おそらくイベントでonbeforeunload
onbeforeunload
ナビゲーションがページ内の何か (リンクのクリックなど) によって引き起こされる場合を除いて、ユーザーがどこに移動したかを前のページが見つける方法はありません。
可能であれば、深刻なプライバシー侵害を許してしまうでしょう。
document.locationJavascript では、(var URLstring = document.location;たとえば)から完全な URL を取得できるはずです。
document.location
var URLstring = document.location;