17

@Fast-Nop This one's for you, buddy. Took me all freaking day to figure out how to avoid unsafe-inline when registering a service worker. XD

Comments
  • 2
  • 0
    @AmyShackles congrats! *bowing in reverence* :-)

    I'm using the hash method a lot for embedding CSS and JS in the HTML and slap the hash into my .htaccess.
  • 1
    @Fast-Nop That’s what I ended up doing! Though I didn’t find a better way to be able to allow webp other than passing ‘data:’ as an allowed scheme to ‘img-src’ and I am annoyed. -_-
  • 0
    @AmyShackles mh for images, I only use inline SVG, not raster ones. For rasters that don't load via the img-tag with URL, but via CSS, I also have preload in the associated HTML to cut down the chaining.
  • 1
    @Fast-Nop I was just doing the fancy “next gen format” thing to get a higher score on the DevTool audit. -_-
  • 0
    @AmyShackles I got a 100% for my images without webp by running the JPGs through optimizilla.com . :-)

    Also, I avoid PNG for cut out photo pictures with transparent background. The easy way is adding another plane with the desired colour in GIMP, moving that down the stack, flatten the image and export as JPG. The drawback is that I need to do this again in case I change the background colour, but that's the price for a handcrafted speed hack.
  • 1
    @Fast-Nop Oh man, that’s amazing. Thanks! :)
Your Job Suck?
Get a Better Job
Add Comment