educational

Surfer Redirection Using JavaScript

Using JavaScript to redirect visitors to your site to pages that are optimized for them has many benefits, and enables you to provide the most enhanced surfing experience possible. Here are a few of the scripts that I employ to make this process possible:

JavaScript Redirect
This code allows you to automatically redirect JavaScript enabled browsers to one page, while displaying a text link and / or message to non-JavaScript enabled browsers. This is especially useful if you (as I do) like to employ "gee-whiz" JS-based nav systems, or even a mundane "drop-down" box navigation, since you can easily filter non-JS users to your pages that use text-link or graphical button "only" based nav system:

<SCRIPT LANGUAGE="JavaScript">
<!-- JavaScript Redirect
window.location="https://www.yoursite.com/js_url.html";
// JavaScript Redirect -->
</SCRIPT>
<NOSCRIPT>
Your browser either does not support JavaScript, or you have it disabled. Click <A href="https://www.yoursite.com/no-js_url.html">Here</A> to Continue.
</NOSCRIPT>

Browser Redirect
If you build different pages for MS Internet Explorer and Netscape Navigator, you can use this script to send visitors to the correct browser-optimized page. While I do not personally build entire sites tailored for a specific browser, I will tailor the navigational components of a frames-based site to enable the "happiness" that the use of MSIE allows, for example, sending surfers to either "frameset-ie.shtml" or "frameset-ns.shtml" as the case may be:

<SCRIPT LANGUAGE="JavaScript">
<!-- Browser Redirect
if (navigator.appName.indexOf("Explorer") != -1){
window.location = "https://www.yoursite.com/ie_url.html";}
if (navigator.appName.indexOf("Netscape") != -1){
window.location = "https://www.yoursite.com/ns_url.html";}
// Browser Redirect -->
</SCRIPT>

Screen Resolution Redirect
This lets you redirect your visitors with 640x480 displays to one page, 800x600 to another, etc. Just as I do not (really) build different sites for different browsers, I do not (really) build different sites for different screen resoultions – but I may build sites that will be encapsulated into a new frameset if the user has a high screen resolution. This lets me use better navigation, and provides increased advertising opportunities. Here's the script:

<SCRIPT LANGUAGE="JavaScript">
<!-- Screen Resolution Redirect
if ((navigator.appVersion.indexOf("4.") != -1) && (navigator.appName.indexOf("Netscape") != -1) || (navigator.appVersion.indexOf("4.") != -1) && (navigator.appName.indexOf("Explorer") != -1)){ size = screen.width + "x" + screen.height; if (size == "640x480"){ top.location = "https://www.yoursite.com/640x480.html"; } }
// Screen Resolution Redirect -->
</SCRIPT>

As you can see, there are many benefits to redirecting surfers to pages tailored specifically for them, and using a few simple JavaScripts – rather than making them select options through a series of text links, is the way to go. Try a few of these out on your site, and stay tuned for more!

Copyright © 2025 Adnet Media. All Rights Reserved. XBIZ is a trademark of Adnet Media.
Reproduction in whole or in part in any form or medium without express written permission is prohibited.

More Articles

profile

WIA Profile: Leah Koons

If you’ve been to an industry event lately, odds are you’ve heard Leah Koons even before you’ve seen her. As Fansly’s director of marketing, Koons helps steer one of the fastest-growing creator platforms on the web.

Women in Adult ·
opinion

What France's New Law Means for Age Verification Worldwide

When France implemented its Security and Regulation of the Digital Space (SREN) law on April 11, it marked a pivotal moment in the ongoing global debate surrounding online safety and access to adult content.

Corey D. Silverstein ·
opinion

From Tariffs to Trends: Staying Resilient in a Shaky Online Adult Market

Whenever I check in with clients these days, I encounter the same concerns. For many, business has not quite bounced back after the typical post-holiday-season slowdown. Instead, consumers have been holding back due to the economic uncertainty around the Trump administration’s new tariffs and their impact on prices.

Cathy Beardsley ·
opinion

Optimizing Payment Strategies for High Ticket Sales

Payment processing for more expensive items, such as those exceeding $1,000 per order, can create unique challenges. For adult businesses, those challenges are magnified. Increased fraud risk, elevated chargeback ratios and heavier scrutiny from banks and processors are only the beginning.

Jonathan Corona ·
profile

WIA Profile: Lexi Morin

Lexi Morin’s journey into the adult industry began with a Craigslist ad and a leap of faith. In 2011, fresh-faced and ambitious, she was scrolling through job ads on Craigslist when she stumbled upon a listing for an assistant makeup artist.

Women In Adult ·
profile

Still Rocking: The Hun Celebrates 30 Years in the Game

In the ever-changing landscape of adult entertainment, The Hun’s Yellow Pages stands out for its endurance. As one of the internet’s original fixtures, literally nearly as old as the web itself, The Hun has functioned as a living archive for online adult content, quietly maintaining its relevance with an interface that feels more nostalgic than flashy.

Jackie Backman ·
opinion

Digital Desires: AI's Emerging Role in Adult Entertainment

The adult industry has always been ahead of the curve when it comes to embracing new technology. From the early days of dial-up internet and grainy video clips to today’s polished social media platforms and streaming services, our industry has never been afraid to innovate. But now, artificial intelligence (AI) is shaking things up in ways that are exciting but also daunting.

Steve Lightspeed ·
opinion

More Than Money: Why Donating Time Matters for Nonprofits

The adult industry faces constant legal battles, societal stigma and workplace challenges. Fortunately, a number of nonprofit organizations work tirelessly to protect the rights and well-being of adult performers, producers and industry workers. When folks in the industry think about supporting these groups, donating money is naturally the first solution that comes to mind.

Corey D. Silverstein ·
opinion

Consent Guardrails: How to Protect Your Content Platform

The adult industry takes a strong and definite stance against the creation or publication of nonconsensual materials. Adult industry creators, producers, processors, banks and hosts all share a vested interest in ensuring that the recording and publication of sexually explicit content is supported by informed consent.

Lawrence G. Walters ·
opinion

Payment Systems: Facilitator vs. Gateway Explained

Understanding and selecting the right payment platform can be confusing for anyone. Recently, Segpay launched its payment gateway. Since then, we’ve received numerous questions about the difference between a payment facilitator and a payment gateway. Most merchants want to know which type of platform best meets their business needs.

Cathy Beardsley ·
Show More