如何通过javascript包含获取网址引用?

编程入门 行业动态 更新时间:2024-10-16 00:18:57
本文介绍了如何通过javascript包含获取网址引用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

如果我在google上搜索某事并单击结果(mytestsite),则该站点的引荐来源将是google搜索的URL.

If I search for something on google and click on a result (mytestsite), the referer to that site will be URL of the google search.

该站点上现在有一个用于跟踪目的的JS文件include ..但是,该JS文件请求的引荐来源是mytestsite ...没有办法让处理JS请求的服务器知道源自Google搜索吗?

Now on that site, there is a JS file include that is used for tracking purposes..however the referrer to that JS file request is mytestsite...is there no way for the server handling the JS request to know that it originated from a google search?

推荐答案

脚本标签将始终引用提供该文档的文档.如果您在服务器上执行特殊操作,则可能需要考虑使用会话或cookie.

A script tag will always refer to the document that is sourcing it. If you're doing something special on the server you might want to consider using a session or cookies.

更多推荐

如何通过javascript包含获取网址引用?

本文发布于:2023-11-28 16:00:23,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1643052.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:网址   javascript

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!