The implementation uses the shared 'database' of known referers found in [
$ npm install referer-parser
Create a new instance of a Referer object by passing in the url you want to parse:
var Referer =referer_url = ''var r = referer_url
r variable now holds a Referer instance. The important attributes are:
console // trueconsole // 'Google'console // 'search'console // 'q'console // 'gateway oracle cards denise linn'console // result of require('url').parse(...)
Optionally, pass in the current URL as well, to handle internal referers
var Referer =var referer_url = ''var current_url = ''var r =
The attributes would be
console // trueconsole // nullconsole // 'internal'console // nullconsole // nullconsole // result of require('url').parse(...)
Licensed under the [Apache License, Version 2.0] license (the "License"); you may not use this software except in compliance with the License.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.