Code Monkey home page Code Monkey logo

phast's People

Contributors

apeschar avatar mathiasreker avatar mkosturkov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

mathiasreker

phast's Issues

Getting Not Found errors on a localhost

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:
`

GET | http://localhost/plugins/vdlp/phast/phast.php/__p__.js/https-3A-2F-2Ffonts.googleapis.com-2Fcss-3Ffamily-3DPoppins-3A300-2C300i-2C400-2C400i-2C500-2C500i-2C600-2C600i-2C700-2C700i-26display-3Dswap/service=css/cacheMarker=3c8b02e196559f4dcc8e077a72150367-2D223565/token=68a6d8a9f861cbc3/__p__.js
-- | --`

Any suggestions? Am I missing something?
Thank you!

SEO friendly URL's

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

Phast console warnings

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

october:mirror command

Hello,

Is there any workaround to make this work for sites with /public document root?

Thanks

phast.php

Hello.
What code do we add to phast.php?

Replace resource URLs by unique IDs

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.

  1. During document handling
    1. Look up any existing ID for a resource by URL and cache salt
    2. If no ID is found, generate a new one by encoding a certain amount of random bytes
  2. On the frontend
    1. Attempt to retrieve a resource using its ID
    2. If that doesn't work, fall back using the existing logic

How do you load the script from the indexeddb to actual scripts tab

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.