Skip to main content
miji.be

Clickjacking

An attack that tricks users into clicking on hidden elements by overlaying transparent frames on top of legitimate web pages.

May 1, 2026 / About 1 min read

Security

Clickjacking is a web security attack where a malicious page tricks users into clicking on something different from what they perceive. The attacker loads the target page in a transparent iframe overlaid on their own page, positioning it so that the user's click on a visible element actually triggers an action on the hidden target page.

For example, an attacker might overlay a transparent "Delete Account" button from a banking site on top of a "Play Video" button on their page. When the user clicks to play the video, they unknowingly click the delete button on the banking site. The attack exploits the trust users place in the visual appearance of the page they are viewing.

The primary defense against clickjacking is the X-Frame-Options HTTP header or the frame-ancestors directive in Content Security Policy. These headers tell browsers whether the page is allowed to be loaded in an iframe, and if so, from which origins.

For URL shortening services, clickjacking protection is important for the management dashboard and any page where users perform sensitive actions like creating, editing, or deleting links. The redirect endpoints themselves are less vulnerable because they do not contain interactive elements.

Was this article helpful?

Related Terms

CSP

Content Security Policy - an HTTP header that controls which resources a browser is allowed to load for a given page.

XSS

Short for Cross-Site Scripting. An attack technique that injects malicious scripts into web pages to steal users' information.

X-Frame-Options

An HTTP response header that controls whether a browser should allow a page to be displayed in an iframe.

Event Tracking

A method of measuring user interactions that do not involve page transitions, such as button clicks, video plays, and file downloads.

Zero-Click Search

A search behavior in which the answer is displayed directly on the results page, so the user never clicks through to any website. Caused by featured snippets and knowledge panels.

Prerendering

An optimization technique that fully renders a page in the background before the user clicks a link, making the subsequent navigation appear instant.

Related Articles

Short URL Security - Phishing Risks, Safe Sharing Practices, and Protection Guide

A comprehensive guide to short URL security. Understand phishing risks, malware distribution via shortened links, and best practices for safe sharing.

Short URL Phishing - How to Spot Scams and Protect Yourself from Malicious Links

Learn to identify phishing attacks that use short URLs. Covers 5 common scam patterns, URL preview tools, and practical defense strategies.

Click Fraud Prevention: Protect Short URLs from Bots

Understand click fraud tactics and learn how to defend your short URLs. Covers bot detection, rate limiting, CAPTCHA strategies, and anomaly detection.

FAQ

How does a clickjacking attack work?
Attackers overlay a transparent iframe of a legitimate site, tricking users into clicking invisible buttons. Social media 'like' buttons and settings toggles are common targets.
How can I prevent clickjacking?
Set the X-Frame-Options header to DENY or SAMEORIGIN, or use the CSP frame-ancestors directive to restrict iframe embedding.

Put the terms to work

Shorten a URL for Free