George John

George John

789 Articles Published

Articles by George John

Page 15 of 79

HTML DOM Anchor pathname Property

George John
George John
Updated on 16-Mar-2026 175 Views

The HTML DOM Anchor pathname property is used to set or return the pathname portion of a link's href attribute. The pathname represents the path part of the URL, which comes after the domain name and before any query string or hash fragment. Syntax Following is the syntax to set the pathname property − anchorObject.pathname = path Following is the syntax to return the pathname property − anchorObject.pathname Parameters path − A string that specifies the pathname of the URL. It should start with a forward slash (/) and ...

Read More

How to redirect URL to the different website after few seconds?

George John
George John
Updated on 16-Mar-2026 7K+ Views

Page redirection is a situation where you click a URL to reach page X but are automatically directed to another page Y. This happens due to page redirection configured by the website developer. To redirect a URL to a different website after a few seconds, use the META tag with the http-equiv="refresh" attribute and the content attribute. The content attribute sets the delay in seconds before the redirect occurs. Syntax Following is the syntax for URL redirection using the META tag − Where − seconds − The number of seconds ...

Read More

HTML data Attribute

George John
George John
Updated on 16-Mar-2026 158 Views

The data attribute of the element specifies the URL of the resource to be embedded in the web page. This resource can be various file types including audio, video, PDF documents, Flash files, images, or other multimedia content. Syntax Following is the syntax for the data attribute − Here, url is the absolute or relative URL of the resource to be embedded by the object element. Parameters The data attribute accepts a single parameter − url − A string that specifies the URL of the resource. This can ...

Read More

Disabling Android's chrome pull-down-to-refresh feature with HTML.

George John
George John
Updated on 16-Mar-2026 528 Views

The pull-down-to-refresh feature in Chrome for Android automatically refreshes the page when users pull down from the top. While this enhances user experience in most cases, it can interfere with web applications that have their own scrolling interactions or custom refresh mechanisms. The Problem When users interact with custom scrollable content, chat interfaces, or touch-based applications, the browser's pull-to-refresh can trigger unintentionally. This creates a poor user experience where the entire page refreshes when users only intended to scroll within a specific area. Syntax Following is the CSS syntax to disable the pull-down-to-refresh feature − ...

Read More

How to fix getImageData() error 'The canvas has been tainted by cross-origin data' in HTML?

George John
George John
Updated on 16-Mar-2026 2K+ Views

The getImageData() error "The canvas has been tainted by cross-origin data" occurs when you try to extract pixel data from a canvas that contains images loaded from external domains without proper CORS (Cross-Origin Resource Sharing) configuration. This security restriction prevents websites from accessing image data from other domains. When a canvas is "tainted" by cross-origin content, the browser blocks methods like getImageData(), toDataURL(), and toBlob() to prevent potential security vulnerabilities. Understanding Canvas Tainting Canvas tainting happens when you draw images from external domains onto a canvas without proper CORS headers. Once tainted, the canvas becomes read-only for ...

Read More

What is the difference between SVG and HTML5 Canvas?

George John
George John
Updated on 16-Mar-2026 10K+ Views

The SVG (Scalable Vector Graphics) and HTML5 Canvas are both technologies for creating graphics on web pages, but they work in fundamentally different ways. SVG is a vector-based markup language that uses XML to define graphics, while Canvas is a bitmap-based drawing surface that uses JavaScript for creating graphics programmatically. What is SVG? SVG stands for Scalable Vector Graphics and is an XML-based markup language for describing 2D graphics. SVG graphics are composed of shapes, paths, text, and other elements defined through XML tags. The browser renders these elements as vector graphics, making them infinitely scalable without quality ...

Read More

HTML target Attribute

George John
George John
Updated on 16-Mar-2026 168 Views

The target attribute of the element specifies where to open the linked document when a clickable area within an image map is activated. It determines whether the link opens in the current window, a new window, or a specific frame. Syntax Following is the syntax for the target attribute − Target Attribute Values The target attribute accepts the following values − _blank − Opens the linked document in a new window or tab. _self − Opens the linked document in the same frame or window (default ...

Read More

How to specify where to send the form-data when a form is submitted in HTML?

George John
George John
Updated on 16-Mar-2026 695 Views

The action attribute in HTML forms specifies where to send the form data when the form is submitted. This attribute defines the destination URL, file path, or email address that will process the submitted form data. Syntax Following is the syntax for the action attribute − Where destination can be a URL, file path, or email address, and method_type is typically GET or POST. Common Action Attribute Values The action attribute accepts different types of destinations − Server URL − Points to a server-side ...

Read More

Getting values from HTML5 Canvas to JavaScript

George John
George John
Updated on 16-Mar-2026 499 Views

When working with HTML5 Canvas, it's important to understand that the canvas element acts as a bitmap drawing surface that doesn't retain information about individual drawn objects. Once something is drawn on the canvas, it becomes part of a flat image and cannot be individually accessed or manipulated through JavaScript. Why Canvas Doesn't Store Object Data The HTML5 Canvas is fundamentally different from DOM elements. It operates as an immediate mode graphics API, meaning it draws pixels directly to a bitmap surface without maintaining a scene graph or object hierarchy. This design makes canvas extremely fast for rendering ...

Read More

Same origin policy on mobile apps with HTML

George John
George John
Updated on 16-Mar-2026 325 Views

The same-origin policy is a critical web security concept that restricts how a document or script from one origin can interact with resources from another origin. However, when developing mobile applications using HTML, CSS, and JavaScript through frameworks like PhoneGap (Apache Cordova), the same-origin policy behaves differently than in traditional web browsers. Same-Origin Policy in Web Browsers vs Mobile Apps In web browsers, the same-origin policy prevents scripts from accessing content from different domains, protocols, or ports. However, in mobile apps built with HTML/JavaScript frameworks, the application runs locally on the device using the file:// protocol rather than ...

Read More
Showing 141–150 of 789 articles
« Prev 1 13 14 15 16 17 79 Next »
Advertisements