Minimaliseer het aantal requests

  • Frank01
  • Onderwerp Auteur
  • Gebruiker
  • Gebruiker
  • website-portal met toeristische links in de kop van Noord-Holland
Lees meer
22 jan 2021 13:57 #22378 door Frank01
Beantwoord door Frank01 in topic Minimaliseer het aantal requests
Bedankt voor het advies! Ik ga er mee aan de slag! :)
Groeten, Frank
Discussie gesloten.
  • JoopMantel
  • Gebruiker
  • Gebruiker
Lees meer
28 jan 2021 22:46 #22415 door JoopMantel
Beantwoord door JoopMantel in topic Minimaliseer het aantal requests
Frank, ik heb iets voor je dat wellicht de website sneller maakt.

1 - Maak een backup van de .htaccess bestand
2 - open nu het bestand .htaccess
3 - plak de hieronder staande gegevens in het .htaccess bestand.
4 - Kijk direct dat of de website nog in beeld komt.
5 - noteer eventuele fouten die je tegen komt ook al is het een blanco scherm.
6 - kom nadien terug met eventuele problemen die je hebt ondervonden
7 - Krijg je totaal geen fout meldingen, ga dan eens naar GTmetrix en voer eens een test uit, en kijk dat als er enige verschil aanwezig is.

Laat mij het even weten Frank.
Code:
# secure .htaccess file <Files .htaccess> Order allow,deny Deny from all </Files> ErrorDocument 400 400.html ErrorDocument 401 401.html ErrorDocument 403 403.html ErrorDocument 404 404.html ErrorDocument 500 500.html ## No directory listings <IfModule mod_autoindex.c> IndexIgnore * </IfModule> ServerSignature Off SetEnv TZ Europe/Amsterdam AddDefaultCharset UTF-8 <IfModule mod_rewrite.c> RewriteEngine On # To redirect www to non-www, add this code after RewriteEngine On: RewriteCond %{HTTP_HOST} ^www.callantsooginfo.nl [NC] RewriteRule ^(.*)$ https://callantsooginfo.nl/$1 [L,R=301] # End Rewrite </IfModule> ## Suppress mime type detection in browsers for unknown types <IfModule mod_headers.c> Header set Strict-Transport-Security: "max-age=31536000; includeSubDomains; preload" env=HTTPS Header set X-Content-Type-Options "nosniff" Header set X-frame-options "SAMEORIGIN" Header set Referrer-Policy "no-referrer, strict-origin-when-cross-origin" Header set Permissions-Policy: "execution-while-not-rendered=(self); execution-while-out-of-viewport=(self); fullscreen=(self); legacy-image-formats=(self); oversized-images=(self); sync-xhr=(self); geolocation=(none); midi=(none); notifications=(self); push=(self); microphone=(none); camera=(none); magnetometer=(none); gyroscope=(none); speaker=(none); vibrate=(none); fullscreen=(self)'; payment=(none)" Header set Content-Security-Policy: "require-trusted-types-for 'script'; object-src 'self'; frame-ancestors 'self' https://callantsooginfo.nl; base-uri 'self'; form-action 'self'" Header always unset X-Powered-By Header unset X-Powered-By Header set Access-Control-Allow-Origin: "*" Header set Expect-CT: "enforce, max-age=7776000" Header always edit Set-Cookie (.*) "$1; Secure" Header set Content-Language: nl-BE Header set Access-Control-Allow-Headers: "Origin, X-Requested-With, Content-Type, Accept" Header set Access-Control-Allow-Methods: "POST, GET, OPTIONS" Header set Access-Control-Request-Method: "POST" Header set Access-Control-Request-Headers: "X-PINGOTHER, Content-Type" Header set Access-Control-Allow-Credentials: "true" Header set Access-Control-Max-Age: "240" Header set Date: "Sat, 24 Jan 2021 01:40:06 GMT" Header set Last-Modified: "Sat, 24 Jan 2021 07:28:00 GMT" Header set If-Modified-Since: "Sat, 24 Jan 2021 07:28:00 GMT" Header set Expires: "Wen, 02 Dec 1923 20:30:00 GMT" Header set X-Clacks-Overhead: "GNU Terry Pratchett" Header set X-Cache: "MISS from wikipedia.org" </IfModule> ## Can be commented out if causes errors, see notes above. Options +FollowSymlinks Options -Indexes ## Disable inline JavaScript when directly opening SVG files or embedding them with the object-tag <FilesMatch "\.svg$"> <IfModule mod_headers.c> Header always set Content-Security-Policy "script-src 'none'" </IfModule> </FilesMatch> ## Mod_rewrite in use. RewriteEngine On ## Begin - Rewrite rules to block out some common exploits. RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR] RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR] RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR] RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2}) RewriteRule .* index.php [F] # ## End - Rewrite rules to block out some common exploits. ## Begin - Custom redirects # # If you need to redirect some pages, or set a canonical non-www to # www redirect (or vice versa), place that code here. Ensure those # redirects use the correct RewriteRule syntax and the [R=301,L] flags. # ## End - Custom redirects RewriteBase / ## Begin - Joomla! core SEF Section. # RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] # RewriteCond %{REQUEST_URI} !^/index\.php RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule .* index.php [L] # ## End - Joomla! core SEF Section. <ifModule mod_gzip.c> mod_gzip_on Yes mod_gzip_dechunk Yes mod_gzip_item_include file .(html?|txt|css|js|php|pl)$ mod_gzip_item_include handler ^cgi-script$ mod_gzip_item_include mime ^text/.* mod_gzip_item_include mime ^application/x-javascript.* mod_gzip_item_exclude mime ^image/.* mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.* </ifModule> <IfModule mod_mime.c> AddHandler cgi-script .cgi AddType application/manifest+json webmanifest </IfModule> ## BEGIN EXPIRES CACHING - JCH OPTIMIZE ## <IfModule mod_expires.c> # Enable expiration control ExpiresActive on # Perhaps better to whitelist expires rules? Perhaps. ExpiresDefault "access plus 1 year" # cache.appcache needs re-requests in FF 3.6 (thanks Remy ~Introducing HTML5) ExpiresByType text/cache-manifest "access plus 0 seconds" # Your document html ExpiresByType text/html "access plus 0 seconds" # Data ExpiresByType text/xml "access plus 0 seconds" ExpiresByType application/xml "access plus 0 seconds" ExpiresByType application/json "access plus 0 seconds" # Feed ExpiresByType application/rss+xml "access plus 1 hour" ExpiresByType application/atom+xml "access plus 1 hour" # Favicon (cannot be renamed) ExpiresByType image/x-icon "access plus 1 week" # Media: images, video, audio # Media: images, video, audio ExpiresByType image/gif "access plus 1 month" ExpiresByType image/png M3600 ExpiresByType image/jpg M3600 ExpiresByType image/jpeg M3600 ExpiresByType video/mp4 "access plus 1 month" ExpiresByType video/webm "access plus 1 month" # HTC files (css3pie) ExpiresByType text/x-component "access plus 1 month" # Webfonts ExpiresByType application/font-ttf "access plus 1 month" ExpiresByType font/opentype "access plus 1 month" ExpiresByType application/font-woff "access plus 1 month" ExpiresByType application/font-woff2 "access plus 1 month" ExpiresByType image/svg+xml "access plus 1 month" ExpiresByType application/vnd.ms-fontobject "access plus 1 month" # CSS and JavaScript ExpiresByType text/css "access plus 1 year" ExpiresByType type/javascript "access plus 1 year" ExpiresByType application/javascript "access plus 1 year" <IfModule mod_headers.c> Header append Cache-Control "max-age=0, public" <FilesMatch ".(js|css|xml|gz|html)$"> Header append Vary: Accept-Encoding </FilesMatch> </IfModule> </IfModule> <IfModule mod_deflate.c> ########## Begin - ETag Optimization ## This rule will create an ETag for files based only on the modification ## timestamp and their size. ## Note: It may cause problems on your server and you may need to remove it FileETag MTime Size # AddOutputFilterByType is now deprecated by Apache. Use mod_filter in the future. # Enable expiration control ExpiresActive on AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE text/javascript AddOutputFilterByType DEFLATE text/xml AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE image/x-icon AddOutputFilterByType DEFLATE image/svg+xml AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/x-javascript AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE application/xhtml+xml AddOutputFilterByType DEFLATE application/font AddOutputFilterByType DEFLATE application/font-truetype AddOutputFilterByType DEFLATE application/font-ttf AddOutputFilterByType DEFLATE application/font-otf AddOutputFilterByType DEFLATE application/font-opentype AddOutputFilterByType DEFLATE application/font-woff AddOutputFilterByType DEFLATE application/font-woff2 AddOutputFilterByType DEFLATE application/vnd.ms-fontobject AddOutputFilterByType DEFLATE font/ttf AddOutputFilterByType DEFLATE font/otf AddOutputFilterByType DEFLATE font/opentype AddOutputFilterByType DEFLATE font/woff AddOutputFilterByType DEFLATE font/woff2 # For Olders Browsers Which Can't Handle Compression BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html </IfModule> ## END EXPIRES CACHING - JCH OPTIMIZE ##
Discussie gesloten.
  • Rondeb
  • Gebruiker
  • Gebruiker
  • Joomla
Lees meer
14 feb 2021 16:34 #22480 door Rondeb
Beantwoord door Rondeb in topic Minimaliseer het aantal requests
Hoi Frank,

ben je al wat verder gekomen? Als ik de snelheid test is hij nog wel traag.

Groeten Ron :)
Discussie gesloten.
Gemaakt door Kunena