• Stars
    star
    129
  • Rank 279,262 (Top 6 %)
  • Language
    CoffeeScript
  • License
    Other
  • Created over 13 years ago
  • Updated over 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Cross-browser support for HTML5's noreferrer link type.

noreferrer.js

Cross-browser support for HTML5's noreferrer link type.

HTML5 defines a new link type called "noreferrer" which may be used to annotate a hyperlink to indicate that a Referer (sic) header should not be sent when following the link.

This is particularly useful when you want to put hyperlinks to external resources on your private site which URL should not be leaked.

At the time of writing, WebKit-based browsers such as Safari, MobileSafari, Chrome and Opera 15+ already support this feature but IE, Firefox and Opera 12- do not.

This package contains two variants of JavaScript implementations that add the "noreferrer" link type to those browsers without native support.

Requirements

  • noreferrer.js depends on:

    • prototype.js 1.6 or later
  • jquery.noreferrer.js depends on:

    • jQuery 1.2 or later

Compatibility

  • Chrome, Safari, MobileSafari, Opera 15+ and other WebKit-based browsers

    These have native support for noreferrer links, so noreferrer.js does nothing.

  • IE 6+

    noreferrer.js uses a simple meta refresh technique to suppress Referer, plus disables opening a new window with middle clicking.

  • Opera 12-

    There seems to be no way to prevent the browser from sending a Referer header, so noreferrer.js replaces all noreferrer links with those using Google's redirector.

  • Firefox and other browsers

    noreferrer.js uses a data URI technique to suppress Referer, plus disables opening a new window with middle clicking.

Usage

Just include either noreferrer.js or jquery.noreferrer.js, depending on the JavaScript framework you are using, at the end of the part of an HTML document, and an onload event handler is attached to enable the noreferrer trick for each link with the noreferrer rel type.

<script type='text/javascript' src='noreferrer.js'></script>

It does not deal with dynamically created links at the moment.

History

  • v0.1.3

    • Bundled jquery.noreferrer.js.

    • Make small optimizations.

Author

Akinori MUSHA <[email protected]>

License

All files except for ones under "vendor" are licensed under a 2-clause BSD license.

See LICENSE for the copyright information and license terms.

More Repositories

1

elscreen

elscreen patched to work with recent Emacs
Emacs Lisp
168
star
2

postgresql-plruby

PL/Ruby procedural language for the PostgreSQL database system by Guy Decoux
C
110
star
3

ruby-domain_name

Domain Name manipulation library for Ruby
Ruby
95
star
4

ruby-unf

A wrapper library to bring Unicode Normalization Form support to Ruby/JRuby
Ruby
75
star
5

zsh-git-escape-magic

zle tweak for git command line arguments
68
star
6

Knu.spoon

A Spoon package of my Hammerspoon modules, mainly for keyboard customization
Lua
51
star
7

zsh-manydots-magic

manydots-magic - zle tweak for emulating `...'==`../..' etc.
Shell
39
star
8

ruby-unf_ext

Unicode Normalization Form support library for CRuby
Hack
32
star
9

e

e - a smart wrapper for $EDITOR
Shell
29
star
10

ruby-mmap

Ruby bindings for Unix mmap(2) by Guy Decoux
C
25
star
11

git-merge-structure-sql

git merge driver for db/structure.sql of Rails projects
Ruby
24
star
12

mc-extras.el

Extra functions for multiple-cursors mode
Emacs Lisp
24
star
13

webrobots

A Ruby library to help write robots.txt compliant web robots
Ruby
24
star
14

easy-kill-extras.el

Extra functions for easy-kill/easy-mark.
Emacs Lisp
23
star
15

emacsc

Emacs as a command line tool
Perl
18
star
16

ruby-friendfeed

A Ruby library to provide access to FriendFeed API's
Ruby
17
star
17

rsdl

The interpreter wrapper for Ruby/SDL (written by kumaryu)
Ruby
14
star
18

imedic-shogi

Shogi terminology dictionary for Japanese input method editors
13
star
19

ruby-bdb

Ruby bindings for Sleepycat Berkeley DB and DB XML by Guy Decoux
C
13
star
20

sorted_set

SortedSet for Ruby
Ruby
13
star
21

operate-on-number.el

Operate on number at point with arithmetic functions
Emacs Lisp
13
star
22

kakasi_ffi

A Ruby binding for KAKASI implemented with FFI
Ruby
12
star
23

di

A wrapper around GNU diff(1)
Ruby
10
star
24

phi-search-mc.el

Multiple-cursors extension for phi-search
Emacs Lisp
10
star
25

FDclone

A clone of FD (File & Directory tool) by T.Shirai
C
10
star
26

yaml-imenu.el

Enhancement for the imenu support in yaml-mode
Emacs Lisp
8
star
27

dired-fdclone.el

dired functions and settings to mimic FDclone
Emacs Lisp
8
star
28

ruby-digest-tiger

Modules related to message digesting algorithms that conform to the standard Digest API (ext/digest)
C
7
star
29

zfs-snapshot-clean

A tool to sieve ZFS snapshots as per given spec a la `pdumpfs-clean'
Shell
7
star
30

inplace

A command line utility that edits files in-place through given filter commands
Ruby
6
star
31

replace-with-inflections.el

Provides query-replace-names-with-inflections
Emacs Lisp
6
star
32

g

g, f - stress-free wrapper around grep(1) and find(1)
Shell
6
star
33

imedic-mahjong

Mahjong terminology dictionary for Japanese input method editors
5
star
34

github-sync

A simple script to check out all of your projects on GitHub under your local directory (${GITHUB_DIR-$HOME/src/github}).
Ruby
5
star
35

sidetiq-timezone

Time zone for Sidetiq
Ruby
5
star
36

fuse-convmvfs

A userland file system to convert filename charset, by ZC Miao
HTML
5
star
37

sh-functions

A place to put utility functions for shell scripting
Shell
4
star
38

shell-toggle.el

Toggle to and from the *shell* buffer
Emacs Lisp
4
star
39

bcbiff

bcbiff(1) - Boxcar based IMAP biff
Ruby
4
star
40

stow-utils

Complementary utilities for GNU stow (http://www.gnu.org/software/stow/)
4
star
41

plum

An IRC proxy with plug-in architecture, Japanese encodings and UTF-8 support, IPv6, etc. written in legacy perl
4
star
42

ruby-perlstorable

A Ruby module that emulates deserialization of Perl's Storable module
Ruby
4
star
43

ruby-qrencode

Ruby bindings for libqrencode, a QR code encoder library
C
3
star
44

ruby-bdb1

Ruby bindings for Berkeley DB 1.8x by Guy Decoux
C
3
star
45

ical_events

A programmer-friendly frontend for Ali Rantakari's amazing icalBuddy
Ruby
3
star
46

zsh-shell-word-at-point

zle function to get a shell word at point
Shell
3
star
47

zsh-easy-vcs-status

A zle tweak for easy access to VCS status
Shell
3
star
48

p

p - a lazy wrapper for $PAGER
Shell
3
star
49

imerge

a shell script that helps merge one file to another interactively
Shell
3
star
50

tmux-open-anything

Shell
2
star
51

azik

AZIK入力
2
star
52

vc-svk.el

vc-svk.el fixed/updated for Emacs trunk
Emacs Lisp
2
star
53

lookup.el

lookup.el cvsimported from :pserver:[email protected]:/cvsroot/lookup and modified for recent Emacs
Emacs Lisp
2
star
54

prom-wl.el

Prom-WL (Procmail reader for Wanderlust) - fixed for recent Emacs and Wanderlust
Emacs Lisp
2
star
55

screen

GNU screen with some patches applied
C
2
star
56

netatalk

Netatalk Sourceforge mirror providing advanced github code inspection tools
C
2
star
57

ruby-bz2

Ruby bindings for libbzip2 by Guy Decoux
C
2
star
58

wp-syntax-download-extension

This plug-in makes WP-Syntax highlighted code snippets downloadable from nice captions.
PHP
2
star
59

poly-ruby.el

Provides poly-ruby-mode for Emacs
Emacs Lisp
2
star
60

sup

do <whatever SCM> update
Shell
2
star
61

minibuffer-complete-cycle

Cycle through the *Completions* buffer
Emacs Lisp
2
star
62

libchk

libchk(1) -- a tool to check shared library links (only FreeBSD is supported for the moment)
Ruby
1
star
63

kippu_problem

Kippu Problem - Make four digits equal to 10 by only using four arithmetic operations and parentheses
Ruby
1
star
64

ruby-digest-whirlpool

Ruby interface to the Whirlpool message digest algorithm
C++
1
star
65

atok-google_suggest

A Google Suggest plug-in for ATOK Direct.
Ruby
1
star
66

jsonapi-example

Ruby
1
star
67

rubigame

RubiGame is a clone of a famous puzzle game
Ruby
1
star
68

docset-presto

Presto DB Docset builder for Dash.app
Ruby
1
star
69

zsh-delsel-mode

delsel-mode (delete-selection-mode) for zsh
Shell
1
star
70

docset-trino

Presto Docset builder for Dash.app
Ruby
1
star
71

yoursearch

Build OpenSearch plugins your way
Ruby
1
star