CSV
- 1 ответ
- 0 вопросов
3
Вклад в тег
const factorial = (n) => {
return (n === 0) ? 1 : n * factorial(n-1);
}
const factorial = (n) => {
const iter = (counter, acc) => {
return (counter === 0) ? acc : iter(counter - 1, counter * acc);
}
return iter (n, 1);
}
<IfModule mod_setenvif.c>
# Vary: Accept for all the requests to jpeg and png
SetEnvIf Request_URI "\.(jpe?g|png)$" REQUEST_image
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
# Check if browser supports WebP images
RewriteCond %{HTTP_ACCEPT} image/webp
# Check if WebP replacement image exists
RewriteCond %{DOCUMENT_ROOT}/$1.webp -f
# Serve WebP image instead
RewriteRule (.+)\.(jpe?g|png)$ $1.webp [T=image/webp]
</IfModule>
<IfModule mod_headers.c>
Header append Vary Accept env=REQUEST_image
</IfModule>
<IfModule mod_mime.c>
AddType image/webp .webp
</IfModule>