Coder Social home page Coder Social logo

google-marketing-solutions / prefetchalyzer Goto Github PK

View Code? Open in Web Editor NEW
11.0 5.0 7.0 3.57 MB

Identify impactful pre-fetch and pre-cache opportunities across web pages in user flow by analyzing HAR logs

Home Page: https://gtech-professional-services.github.io/prefetchalyzer/

License: Apache License 2.0

JavaScript 1.83% HTML 0.77% Vue 52.06% TypeScript 43.89% SCSS 1.44%
har prefetch precache javascript performance web webperf

prefetchalyzer's Introduction

Prefetchalyzer

A tool that helps you identify the impact of applying prefetch strategies on your web app resources by analyzing pages across a simulated user's journey on the site

Demo Screen

Features

  • Generates an impact report highlighting:

    • The assets that can be prefetched and on which page to get the best savings
    • Savings in kB for each page navigation when applying prefetch
    • Issues with Cache-Control on frequently used critical assets
  • Exporting results

    • Generates HTML code prefetch statements based on selected resources
    • Generates code for WebPageTest scripts to test prefetch impact

Getting started

The easiest way to start using Prefetchalyzer is by using the hosted version available here.

Project setup

The project was generated with vue-cli.

npm install --legacy-peer-deps

For VSCode, Vetur extension is used to format the .vue files. Following settings are made in settings.json:

{
    "git.ignoreLimitWarning": true,
    "vetur.format.defaultFormatterOptions": {
        "prettier": {
            "stylelintIntegration": true,
            "eslintIntegration": true,
            "semi": false,
            "singleQuote": true,
            "tabWidth": 2,
            "tabs": false,
            "trailingComma": "none",
            "printWidth": 160
        }
    }
}

Compiles and hot-reloads for development

npm start

Compiles and minifies for production

npm run build

Lints and fixes files

npm run lint

Customize configuration

See Configuration Reference.

TODO Workflow Deployment

      - name: "Deploy \U0001F680"
        uses: JamesIves/[email protected]
        with:
          GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
          BRANCH: gh-pages
          FOLDER: dist
          CLEAN: true 

Authors

Disclaimer

This is not an officially supported Google product.

prefetchalyzer's People

Contributors

adamread avatar aymanfarhat avatar nenuadrian avatar pianomister avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

prefetchalyzer's Issues

Security Policy violation Outside Collaborators

This issue was automatically created by Allstar.

Security Policy Violation
Found 1 outside collaborators with admin access.
This policy requires users with this access to be members of the organisation. That way you can easily audit who has access to your repo, and if an account is compromised it can quickly be denied access to organization resources. To fix this you should either remove the user from repository-based access, or add them to the organization.

OR

If you don't see the Settings tab you probably don't have administrative access. Reach out to the administrators of the organisation to fix this issue.

OR

  • Exempt the user by adding an exemption to your organization-level Outside Collaborators configuration file.

This issue will auto resolve when the policy is in compliance.

Issue created by Allstar. See https://github.com/ossf/allstar/ for more information. For questions specific to the repository, please contact the owner or maintainer.

Npm run serve gives Error: error:0308010C:digital envelope routines::unsupported

Fix:
export NODE_OPTIONS=--openssl-legacy-provider

For:

npm run serve

> [email protected] serve
> vue-cli-service serve

INFO  Starting development server...
Starting type checking service...
Using 1 worker with 2048MB memory limit
10% building 2/2 modules 0 active(node:87168) [DEP0111] DeprecationWarning: Access to process.binding('http_parser') is deprecated.
(Use `node --trace-deprecation ...` to show where the warning was created)
10% building 2/5 modules 3 active ...node_modules/eslint-loader/index.js??ref--13-0!/Users/nenuadrian/Desktop/prefetchalyzer/src/main.tsnode:internal/crypto/hash:71
 this[kHandle] = new _Hash(algorithm, xofLen);
                 ^

Error: error:0308010C:digital envelope routines::unsupported
   at new Hash (node:internal/crypto/hash:71:19)
   at Object.createHash (node:crypto:133:10)
   at module.exports (/Users/nenuadrian/Desktop/prefetchalyzer/node_modules/webpack/lib/util/createHash.js:135:53)
   at NormalModule._initBuildHash (/Users/nenuadrian/Desktop/prefetchalyzer/node_modules/webpack/lib/NormalModule.js:417:16)
   at handleParseError (/Users/nenuadrian/Desktop/prefetchalyzer/node_modules/webpack/lib/NormalModule.js:471:10)
   at /Users/nenuadrian/Desktop/prefetchalyzer/node_modules/webpack/lib/NormalModule.js:503:5
   at /Users/nenuadrian/Desktop/prefetchalyzer/node_modules/webpack/lib/NormalModule.js:358:12
   at /Users/nenuadrian/Desktop/prefetchalyzer/node_modules/loader-runner/lib/LoaderRunner.js:373:3
   at iterateNormalLoaders (/Users/nenuadrian/Desktop/prefetchalyzer/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
   at Array.<anonymous> (/Users/nenuadrian/Desktop/prefetchalyzer/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
   at Storage.finished (/Users/nenuadrian/Desktop/prefetchalyzer/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
   at /Users/nenuadrian/Desktop/prefetchalyzer/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
   at /Users/nenuadrian/Desktop/prefetchalyzer/node_modules/graceful-fs/graceful-fs.js:123:16
   at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3) {
 opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
 library: 'digital envelope routines',
 reason: 'unsupported',
 code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v18.12.1

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.