kiboit / phast Goto Github PK
View Code? Open in Web Editor NEWAutomated web page optimization for PHP
Home Page: https://www.phast.io/
License: GNU Affero General Public License v3.0
Automated web page optimization for PHP
Home Page: https://www.phast.io/
License: GNU Affero General Public License v3.0
Hi @apeschar,
Is it possible to document the configuration options which are available in this package? So we can keep track changes in configuration?
We ship this default configuration package with the October CMS plugin:
https://github.com/vdlp/oc-phast-plugin/blob/develop/config.php
I'm not sure if these are all the configuration options available. Just a check up.
Keep doing this awesome work ;-)
I have installed the plugin but are getting the following comments any thoughts on how to rectify
Resource interpreted as Stylesheet but transferred with MIME type text/html: "".
:formatted:2472 [Phast] Client-side performance metrics
:formatted:2579 [Phast] Failed to load CSS {ref: "dYqrF8HzXyw"} undefined
(anonymous) @ :formatted:2579
tryCatch @ :formatted:1633
invokeCallback @ :formatted:1646
publish @ :formatted:1624
publishRejection @ :formatted:1580
flush @ :formatted:1430
characterData (async)
(anonymous) @ :formatted:1406
asap @ :formatted:1368
reject @ :formatted:1598
rejectPromise @ :formatted:1677
(anonymous) @ :formatted:2132
handleError @ :formatted:2131
(anonymous) @ :formatted:2107
successHandler @ :formatted:1994
load (async)
makeRequest @ :formatted:2003
flush @ :formatted:1982
setTimeout (async)
(anonymous) @ :formatted:1967
initializePromise @ :formatted:1674
Promise @ :formatted:1816
get @ :formatted:1959
(anonymous) @ :formatted:1931
tryCatch @ :formatted:1633
invokeCallback @ :formatted:1646
publish @ :formatted:1624
publishRejection @ :formatted:1580
flush @ :formatted:1430
characterData (async)
(anonymous) @ :formatted:1406
asap @ :formatted:1368
fulfill @ :formatted:1589
resolve @ :formatted:1573
resolvePromise @ :formatted:1675
request.onsuccess @ :formatted:2229
IndexedDB (async)
(anonymous) @ :formatted:2152
tryCatch @ :formatted:1633
invokeCallback @ :formatted:1646
publish @ :formatted:1624
flush @ :formatted:1430
characterData (async)
(anonymous) @ :formatted:1406
asap @ :formatted:1368
fulfill @ :formatted:1589
handleMaybeThenable @ :formatted:1559
resolve @ :formatted:1571
resolvePromise @ :formatted:1675
request.onsuccess @ :formatted:2229
IndexedDB (async)
openDB @ :formatted:2275
get @ :formatted:2259
openStore @ :formatted:2175
get @ :formatted:2151
get @ :formatted:2317
get @ :formatted:2305
get @ :formatted:1925
(anonymous) @ :formatted:2575
phast.scripts.phast.forEachSelectedElement @ :formatted:2397
(anonymous) @ :formatted:2571
(anonymous) @ :formatted:1325
phastScripts @ :formatted:3042
(anonymous) @ :formatted:3044
:formatted:2585 [Phast] Falling back to element for http://test.com/themes/drift-in-laundry/assets/css/stroke7/stroke7-icon-font.min.css
:formatted:2579 [Phast] Failed to load CSS {ref: "zzEWrFMp_Rw"} undefined
(anonymous) @ :formatted:2579
tryCatch @ :formatted:1633
invokeCallback @ :formatted:1646
publish @ :formatted:1624
publishRejection @ :formatted:1580
flush @ :formatted:1430
characterData (async)
(anonymous) @ :formatted:1406
asap @ :formatted:1368
reject @ :formatted:1598
rejectPromise @ :formatted:1677
(anonymous) @ :formatted:2132
handleError @ :formatted:2131
(anonymous) @ :formatted:2107
successHandler @ :formatted:1994
load (async)
makeRequest @ :formatted:2003
flush @ :formatted:1982
setTimeout (async)
(anonymous) @ :formatted:1967
initializePromise @ :formatted:1674
Promise @ :formatted:1816
get @ :formatted:1959
(anonymous) @ :formatted:1931
tryCatch @ :formatted:1633
invokeCallback @ :formatted:1646
publish @ :formatted:1624
publishRejection @ :formatted:1580
flush @ :formatted:1430
characterData (async)
(anonymous) @ :formatted:1406
asap @ :formatted:1368
fulfill @ :formatted:1589
resolve @ :formatted:1573
resolvePromise @ :formatted:1675
request.onsuccess @ :formatted:2229
IndexedDB (async)
(anonymous) @ :formatted:2152
tryCatch @ :formatted:1633
invokeCallback @ :formatted:1646
publish @ :formatted:1624
flush @ :formatted:1430
characterData (async)
(anonymous) @ :formatted:1406
asap @ :formatted:1368
fulfill @ :formatted:1589
handleMaybeThenable @ :formatted:1559
resolve @ :formatted:1571
resolvePromise @ :formatted:1675
request.onsuccess @ :formatted:2229
IndexedDB (async)
openDB @ :formatted:2275
get @ :formatted:2259
openStore @ :formatted:2175
get @ :formatted:2151
get @ :formatted:2317
get @ :formatted:2305
get @ :formatted:1925
(anonymous) @ :formatted:2575
phast.scripts.phast.forEachSelectedElement @ :formatted:2397
(anonymous) @ :formatted:2571
(anonymous) @ :formatted:1325
phastScripts @ :formatted:3042
(anonymous) @ :formatted:3044
:formatted:2585 [Phast] Falling back to element for http://test.com/modules/system/assets/css/framework.extras-min.css"
it appears to be something to do with stroke7-icon-font.min.css and framework.extras-min.css
Hello @apeschar,
First of all thanks for the great plugin. I have few questions and trying to learn how the plugin works under the hood.
I see you send the XHR request and loads all the scripts in the indexed db.
But after that how do you load the scripts into SCRIPTS TAG because i do not see any JS file request sending in the Chrome developer tools.
It would be helpful if you give me some insight on this how are you loading the scripts from indexdb to actual <script>
tag ?
Thanks
Hello,
Is there any workaround to make this work for sites with /public document root?
Thanks
Hi!
Trying to test the plug-in on localhost with a October CMS. This CMS have a plug-in wrapper for phast
.
All settings are default.
I've set the .htaccess
as it's documented:
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
##
## You may need to uncomment the following line for some hosting environments,
## if you have installed to a subdirectory, enter the name here also.
##
# RewriteBase /
##
## Uncomment following lines to force HTTPS.
##
# RewriteCond %{HTTPS} off
# RewriteRule (.*) https://%{SERVER_NAME}/$1 [L,R=301]
##
## Black listed folders
##
RewriteRule ^bootstrap/.* index.php [L,NC]
RewriteRule ^config/.* index.php [L,NC]
RewriteRule ^vendor/.* index.php [L,NC]
RewriteRule ^storage/cms/.* index.php [L,NC]
RewriteRule ^storage/logs/.* index.php [L,NC]
RewriteRule ^storage/framework/.* index.php [L,NC]
RewriteRule ^storage/temp/protected/.* index.php [L,NC]
RewriteRule ^storage/app/uploads/protected/.* index.php [L,NC]
##
## White listed folders
##
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_URI} !^/plugins/vdlp/phast/phast\.php*
RewriteCond %{REQUEST_FILENAME} !/.well-known/*
RewriteCond %{REQUEST_FILENAME} !/storage/app/uploads/.*
RewriteCond %{REQUEST_FILENAME} !/storage/app/media/.*
RewriteCond %{REQUEST_FILENAME} !/storage/temp/public/.*
RewriteCond %{REQUEST_FILENAME} !/themes/.*/(assets|resources)/.*
RewriteCond %{REQUEST_FILENAME} !/plugins/.*/(assets|resources)/.*
RewriteCond %{REQUEST_FILENAME} !/modules/.*/(assets|resources)/.*
RewriteRule !^index.php index.php [L,NC]
##
## Block all PHP files, except index
##
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_URI} !^/plugins/vdlp/phast/phast\.php*
RewriteCond %{REQUEST_FILENAME} \.php$
RewriteRule !^index.php index.php [L,NC]
##
## Standard routes
##
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
But getting Not Found
errors:
`
Any suggestions? Am I missing something?
Thank you!
Currently Phast uses full URLs to request resources from the bundler, along with a signature and a cache salt. This leads to quite long URLs that don't always fit in a single TCP packet, leading GTmetrix to complain, rightly.
Instead, we could generate an ID number for each resource encountered in the document, and use that ID number when retrieving the resource.
Are there any settings that change the way the image url's are generated to make them more seo friendly? Either that or some way to turn off the image manipulation all together?
Thanks
Hello.
What code do we add to phast.php?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.