Custom Captive Portal: HTML आणि CSS मार्गदर्शक
हे अधिकृत तांत्रिक संदर्भ मार्गदर्शक कस्टम Captive Portal लँडिंग पेज डिझाइन आणि कोड करण्यासाठी आवश्यक असलेले डेव्हलपमेंट मानके, CSS आर्किटेक्चर आणि नेटवर्क-स्तरीय मर्यादांची रूपरेषा स्पष्ट करते. हे फ्रंटएंड डेव्हलपर्स आणि नेटवर्क आर्किटेक्ट्सना Apple CNA आणि Android वेबव्ह्यू वातावरणात यशस्वीरित्या काम करण्यासाठी व्यावहारिक धोरणे प्रदान करते, ज्यामुळे पिक्सेल-परफेक्ट, सुसंगत आणि अत्यंत कार्यक्षम अतिथी WiFi अनुभवांची खात्री मिळते.
हे मार्गदर्शक ऐका
पॉडकास्ट ट्रान्सक्रिप्ट पहा
📚 Part of our core series: Captive Portals चे अंतिम मार्गदर्शक →
- Executive Summary
- Technical Deep-Dive
- The Captive Portal Lifecycle
- Platform-Specific Mini-Browser Constraints
- Coding Around the Apple CNA "Done" Button Trap
- Implementation Guide
- The Golden Rule: Design for Zero Internet Connectivity
- 1. Viewport Configuration
- 2. Inlining CSS and Removing External Dependencies

Executive Summary
For enterprise venues—ranging from luxury hotels Hospitality and retail chains Retail to transit hubs Transport and modern medical campuses Healthcare —the guest WiFi splash page is the digital front door. However, over 90% of guest WiFi logins occur on mobile devices, where rendering is governed not by standard browsers like Safari or Chrome, but by highly restricted Captive Network Assistant (CNA) webviews [1]. These "mini-browsers" enforce severe sandbox limitations: they block external CDNs, disable persistent cookies, ignore external web fonts, and severely restrict JavaScript execution to mitigate security risks and prevent session hijacking [2].
When a developer designs a splash page using traditional web standards, these constraints result in broken layouts, missing brand assets, and non-functional login buttons, directly impacting customer satisfaction and digital engagement. This guide provides solutions to these challenges, presenting defensive coding practices—such as inline CSS, Base64 asset encoding, system font stacks, and explicit navigation-driven authentication handshakes—to ensure seamless cross-platform rendering. Furthermore, we examine how utilising a managed solution like Purple's portal builder allows developers to maintain complete HTML/CSS creative control while offloading RADIUS authentication, database scaling, GDPR/PCI compliance, and multi-vendor AP integrations [3].
Technical Deep-Dive
To build a resilient custom captive portal, developers must understand the network-level interception and browser virtualisation that occurs when a guest associates with an open Service Set Identifier (SSID).
The Captive Portal Lifecycle
When a client device associates with a captive SSID, the following sequence is triggered:
- IP Association: The device completes a 3-way handshake and requests an IP address via DHCP.
- Active Connectivity Probe: The operating system's background network manager immediately sends an HTTP GET request to a dedicated vendor-neutral canary URL (e.g., Apple's
http://captive.apple.com/hotspot-detect.htmlor Google'shttp://connectivitycheck.gstatic.com/generate_204) [1]. - DNS/HTTP Interception: The local Wireless LAN Controller (WLC) or Access Point (AP) intercepts this port 80 HTTP request. Instead of returning the expected HTTP 200 or 204 status, the gateway redirects the client's traffic to the captive portal's landing page URL via an HTTP 302 redirect [2].
- Webview Spawning: Detecting the redirect, the OS spawns its native Captive Network Assistant (CNA) mini-browser to display the redirected splash page, bypassing the need for the user to manually open a full browser.
- Authentication and State Transition: The user completes the login form, submitting credentials back to the portal server, which instructs the gateway (often via a RADIUS Access-Accept or external API call) to authorise the MAC address.
- CNA Exit Handshake: The CNA mini-browser performs another HTTP GET to its canary URL. If it receives the expected 200/204 response, it changes its top-right button from "Cancel" to "Done" and establishes the WiFi connection as the primary network interface.
Platform-Specific Mini-Browser Constraints
Each operating system handles this lifecycle within different webview environments, resulting in highly fragmented behaviour. The table below details these critical constraints:
| Platform / Webview | Display Method | Persistent Cookies | External Web Fonts | JavaScript Execution | Window Dimensions | Exit Handshake Trigger |
|---|---|---|---|---|---|---|
| Apple iOS CNA (Websheet) | Mini-Browser Popup | Blocked (Destroyed on close) | Blocked (Offline) | Limited (No localStorage/sessionStorage) | Responsive (Device-width) | Full-page HTTP Redirect Only [1] |
| Apple macOS CNA (Captive Network Assistant) | Mini-Browser Popup | Blocked | Blocked | Limited (No alert/confirm dialogs) | Fixed (900px x 572px) | Full-page HTTP Redirect Only |
| Android (Google) (CaptivePortalLogin) | Push Notification -> Chrome Custom Tab | Allowed (Shared with Chrome) | Allowed (If whitelisted in walled garden) | Full | Responsive | Automatic (Captive Portal API / 204 Check) [2] |
| Samsung Android (Samsung Internet) | Push Notification -> Mini-Browser | Allowed | Allowed | Full | Responsive | Automatic |
| Windows 10/11 (Default Browser) | Auto-Launch Default Browser | Allowed (Full browser context) | Allowed | Full | Responsive | Manual / Automatic |

Coding Around the Apple CNA "Done" Button Trap
One of the most frequent failure modes in custom portal development is the "Done" Button Trap on iOS devices. When a user authenticates, the iOS Websheet webview must detect that the network is no longer captive. It does this by monitoring the success of its background canary requests.
Crucially, the iOS CNA will only trigger this check upon a full-page HTTP navigation (location redirect). If a developer builds a modern Single Page Application (SPA) that submits form data via an asynchronous AJAX call (e.g., fetch() or Axios) and updates the DOM dynamically without changing the URL, the CNA will never re-run its connectivity check. The user will be authenticated at the gateway level, but the CNA button in the top-right corner will remain as "Cancel". If the frustrated user clicks "Cancel", the iOS device will immediately disassociate from the SSID, terminating the WiFi session [1].
To prevent this, the authentication success handler must perform a full-page redirect to a physical landing page (e.g., window.location.href = '/success') or submit the login form natively via a standard HTTP POST action.
Implementation Guide
To ensure consistent rendering across all platforms, developers must transition from modern, asset-heavy web design to a highly self-contained, defensive coding style.
The Golden Rule: Design for Zero Internet Connectivity
During the captive state, the client device has no access to the wider internet. It can only resolve and access IP addresses and domains explicitly whitelisted in the wireless controller's Walled Garden (such as the IP of the captive portal server itself). Therefore, any external asset referenced in your HTML will fail to load, resulting in a broken layout.
To design defensively, implement the following Mobile-First Captive Portal Design Checklist:

1. Viewport Configuration
To prevent mobile devices from scaling down the viewport to a desktop width (typically 980px), the HTML `` must include a responsive viewport meta tag. Without this, text and input fields will appear microscopic on mobile devices:
2. Inlining CSS and Removing External Dependencies
Never link to external CSS files or CDNs (e.g., Bootstrap, Tailwind, or Google Fonts). All CSS must be embedded within a `
<div class="portal-card">
<div class="logo-container">
YOUR BRAND
</div>
<h1>Welcome to Guest WiFi</h1>
<p>Please enter your details below to gain secure, high-speed internet access.</p>
<div class="form-group">
Full Name
</div>
<div class="form-group">
Email Address
</div>
<div class="consent-group">
I accept the <a href="#">Terms of Service</a> and consent to data processing in compliance with GDPR regulations.
</div>
<div id="terms_box" class="terms-scrollbox">
<strong>WiFi Terms of Service:</strong><br />
1. This service is provided as-is without warranties.<br />
2. Users must not engage in illegal bandwidth-intensive activities.<br />
3. Personal data is collected solely for authentication and marketing opt-ins in compliance with our Privacy Policy.
</div>
Connect to WiFi
<div class="footer">
Powered by Purple | Secure Guest WiFi
</div>
</div>
## Troubleshooting & Risk Mitigation
When deploying custom-coded HTML/CSS captive portals, IT operations teams frequently encounter several severe operational risks:
### 1. The SSL/TLS Certificate Warning Loop
Because captive portals function by intercepting traffic, they present a fundamental conflict with modern HTTPS web security. When a user attempts to visit an HTTPS site (e.g., `https://www.google.com`), and the gateway attempts to redirect that traffic to an HTTP captive portal, the browser detects a mismatch in the SSL certificate and displays a critical "Your connection is not private" security warning.
* **Mitigation**: Never attempt to intercept HTTPS traffic directly. Rely entirely on the operating system's native CNA helper (which makes an unencrypted HTTP request to trigger the redirect). Ensure your captive portal's domain has a valid, publicly trusted SSL certificate (e.g., Let's Encrypt or DigiCert) and is served over HTTPS *only after* the initial HTTP redirect has successfully routed the user to your portal domain [2].
### 2. DNS Resolution Failures (The Walled Garden Trap)
If your custom HTML page references external resources—such as a social login OAuth endpoint (e.g., Facebook, Google) or a payment gateway—the DNS requests for these domains will fail unless they are explicitly whitelisted in the wireless controller's Walled Garden. If a domain is missing from the whitelist, the login flow will stall, presenting a blank screen.
* **Mitigation**: Maintain a strict, minimal Walled Garden list. If utilising social logins, whitelist the specific wildcard domains recommended by the identity providers (e.g., `*.google.com`, `*.gstatic.com`).
### 3. Session Timeout and MAC Spoofing Vulnerabilities
Standard captive portals authenticate devices based on their MAC addresses. However, modern mobile operating systems (iOS 14+ and Android 10+) utilise randomised MAC addresses (private WiFi addresses) by default, rotating them periodically. This can lead to guests being repeatedly prompted to re-authenticate, destroying the user experience [1].
* **Mitigation**: Implement reasonable session timeouts (e.g., 24 hours) on the RADIUS server to prevent stale sessions, and utilise modern authentication standards like **Passpoint (Hotspot 2.0)** or **WPA3-Enterprise** for seamless, secure onboarding that bypasses MAC-based captive portals entirely.
## Purple Product Relevance: Build vs. Buy
While coding a single HTML page is straightforward, hosting, securing, and scaling a custom captive portal infrastructure presents massive technical and compliance hurdles. The table below compares the engineering and operational realities of self-hosting a custom portal versus utilising Purple's managed enterprise platform:
| Feature / Operational Requirement | Self-Hosted Custom Portal | Purple Enterprise WiFi Platform |
| :--- | :--- | :--- |
| **HTML/CSS Customisation** | Fully manual coding, uploading files to individual APs or local web servers. | **Pixel-perfect developer editor** allowing custom HTML/CSS injects, combined with a drag-and-drop visual builder.
| **RADIUS Infrastructure** | Must deploy, configure, and maintain highly available FreeRADIUS or Cloud RADIUS servers [4]. | **Built-in, globally distributed, cloud-native RADIUS** with active-active redundancy and 99.99% uptime SLAs.
| **Multi-Vendor AP Support** | Custom integration scripts required for each hardware vendor (Cisco, Aruba, Meraki, Ruckus) [5]. | **Native, out-of-the-box integration** with over 200 hardware models; unified portal deployment across mixed-hardware estates.
| **Data Privacy & Compliance** | Venue assumes 100% legal liability for GDPR, CCPA, and PCI DSS compliance, including secure database encryption and data deletion workflows. | **Fully compliant by design**. Built-in consent management, automated data-subject deletion requests, and secure ISO 27001-certified hosting.
| **Analytics & Marketing** | Requires building custom data ingestion pipelines and integrating third-party marketing tools. | **Enterprise-grade analytics dashboard** with real-time footfall tracking, return-rate metrics, and automated marketing campaign triggers [6].
| **Identity Provider Integrations** | Manual OAuth2 integrations with Google, Facebook, Apple, and local SMS gateways. | **One-click integrations** with major social platforms, SMS gateways, and Azure AD / Okta for corporate guests.
Purple's platform resolves the "Build vs. Buy" dilemma. It provides developers with the complete creative freedom of a custom HTML/CSS workspace while eliminating the complex, high-risk backend infrastructure engineering required to support secure RADIUS authentication at scale.
## ROI & Business Impact
Investing in a professionally engineered, responsive custom captive portal delivers quantifiable returns across IT operations, marketing, and legal compliance.
### 1. Operational Cost Reduction (IT Helpdesk Tickets)
In large-scale deployments, such as a stadium or multi-site retail chain, a broken captive portal is a leading driver of IT helpdesk escalations. When guests encounter a "white screen" or a non-responsive login button, they overwhelm on-site staff or submit support tickets.
$$\text{Annual Support Savings} = (\text{Total Annual Guest Visits} \times \text{Portal Failure Rate} \times \text{Helpdesk Contact Rate}) \times \text{Cost Per Support Ticket}$$
* **Scenario**: A convention centre with 1,000,000 annual visitors. A poorly coded portal has a 5% failure rate on older iOS devices, leading to a 10% helpdesk contact rate. At an industry-standard $15 per support ticket, the operational cost is:
$$(1,000,000 \times 0.05 \times 0.10) \times \$15 = \$75,000 \text{ annually in avoidable support overhead}$$
* **Outcome**: Transitioning to a CNA-optimised, mobile-first template reduces the portal failure rate to <0.1%, virtually eliminating this operational drain.
### 2. Marketing Data Capture and Opt-in Optimisation
For retail and hospitality venues, the guest WiFi portal is the primary mechanism for capturing clean, first-party customer data. A poorly designed user interface with microscopic text or a clunky form layout causes high **bounce rates**—users abandon the login process entirely, resulting in lost marketing opportunities.
* **Case Study (Retail)**: A national retail chain implemented a mobile-first optimised captive portal utilising Purple's platform. By replacing a multi-step login form with a single-field email input (font-size: 16px) and an optimised 48px tap-target button, they saw a **42% increase in completed registrations** and a **28% increase in marketing newsletter opt-ins** within the first quarter [6].
### 3. Legal and Regulatory Risk Mitigation
Under GDPR and CCPA, non-compliant data collection carries severe financial penalties (up to 4% of global annual turnover under GDPR). Relying on pre-ticked checkboxes or failing to provide a clear, easily accessible Privacy Policy on your splash page exposes the enterprise to immense legal liability.
* **Mitigation ROI**: Implementing an explicit, un-ticked consent checkbox and hosting terms within an optimised scrollbox ensures 100% regulatory compliance, mitigating the risk of multi-million dollar regulatory fines and protecting brand reputation.
## Summary of Key Takeaways
* **The CNA Sandbox is Restrictive**: Apple's iOS Websheet and macOS CNA are highly sandboxed environments that block external assets, cookies, and web fonts. All styling and assets must be self-contained (inline CSS, Base64 images, system fonts) [1].
* **AJAX Breaks the iOS Exit Handshake**: To successfully transition the iOS device from "captive" to "connected" (changing the top-right button from "Cancel" to "Done"), you must trigger a full-page HTTP redirect. Asynchronous DOM updates will leave the device in a captive loop.
* **Mobile-First is Mandatory**: Over 90% of logins occur on mobile. Design a single-column layout (max-width: 480px), utilise touch-friendly tap targets (minimum 44px x 44px), and enforce a minimum 16px font size on all text inputs to prevent automatic iOS browser zooming.
* **Walled Gardens Control DNS**: Any external domain referenced during login (e.g., social login APIs) must be explicitly whitelisted in the wireless controller's walled garden, or the page will fail to load.
* **Purple Eliminates Backend Complexity**: Utilising Purple's portal builder gives developers complete HTML/CSS control via a custom editor, while offloading the immense security, scaling, and compliance burdens of RADIUS, multi-vendor AP integrations, and GDPR-compliant database management [3].
## References
* [1] [Wireless Broadband Alliance: Captive Network Portal Behaviour](https://captivebehavior.wballiance.com/)
* [2] [Android Open Source Project: Captive Portal Login Webview Integration](https://source.android.com/docs/core/connect/android-custom-tabs-captive-portal)
* [3] [European Data Protection Board: Guidelines on Consent under Regulation 2016/679](https://edpb.europa.eu/our-work-tools/our-documents/guidelines/guidelines-052020-consent-under-regulation-2016679_en)
* [4] [How to Implement 802.1X Authentication with Cloud RADIUS](/guides/implementing-8021x-with-cloud-radius)
* [5] [Cisco Wireless APs: 2026 Guide to Products & Deployment](/blog/cisco-wireless-ap)
* [6] [Purple WiFi Marketing & Analytics Platform](/guest-wifi-marketing-analytics-platform)
---
## Listen to the Technical Briefing
Listen to a senior solutions architect discuss the technical constraints and implementation strategies for custom captive portals:
महत्वाच्या व्याख्या
Captive Portal
एक वेब पृष्ठ जे Wi-Fi नेटवर्कच्या नवीन जोडलेल्या वापरकर्त्यांना नेटवर्क संसाधनांमध्ये व्यापक प्रवेश मिळण्यापूर्वी प्रदर्शित केले जाते, सामान्यतः प्रमाणीकरण, पेमेंट किंवा सेवा अटी प्रदर्शित करण्यासाठी वापरले जाते.
IT टीम्स पाहुण्यांच्या प्रवेशावर नियंत्रण ठेवण्यासाठी, वापरकर्त्याचा डेटा गोळा करण्यासाठी आणि कायदेशीर अनुपालनाची अंमलबजावणी करण्यासाठी गेटवे स्तरावर Captive Portal तैनात करतात.
Captive Network Assistant (CNA)
ऑपरेटिंग सिस्टम्सद्वारे (जसे की Apple iOS आणि macOS) Captive Network रीडायरेक्ट शोधल्यानंतर स्वयंचलितपणे तयार केलेले एक अत्यंत प्रतिबंधित, सँडबॉक्स केलेले मिनी-ब्राउझर, जे केवळ पोर्टल प्रमाणीकरण सुलभ करण्यासाठी डिझाइन केलेले आहे.
CNA वेबव्ह्यूज बाह्य CDNs, कूकर्स आणि स्थानिक स्टोरेज ब्लॉक करण्यासह कठोर मर्यादा लागू करतात, ज्यामुळे वारंवार मानक वेब डिझाइन खंडित होतात.
Walled Garden
IP पत्ते, सबनेट्स किंवा डोमेन नावांची एक प्रतिबंधित सूची ज्यामध्ये अप्रमाणित पाहुण्या वापरकर्त्याला Captive Portal लॉगिन प्रक्रिया पूर्ण करण्यापूर्वी गेटवेद्वारे प्रवेश करण्याची परवानगी दिली जाते.
लॉगिन प्रवाह खंडित होण्यापासून रोखण्यासाठी विकसकांनी हे सुनिश्चित केले पाहिजे की कोणतेही बाह्य संसाधन (जसे की सोशल लॉगिन APIs किंवा पेमेंट गेटवे) Walled Garden मध्ये सुरक्षित सूचीत (whitelisted) समाविष्ट आहे.
Base64 Encoding
एक बायनरी-टू-टेक्स्ट एन्कोडिंग योजना जी बायनरी डेटा (जसे की प्रतिमा) ASCII स्ट्रिंग म्हणून दर्शवते, ज्यामुळे मालमत्ता थेट HTML किंवा CSS दस्तऐवजांमध्ये एम्बेड केल्या जाऊ शकतात.
लोगो आणि आयकॉनसाठी Base64 Encoding चा वापर केल्याने बाह्य HTTP विनंत्या दूर होतात, ज्यामुळे ऑफलाइन CNA वातावरणात मालमत्ता उत्तम प्रकारे रेंडर होतात.
RADIUS (Remote Authentication Dial-In User Service)
एक नेटवर्किंग प्रोटोकॉल जो नेटवर्क सेवा कनेक्ट करणाऱ्या आणि वापरणाऱ्या वापरकर्त्यांसाठी केंद्रीकृत प्रमाणीकरण, अधिकृतता आणि लेखा (AAA) व्यवस्थापन प्रदान करतो.
प्रमाणीकरण निकष पूर्ण झाल्यावर नेटवर्क गेटवेवर पाहुण्यांच्या MAC पत्त्याला अधिकृत करण्यासाठी Captive Portal सर्व्हर RADIUS सर्व्हरशी संवाद साधतो.
System Font Stack
एक CSS फॉन्ट-फॅमिली घोषणा जी बाह्य वेब फॉन्टपेक्षा आधीपासून स्थापित ऑपरेटिंग सिस्टम फॉन्ट्सना (जसे की iOS वर San Francisco, Windows वर Segoe UI आणि Android वर Roboto) प्राधान्य देते.
System Font Stack लागू केल्याने Google Fonts सारख्या सेवांना ब्लॉक केलेल्या बाह्य HTTP विनंत्या न पाठवता त्वरित टायपोग्राफी रेंडरिंग सुनिश्चित होते.
Canary URL
ऑपरेटिंग सिस्टम विक्रेत्यांद्वारे (उदा. captive.apple.com) देखरेख केलेली एक समर्पित, अनएन्क्रिप्टेड HTTP URL, ज्याचा वापर डिव्हाइसला अप्रतिबंधित इंटरनेट कनेक्टिव्हिटी आहे की नाही हे तपासण्यासाठी केला जातो.
OS पार्श्वभूमी नेटवर्क व्यवस्थापक Captive Portal चे अस्तित्व शोधण्यासाठी आणि CNA वेबव्ह्यू पॉपअप ट्रिगर करण्यासाठी या URL ची तपासणी करतो.
Passpoint (Hotspot 2.0)
Wi-Fi Alliance द्वारे विकसित केलेले एक उद्योग मानक जे मोबाइल डिव्हाइसेसना स्वयंचलितपणे शोध घेण्यास आणि Wi-Fi हॉटस्पॉटसह सुरक्षितपणे प्रमाणीकृत करण्यास सक्षम करते, ज्यामुळे मॅन्युअल Captive Portal लॉगिनची आवश्यकता उरत नाही.
उद्योग पाहुण्यांना कठीण स्प्लॅश पृष्ठांवरून अखंड, सेल्युलर-सारख्या सुरक्षित रोमिंग अनुभवांमध्ये स्थानांतरित करण्यासाठी Purple सारख्या प्लॅटफॉर्मसह Passpoint चा वापर करतात.
सोडवलेली उदाहरणे
एका लक्झरी २५०-रुम्स हॉटेल चेनला [Hospitality](/industries/hospitality) त्यांच्या प्रीमियम ब्रँड मार्गदर्शक तत्त्वांशी तंतोतंत जुळणारे कस्टम गेस्ट WiFi लॉगिन पेज लागू करायचे आहे. त्यांच्या क्रिएटिव्ह एजन्सीने कस्टम ब्रँड टायपोग्राफी (Adobe Fonts वर होस्ट केलेले), एकाधिक हाय-रिझोल्यूशन बॅकग्राउंड इमेजेस (पब्लिक AWS S3 बकेटवर होस्ट केलेल्या) आणि मल्टी-स्टेप ॲनिमेटेड JavaScript विझार्डचा वापर करून एक स्प्लॅश पेज डिझाइन केले. जेव्हा हे तैनात केले जाते, तेव्हा iOS अतिथी SSID शी कनेक्ट होतात, परंतु Captive Portal एक कोरी पांढरी स्क्रीन म्हणून पॉप अप होते आणि युजर्स ऑथेंटिकेट करू शकत नाहीत.
कोरी स्क्रीन आणि बिघडलेले ब्रँडिंग दुरुस्त करण्यासाठी, आपण Apple CNA सँडबॉक्सच्या मर्यादांचे पालन करण्यासाठी पोर्टलच्या फ्रंटएंड आर्किटेक्चरची पुनर्रचना केली पाहिजे:
- टायपोग्राफी सुधारणा: Adobe Fonts ला बाह्य HTTP विनंतीची आवश्यकता असते जी CNA द्वारे ब्लॉक केली जाते, म्हणून आम्ही कस्टम फॉन्ट कॉलऐवजी नेटिव्ह, प्रीमियम सिस्टम फॉन्ट स्टॅक (
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;) वापरतो. हे बाह्य नेटवर्क कॉल्सशिवाय त्वरित रेंडरिंग सुनिश्चित करते. - ॲसेट ऑप्टिमायझेशन: AWS S3 वरील बॅकग्राउंड इमेजेस ब्लॉक केल्या जातात कारण S3 गेटवेच्या वॉल्ड गार्डनमध्ये नाही. आम्ही मुख्य ब्रँड लोगो कॉम्प्रेस करतो, त्याला हलक्या वजनाच्या SVG मध्ये रूपांतरित करतो आणि थेट HTML मध्ये Base64 Data URI म्हणून एन्कोड करतो. बॅकग्राउंडसाठी, आम्ही जड इमेजेसऐवजी हॉटेलच्या ब्रँड रंगांचा वापर करून स्वच्छ, रिस्पॉन्सिव्ह CSS ग्रेडियंट वापरतो, ज्यामुळे पेजचे वजन लक्षणीयरीत्या कमी होते.
- JavaScript सरलीकरण: मल्टी-स्टेप ॲनिमेटेड विझार्ड बाह्य jQuery आणि GSAP लायब्ररींवर अवलंबून असतो. आम्ही या बाह्य डिपेंडन्सीज काढून टाकतो आणि फॉर्मची सिंगल-पेज, सिंगल-कॉलम HTML स्ट्रक्चरमध्ये पुनर्रचना करतो. फॉर्म व्हॅलिडेशन हलक्या वजनाच्या, व्हॅनिला JavaScript मध्ये पुन्हा लिहिले आहे.
- ऑथेंटिकेशन हँडशेक: फुल-पेज रीडायरेक्ट ट्रिगर करण्यासाठी फॉर्म सबमिशन AJAX-आधारित सबमिशनवरून नेटिव्ह HTML
<form action="/submit" method="POST">मध्ये सुधारित केले आहे, ज्यामुळे iOS Websheet ला त्याची कॅनरी तपासणी कार्यान्वित करण्याची आणि 'Done' बटण प्रदर्शित करण्याची अनुमती मिळते.
४५० स्टोअर्स असलेल्या एका राष्ट्रीय रिटेल चेनला [Retail](/industries/retail) त्यांच्या CRM ला चालना देण्यासाठी WiFi स्प्लॅश पेजेसद्वारे अतिथींचे ईमेल कॅप्चर करायचे आहेत. त्यांना मार्केटिंग न्यूजलेटर्ससाठी अतिथींनी ऑप्ट-इन करणे आवश्यक आहे. सुरुवातीच्या डिझाइनमध्ये आधीच टिक केलेले (pre-checked) 'मला मार्केटिंग ईमेल मिळण्यास मान्यता आहे' असे चेकबॉक्स आहे. शिवाय, हे पोर्टल त्यांच्या मुख्यालयातील एकाच स्थानिक सर्व्हरवर होस्ट केले आहे. गर्दीच्या वेळेत (शनिवारी दुपारी), देशभरातील अतिथींना प्रचंड विलंबाचा सामना करावा लागतो आणि बरेच जण लॉगिन पेज लोड करू शकत नाहीत, ज्यामुळे डेटा कॅप्चर दरात मोठी घट होते.
आम्हाला अनुपालन (compliance) उल्लंघन आणि इन्फ्रास्ट्रक्चरची अडचण या दोन्ही गोष्टींचे निराकरण करणे आवश्यक आहे:
- अनुपालन सुधारणा: GDPR आणि CCPA अंतर्गत, आधीच टिक केलेले संमती बॉक्स बेकायदेशीर आहेत. आम्ही मार्केटिंग संमती चेकबॉक्स डीफॉल्टनुसार अनचेक करण्यासाठी HTML मध्ये बदल करतो (
<input type="checkbox" id="marketing_consent">). कायदेशीर करार आणि मार्केटिंग ऑप्ट-इन वेगळे करण्यासाठी आम्ही सेवा अटींसाठी (Terms of Service) एक स्वतंत्र, अनिवार्य चेकबॉक्स देखील जोडतो. - इन्फ्रास्ट्रक्चर स्केलिंग: एकाच सेंट्रलाइज्ड सर्व्हरवर राष्ट्रीय Captive Portal होस्ट केल्याने सिंगल पॉइंट ऑफ फेल्युअर आणि प्रचंड विलंबाची समस्या निर्माण होते. आम्ही एज-कॅशिंगसह अत्यंत उपलब्ध, जागतिक स्तरावर वितरित केलेल्या कंटेंट डिलिव्हरी नेटवर्क (CDN) वर पोर्टल फ्रंटएंड स्थलांतरित करतो.
- RADIUS इंटिग्रेशन: आम्ही स्थानिक स्टोअर ॲक्सेस पॉइंट्सना ॲक्टिव्ह-ॲक्टिव्ह रिडंडन्सीसह क्लाउड-नेटिव्ह RADIUS क्लस्टरकडे निर्देशित करण्यासाठी कॉन्फिगर करतो, ज्यामुळे ऑथेंटिकेशन विनंत्या स्थानिक पातळीवर ५०ms पेक्षा कमी विलंबासह प्रक्रिया केल्या जातील, अगदी शनिवारच्या गर्दीच्या ट्रॅफिक दरम्यानही.
- Purple स्थलांतर: हा संपूर्ण इंजिनिअरिंगचा ताण दूर करण्यासाठी, रिटेलर Purple वर स्थलांतरित होतो. Purple चे अंगभूत GDPR संमती टूलिंग स्वयंचलितपणे सुसंगत ऑप्ट-इन्स व्यवस्थापित करते आणि त्यांचे जागतिक स्तरावर वितरित क्लाउड इन्फ्रास्ट्रक्चर ९९.९९% अपटाइमसह लाखो दैनिक ऑथेंटिकेशन हाताळते, ज्यामुळे स्केलिंगची अडचण पूर्णपणे सुटते.
सराव प्रश्न
Q1. एका मोठ्या आंतरराष्ट्रीय विमानतळावरील [Transport](/industries/transport) IT टीमने कस्टम-कोडेड captive portal तैनात केले आहे. त्यांच्या लक्षात आले की Android वापरकर्ते अखंडपणे कनेक्ट होत असताना, iOS वापरकर्त्यांच्या एका मोठ्या भागाला अशा समस्येचा सामना करावा लागतो जिथे ते यशस्वीरित्या ऑथेंटिकेट होतात परंतु वेब ब्राउझ करू शकत नाहीत. बारकाईने पाहणी केल्यावर, iOS डिव्हाइसेस ते SSID शी कनेक्ट असल्याचे दर्शवतात, परंतु कॅप्टिव्ह पॉपअपवरील वरच्या उजव्या बाजूचे बटण अजूनही 'Done' ऐवजी 'Cancel' दर्शवते. या समस्येचे मूळ कारण काय आहे आणि डेव्हलपरने ते कसे दुरुस्त करावे?
टीप: Apple CNA मदतनीस नेटवर्क कॅप्टिव्हमधून ऑथेंटिकेट कसा झाला हे कसे शोधतो आणि ही तपासणी सुरू करण्यासाठी कोणत्या ब्राउझर कृतीची आवश्यकता आहे याचे विश्लेषण करा.
नमुना उत्तर पहा
याचे मूळ कारण असे आहे की पोर्टलचे यश पृष्ठ (success page) पूर्ण-पृष्ठ HTTP नेव्हिगेशन करण्याऐवजी JavaScript (AJAX/SPA राउटिंग) द्वारे UI डायनॅमिकपणे अपडेट करत आहे. Apple iOS Captive Network Assistant (CNA) मिनी-ब्राउझर त्याची पार्श्वभूमी कनेक्टिव्हिटी तपासणी (captive.apple.com कडील कॅनरी विनंती) केवळ तेव्हाच पुन्हा चालवतो जेव्हा पूर्ण-पृष्ठ URL रीडायरेक्ट किंवा नेव्हिगेशन होते. जर डेव्हलपरने AJAX द्वारे लॉगिन फॉर्म सबमिट केला आणि DOM मध्ये फक्त 'Success' संदेश दर्शवला, तर नेटवर्क अनलॉक झाले आहे याची CNA ला जाणीव होत नाही. परिणामी, वरच्या उजव्या बाजूचे बटण 'Cancel' म्हणूनच राहते. जर वापरकर्त्याने बाहेर पडण्यासाठी 'Cancel' वर क्लिक केले, तर OS गृहीत धरते की लॉगिन अयशस्वी झाले आणि WiFi नेटवर्कवरून डिस्कनेक्ट होते.
उपाय: डेव्हलपरने ऑथेंटिकेशन यश हँडलरमध्ये बदल करून पूर्ण-पृष्ठ रीडायरेक्ट सक्तीने करणे आवश्यक आहे. हे मानक HTML <form action="/submit" method="POST"> द्वारे लॉगिन फॉर्म सबमिट करून किंवा API कडून यशस्वी ऑथेंटिकेशन प्रतिसाद मिळाल्यावर JavaScript मध्ये window.location.href = '/success_landing_page' कार्यान्वित करून साध्य केले जाऊ शकते. हे आवश्यक पूर्ण-पृष्ठ लोड ट्रिगर करते, ज्यामुळे CNA मदतनीसला नेटवर्क स्थितीचे पुन्हा मूल्यमापन करण्यास, कॅनरी URL आता पोहोचण्यायोग्य असल्याचे सत्यापित करण्यास आणि वरच्या उजव्या बाजूचे बटण 'Done' मध्ये बदलण्यास भाग पाडले जाते.
Q2. एका स्टेडियम ऑपरेशन्स टीमला [Events] एक अतिथी WiFi नेटवर्क सुरू करायचे आहे जे मार्केटिंग ऑप्ट-इन्स कॅप्चर करेल. अनुपालन अधिकारी (compliance officer) आग्रह धरतात की पोर्टल १००% GDPR-सुसंगत असावे. डेव्हलपमेंट टीम एक मॉकअप सादर करते जिथे लॉगिन फॉर्ममध्ये आधीच टिक केलेले (pre-checked) बॉक्स आहे ज्यामध्ये लिहिले आहे 'मी सेवा अटींशी सहमत आहे आणि मार्केटिंग न्यूजलेटर प्राप्त करण्यास संमती देतो'. ही रचना असुसंगत का आहे आणि उच्च रूपांतरण दर (conversion rate) राखून GDPR चे पालन करण्यासाठी HTML/CSS आणि फॉर्म संरचनेची पुनर्रचना कशी करावी?
टीप: स्पष्ट संमती, सेवा अटींमधून (terms of service) मार्केटिंग ऑप्ट-इन्स वेगळे करणे आणि मोबाईल स्क्रीनवर कायदेशीर मजकुराची प्रत्यक्ष दृश्यमानता यासंबंधीच्या GDPR च्या कठोर आवश्यकतांचा विचार करा.
नमुना उत्तर पहा
प्रस्तावित रचना दोन मुख्य आघाड्यांवर GDPR चे उल्लंघन करते: पहिले, आधीच टिक केलेले चेकबॉक्स वैध संमती मानले जात नाहीत, जी मुक्तपणे दिलेली, विशिष्ट, माहितीपूर्ण आणि स्पष्ट असणे आवश्यक आहे. दुसरे, सेवा अटींच्या करारासह मार्केटिंग संमती एकत्र करणे असुसंगत आहे; WiFi सेवा वापरण्याची अट म्हणून वापरकर्त्याला मार्केटिंग ईमेल स्वीकारण्यास भाग पाडले जाऊ शकत नाही.
पुनर्रचना धोरण:
- संमती वेगळी करा: चेकबॉक्सला दोन स्वतंत्र चेकबॉक्समध्ये विभाजित करा. चेकबॉक्स A अनिवार्य आहे आणि सेवा अटी आणि गोपनीयता धोरण कव्हर करतो. चेकबॉक्स B पर्यायी आहे आणि मार्केटिंग न्यूजलेटर ऑप्ट-इन कव्हर करतो.
- अनचेक केलेले सेट करा: HTML मध्ये दोन्ही चेकबॉक्स डीफॉल्टनुसार अनचेक केलेले असल्याची खात्री करा (
checkedविशेषता वगळली आहे). - CSS दृश्यमानता: ९०% पेक्षा जास्त वापरकर्ते मोबाईलवर असल्याने, चेकबॉक्स थेट 'Connect' बटणाच्या वर ठेवा जेणेकरून ते स्क्रोल न करता 'above the fold' दृश्यमान होतील. वाचनीयतेसाठी सिस्टम फॉन्ट स्टॅक वापरा आणि लेबल फॉन्ट आकार 14px सह लाइन-हाइट 1.4 वर सेट करा.
- अटी स्क्रोलबॉक्स: कायदेशीर मजकुरामुळे फॉर्म घटक स्क्रीनच्या बाहेर जाऊ नयेत म्हणून, तपशीलवार सेवा अटी एका निश्चित उंचीच्या स्क्रोल करण्यायोग्य कंटेनरमध्ये ठेवा (
max-height: 100px; overflow-y: auto; background-color: #F5F1ED; border: 1px solid #D1D5DB; border-radius: 6px;) जे मजकूर लिंकद्वारे उघडले किंवा बंद केले जाऊ शकते. हे परिपूर्ण कायदेशीर अनुपालन सुनिश्चित करताना एक स्वच्छ, उच्च-रूपांतरण लेआउट राखते.
Q3. एक रिटेल साखळी [Retail](/industries/retail) १०० स्टोअरमध्ये कस्टम-कोडेड स्प्लॅश पेज तैनात करत आहे. डिझायनरने Google Fonts (Montserrat) वापरले आणि HTML head मध्ये CDN-होस्ट केलेल्या Bootstrap स्टाइलशीटची लिंक दिली. कॉर्पोरेट नेटवर्कवर चाचणी दरम्यान, पृष्ठ सुंदर दिसते. तथापि, जेव्हा कॅप्टिव्ह नेटवर्क कॉन्फिगरेशनसह चाचणी स्टोअर AP वर तैनात केले जाते, तेव्हा पृष्ठ अनस्टाईल केलेले Times New Roman मजकूर, तुटलेले अलाइनमेंट आणि गहाळ चिन्हांसह दिसते. असे का होते आणि मालमत्तांची (assets) पुनर्रचना कशी केली पाहिजे?
टीप: वापरकर्ता ऑथेंटिकेट होण्यापूर्वी नेटवर्क कनेक्शनच्या स्थितीचे विश्लेषण करा आणि ब्राउझर वॉल्ड गार्डनच्या बाहेरील डोमेनवरील बाह्य HTTP विनंत्या कशा हाताळतो ते निश्चित करा.
नमुना उत्तर पहा
हा बिघाड यामुळे होतो कारण स्प्लॅश पृष्ठ लोड केले जाते तेव्हा डिव्हाइस अनऑथेंटिकेटेड, कॅप्टिव्ह स्थितीत असते. या स्थितीत, वायरलेस गेटवे सर्व आउटबाउंड इंटरनेट ट्रॅफिक ब्लॉक करतो, केवळ गेटवेच्या Walled Garden मध्ये स्पष्टपणे परवानगी दिलेल्या (whitelisted) डोमेनवर विनंत्या पाठवण्याची परवानगी देतो. Bootstrap (cdn.jsdelivr.net) आणि Google Fonts (fonts.googleapis.com) साठीचे CDN डोमेन परवानगी यादीत नसल्यामुळे, स्टाइलशीट आणि फॉन्ट फाइल्स मिळवण्यासाठी ब्राउझरच्या विनंत्या शांतपणे अयशस्वी होतात. परिणामी, ब्राउझर त्याच्या डीफॉल्ट रेंडरिंग इंजिनवर परत जातो, ज्यामुळे अनस्टाईल केलेले HTML (Times New Roman मजकूर) आणि तुटलेले लेआउट्स मिळतात.
पुनर्रचना धोरण:
- इनलाइन CSS: बाह्य Bootstrap स्टाइलशीट लिंक काढा. आवश्यक CSS ग्रिड/फ्लेक्सबॉक्स नियम थेट HTML
<head>मधील<style>ब्लॉकमध्ये कॉपी करा. हे सुनिश्चित करते की सर्व लेआउट सूचना सुरुवातीच्या सिंगल-पेज पेलोडमध्येच वितरित केल्या जातात. - सिस्टम फॉन्ट स्टॅक लागू करा: Google Fonts
@importकिंवा<link>कॉल काढा. त्याऐवजी CSS मध्ये मूळ सिस्टम फॉन्ट स्टॅक वापरा (font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;). हे डिव्हाइसला ऑपरेटिंग सिस्टमवर आधीपासून स्थापित केलेले उच्च-गुणवत्तेचे फॉन्ट वापरण्यास भाग पाडते, ज्यामुळे बाह्य नेटवर्क अवलंबित्व पूर्णपणे संपुष्टात येते. - Base64 एन्कोड चिन्हे/लोगो: जर लेआउट बाह्य प्रतिमा किंवा चिन्ह लायब्ररींवर (जसे की FontAwesome) अवलंबून असेल, तर या चिन्हांना SVG स्वरूपात रूपांतरित करा आणि त्यांना HTML मध्ये इनलाइन किंवा CSS मध्ये Base64 Data URIs म्हणून एम्बेड करा. हे हमी देते की पृष्ठ १००% स्वयंपूर्ण आहे आणि शून्य इंटरनेट कनेक्टिव्हिटी असतानाही उत्तम प्रकारे रेंडर होते.
या मालिकेमध्ये पुढे वाचा
Captive Portal आर्किटेक्चर: सुरक्षा, पुनर्निर्देशन (Redirection), आणि सर्वोत्तम पद्धती
एंटरप्राइझ captive portal आर्किटेक्चरवरील एक निश्चित तांत्रिक संदर्भ. हे मार्गदर्शक सुरक्षित, डेटा-समृद्ध गेस्ट WiFi नेटवर्क्स तैनात करणाऱ्या IT लीडर्ससाठी नेटवर्क आयसोलेशन, DNS पुनर्निर्देशन, RADIUS प्रमाणीकरण आणि सुरक्षा अनुपालनाचा खुलासा करते.
B2B Captive Portals ऑप्टिमाइझ करणे: कंपनीची नावे आणि व्यावसायिक डेटा संकलित करणे
ही मार्गदर्शिका स्पष्ट करते की IT व्यवस्थापक, नेटवर्क आर्किटेक्ट्स आणि वेन्यू ऑपरेशन्स डायरेक्टर्स WiFi लॉगिनच्या वेळी व्यावसायिक डेटा - कंपन्यांची नावे, जॉब टायटल्स आणि व्यावसायिक ईमेल पत्ते संकलित करण्यासाठी B2B captive portals कसे कॉन्फिगर करू शकतात. यामध्ये VLAN आयसोलेशन आणि RADIUS ऑथेंटिकेशनपासून ते Salesforce आणि HubSpot सोबत CRM इंटिग्रेशनपर्यंतच्या संपूर्ण तांत्रिक आर्किटेक्चरचा समावेश आहे, ज्यामध्ये GDPR आणि CCPA अनुपालन आधीपासूनच समाविष्ट आहे. जे वेन्यू हे योग्यरित्या तैनात करतात ते त्यांच्या गेस्ट WiFi नेटवर्कचे रूपांतर फर्स्ट-पार्टी डेटा इंजिन आणि ऑटोमेटेड लीड जनरेशन सिस्टीममध्ये करतात.
Starlink वर Captive Portal कसे सेट करावे: दुर्गम आणि सागरी ठिकाणांसाठी एक मार्गदर्शिका
ही मार्गदर्शिका मूळ Starlink हार्डवेअरला बायपास कसे करावे आणि एंटरप्राइझ राउटिंग उपकरणांचा वापर करून क्लाउड-व्यवस्थापित captive portal कसे समाकलित करावे याबद्दल तपशीलवार माहिती देते. तुम्ही CGNAT मर्यादांवर मात कशी करावी, VLAN विभाजन कसे लागू करावे, सॅटेलाइट बँडविड्थ मर्यादा कशा व्यवस्थापित कराव्यात आणि नियामक अनुपालन कसे सुनिश्चित करावे हे शिकाल.