<script defer src="https://unpkg.com/@tryghost/portal@~1.0.0/umd/portal.min.js" ....></script><style> .gh-post-upgrade-cta-content ....
I do not use Portal feature as my theme has its own membership sites. After I disabled the Portal feature in Ghost Admin, there should be no Portal code inserted to the site anymore.
Why load scripts and styles even the feature is not used?
Any solution to remove the code?
Is there someway to reduce the size of the package or somehow defer it?
It seems to mess with pagespeed insights scores
time to return to Wordpress LOL
@Boryl No need. Load if locally, not a third party. That way you control its content and more.
The script is also already included with “defer”.
I recommend making sure you run lighthouse in an incognito window as well to ensure you’re getting correct and consistent reports.
We are constantly reviewing the script to keep it as small as possible, and we regularly review lighthouse to ensure there are no issues cropping up. The script is 70kb gzipped, I’m not sure why lighthouse reports it larger but will review this.
Actually, it is a global problem today, due to the misunderstanding of application development in the technologies used.
As a specialist in the optimization of Core Web Vitals, I can contribute that the problem does not come from a file size, but from the language used.