Skip to content

Commit

Permalink
Removed UA completely, added Wikipedia URL option, Stale-While-Revali…
Browse files Browse the repository at this point in the history
…date cache added, Brotli compression added

#1639 #1844
  • Loading branch information
chrisblakley committed Aug 21, 2024
1 parent d6ccb43 commit b868f6c
Show file tree
Hide file tree
Showing 22 changed files with 76 additions and 60 deletions.
2 changes: 1 addition & 1 deletion .github/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "nebula-wp",
"title": "Nebula",
"description": "Advanced Starter WordPress Theme for Developers",
"version": "12.2.25.642",
"version": "12.3.21.479",
"homepage": "https://gearside.com/nebula/",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion Nebula-Child/assets/css/admin.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 32 additions & 16 deletions Nebula-Child/resources/htaccess-root.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#@TODO: Move to root directory.
#@TODO: Rename this file to be: .htaccess

############################
#############################
# WordPress
############################
#############################

#BEGIN WordPress
<IfModule mod_rewrite.c>
Expand All @@ -16,7 +16,7 @@
</IfModule>
#END WordPress

###################
#############################
#@TODO: Pick one of the following: Force no-www -or- Force www
#Ensure the WordPress Address and Site Address settings match this choice! (WordPress Admin > Settings > General)

Expand All @@ -29,12 +29,28 @@
#RewriteEngine On
#RewriteCond %{HTTP_HOST} !^www\.
#RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]
###################
#############################

############################
#############################
# Compression
# Conditionals for various Apache versions and enabled modules
############################
#############################

<IfModule mod_brotli.c>
FilterDeclare BROTLI_COMPRESS

#Specify content types to compress
FilterProvider BROTLI_COMPRESS BROTLI "%{CONTENT_TYPE} =~ m#^text/(html|css|plain|xml|x-component)#i"
FilterProvider BROTLI_COMPRESS BROTLI "%{CONTENT_TYPE} =~ m#^application/(javascript|json|xml|xhtml+xml|rss+xml|atom+xml|vnd.ms-fontobject|x-font-ttf|x-font-woff|wasm)#i"
FilterProvider BROTLI_COMPRESS BROTLI "%{CONTENT_TYPE} =~ m#^image/(svg+xml)#i"
FilterProvider BROTLI_COMPRESS BROTLI "%{CONTENT_TYPE} = 'font/opentype'"

FilterChain BROTLI_COMPRESS
FilterProtocol BROTLI_COMPRESS BROTLI change=yes;byteranges=no

#Brotli compression quality (optional, defaults to 5, range is 0-11)
BrotliCompressionQuality 6
</IfModule>

<IfModule mod_deflate.c>
#Force deflate for mangled headers
Expand Down Expand Up @@ -144,15 +160,15 @@
</IfModule>
</IfModule>

############################
#############################
# Caching
############################
#############################

<IfModule mod_expires.c>
#Cache files for certain lengths of time
#1 Year
<FilesMatch "\.(ico|pdf|flv|png|gif|jpg|jpeg|svg|woff|woff2|mp3|css)$">
Header set Cache-Control "max-age=31536000, public"
Header set Cache-Control "max-age=31536000, stale-while-revalidate=2592000, public"
</FilesMatch>

#1 Week (This is the minimum recommended by Google)
Expand All @@ -165,7 +181,7 @@
#10 Hours
# PHP/HTML here to prevent nonce from expiring in cache
<FilesMatch "\.(php|html)$">
Header set Cache-Control "max-age=36000, public"
Header set Cache-Control "max-age=36000, public, vary: User-Agent"
</FilesMatch>

#Disable Cache for filetypes
Expand Down Expand Up @@ -200,16 +216,16 @@
</IfVersion>
</IfModule>

############################
#############################
# Redirects
############################
#############################

#If in a subdirectory, prepend that directory to all redirects.
RedirectMatch 301 /wp-content/index.php /

############################
#############################
# Files & Connections
############################
#############################

<IfModule mod_headers.c>
#Keep connections alive
Expand All @@ -226,9 +242,9 @@ RedirectMatch 301 /wp-content/index.php /
AddType text/javascript js mjs
</IfModule>

############################
#############################
# Security
############################
#############################

#Forbid HTTP access to certain WordPress core PHP files
<IfModule mod_rewrite.c>
Expand Down
2 changes: 1 addition & 1 deletion Nebula-Child/resources/sw.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//BEGIN automated edits. These will be automatically overwritten.
const THEME_NAME = 'nebula-child';
const NEBULA_VERSION = 'v12.2.25.642'; //Thursday, July 25, 2024 3:24:52 PM
const NEBULA_VERSION = 'v12.3.21.479'; //Wednesday, August 21, 2024 11:30:22 AM
const OFFLINE_URL = 'https://nebula.gearside.com/offline/';
const OFFLINE_IMG = 'https://nebula.gearside.com/wp-content/themes/Nebula-main/assets/img/offline.svg';
const META_ICON = 'https://nebula.gearside.com/wp-content/themes/Nebula-main/assets/img/meta/android-chrome-512x512.png';
Expand Down
4 changes: 2 additions & 2 deletions Nebula-Child/style.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions assets/css/admin.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/critical.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions assets/css/login.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b868f6c

Please sign in to comment.