JavaScript Execution for Webpage Content Extraction

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current link-following and security systems are ineffective in efficiently and reliably accessing and analyzing webpage content in the presence of redirects, particularly due to the use of URL shortening services, nested redirects, JavaScript, and DOM manipulation, which complicates the identification and blocking of spam messages.

Innovation Solution

A method and system that analyzes incoming messages for URLs, performs recursive URL redirect analysis to follow redirects, identifies and executes JavaScript, and applies specific processing procedures for different types of redirects and issues, such as JavaScript and DOM manipulation, to obtain the end destination webpage content and determine if a URL is spam.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If traditional link-following systems are used to access URLs, then simple URL analysis is possible, but the systems fail to handle redirects effectively and cannot reliably obtain webpage content

Engineering Contradiction:
Improvereliability of webpage content accessVSAvoidability to handle redirect types
Core Design Contradiction:
ReliabilityVSAdaptability or versatility

Solution Approach 1:

The system segments redirect handling into distinct modules: HTTP redirect detection, HTML Meta redirect detection, JavaScript redirect detection, and DOM manipulation detection. Each module handles a specific redirect type independently, allowing the system to reliably process multiple redirect types without confusion.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system implements nested redirect following where each redirect response may contain additional redirects. The system recursively follows redirects within redirects by checking HTTP responses, HTML content, and JavaScript execution results for additional redirect URLs, unwrapping nested redirect layers systematically.

Inventive Principle:
Principle #7Nested doll (Nesting)

2Loss of information

If URL shortening services are used, then URL size is reduced for communication, but the actual URL and webpage content become masked and harder to analyze

Engineering Contradiction:
Improveinformation loss in URL transmissionVSAvoiddifficulty of URL analysis
Core Design Contradiction:
Loss of informationVSDifficulty of detecting and measuring

Solution Approach 1:

The system performs preliminary redirect following and webpage content retrieval before spam analysis. By automatically resolving shortened URLs and following all redirect chains to obtain the final destination content, the system ensures complete information is available for analysis before making spam determination.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system uses an intermediary analysis process that sits between URL reception and spam detection. This intermediary layer resolves shortened URLs, follows redirects, executes JavaScript, and retrieves final webpage content, transforming obscured URLs into analyzable content without exposing the underlying spam mechanisms.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Object-affected harmful factors

If spammers use deeply nested series of redirects, then spam URL content is hidden effectively, but current systems cannot efficiently retrieve the actual URL and content

Engineering Contradiction:
Improveeffectiveness of spam hidingVSAvoidefficiency of URL analysis
Core Design Contradiction:
Object-affected harmful factorsVSProductivity

Solution Approach 1:

The system maintains continuous redirect following by recursively processing each redirect response to check for additional redirects. The process continues uninterrupted through nested redirect layers, systematically unwrapping each layer until the final destination is reached, ensuring complete content retrieval despite deep nesting.

Inventive Principle:
Principle #20Continuity of useful action

Solution Approach 2:

The system replaces simple link-following mechanics with a comprehensive analysis mechanism that combines HTTP response analysis, HTML parsing, JavaScript execution, and DOM manipulation detection. This substituted mechanism efficiently handles complex nested redirects that traditional mechanical link-following cannot process.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

4Adaptability or versatility

If JavaScript redirects and DOM manipulation are used, then spam content is dynamically hidden, but traditional link-following systems cannot execute JavaScript or detect DOM changes

Engineering Contradiction:
Improveability to detect JavaScript redirectsVSAvoidcomplexity of JavaScript execution
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The system introduces a JavaScript execution intermediary that acts as a bridge between the analysis system and the target webpage. This intermediary executes JavaScript code in a controlled environment, detects DOM manipulations, and extracts redirect URLs that would otherwise be hidden through JavaScript-based redirection mechanisms.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The system changes the operational parameters of webpage analysis by executing JavaScript code and monitoring DOM state changes. By transforming static HTML parsing into dynamic JavaScript execution and DOM observation, the system can detect redirects that are conditionally applied or dynamically generated through JavaScript.

Inventive Principle:
Principle #35Parameter changes

5Measurement precision

If tracking bugs are retrieved to obtain URL webpage content, then complete content analysis is possible, but the analyzing system's IP address may be banned at DNS level

Engineering Contradiction:
Improveprecision of content analysisVSAvoidreliability of continued URL analysis
Core Design Contradiction:
Measurement precisionVSReliability

Solution Approach 1:

The system performs partial tracking bug retrieval by executing JavaScript and accessing DOM elements that contain tracking URLs, but controls the actual network requests to tracking servers. This partial action allows detection of tracking mechanisms and analysis of associated content without fully triggering the banning response that would result from complete tracking bug execution.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS8819819B1Method and system for automatically obtaining webpage content in the presence of javascript
Publication Date: 2014.08.26 GEN DIGITAL INC
  • US8819819B1 patent drawing
  • US8819819B1 patent drawing
  • US8819819B1 patent drawing

AI summary

JavaScript on webpages linked to by URLs in messages is identified and the JavaScript is extracted. The JavaScript is then subjected to a JavaScript execution and analysis process whereby the JavaScript is executed in the context of a simulated web browser. The behavior of the JavaScript is then analyzed to identify one or more of: any URLs to be redirected to; any further executable JavaScript; and any content dynamically written to the webpage. The results are then either recursed into or are recorded and used to aid in the identification of spam messages.