Tag: websites

How to redirect subdomains to a new domain with the same subdomains

Contents Task: redirect requests coming to subdomains to a new domain with the same subdomains using mod_rewrite in the .htaccess file settings. In this case, you need to save the request and query parameters (the requested page, etc.). Quick solution How to redirect requests coming to subdomains to a new domain with the same subdomains using mod_rewrite in the .htaccess...

How to cache MySQL / MariaDB query results

Contents 0. In MySQL, query caching has been completely removed in recent versions, while in MariaDB, on the contrary, it has become enabled by default. 1. How MySQL / MariaDB query caching works 2. When to use MySQL / MariaDB query caching 3. How to enable and configure MySQL / MariaDB query result caching 4. How to check MySQL /...

How to convert a large number of images to AVIF while preserving the directory tree

Situation: you need to convert all JPG, JPEG, PNG and WebP images to AVIF format. The images to be converted are located in different directories. It is necessary to preserve the folder structure, and the original image must be deleted. This task may arise for compression in order to save disk space for a home collection of pictures, or for...

How to redirect from JPG, JPEG, PNG and WebP to AVIF using .htaccess and mod_rewrite

In the previous article, we learned how to convert JPG and other formats to AVIF (which is supported by modern web browsers). This can reduce the space occupied by images on the hosting by up to 8+ times! See also: How to convert images to AVIF using PHP But converting images to a new format is just the beginning –...

How to convert images to AVIF using PHP

Contents 1. AVIF format for websites 2. Programs for converting images to AVIF on a server 2.1 Converting to AVIF with the magick utility 2.2 avifenc utility for converting to AVIF 3. Why converting to AVIF with PHP is a worthwhile option 4. Converting files to AVIF in PHP 5. How to use PHP to convert a large number of...

Should I close MySQL connections with $mysqli->close() in PHP scripts. Should I use $result->free()

Contents What are $mysqli->close() and $result->free() used for in PHP Is it necessary to close connections to MySQL / MariaDB and clear the result of the SQL query? When using $mysqli->close() and $result->free() will NOT give tangible results When to use $mysqli->close() and $result->free() Is it possible to close the MySQL database connection before completing the processing of query results...

How to take a screenshot of a website in the command line (with JavaScript and lazy download support)

Brief summary of the article: You can take a screenshot of a website in the command line using a headless web browser – the article describes in detail how to do this If you do not want to bother with installation and configuration, then you can take a screenshot of websites (including JavaScript and lazy download) using the online service:...

What is a WebP file and how is it better than other formats

WebP is a raster graphics file format developed by Google intended as a replacement for JPEG, PNG, and GIF file formats. It supports both lossy and lossless compression, as well as animation and alpha transparency. What is a WebP file A file with the .webp extension is a file format developed by Google to reduce the size of images without...

How to take a screenshot of the entire website page even beyond the screen

Summary Go to the service website https://w-e-b.site/?act=screenshot and enter the page address to create a screenshot of it in its entirety, even if it extends beyond the edges of the screen. A simple way to take a screenshot of the entire web page Taking a screenshot is a fairly simple task for which there are many specialized applications designed to...

How to save the entire HTML DOM in its current state

What is Document Object Model (DOM)? The content of a web page consists of HTML code received from a web server. But modern technologies (HTML 5 and JavaScript) allow you to change the content of a web page on the fly: JavaScript can add new elements, change the properties of existing elements, remove elements and perform a variety of actions...
Loading...
X