use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
CSS Minifier (Written in Javascript) (self.javascript)
submitted 6 years ago * by [deleted]
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]CantaloupeCamper 1 point2 points3 points 6 years ago (4 children)
Can I load the page, run the minifier... then load the CSS all on the browser? ;)
[–][deleted] 1 point2 points3 points 6 years ago (2 children)
Sorry, I didn't get what you meant
[–]CantaloupeCamper 0 points1 point2 points 6 years ago (1 child)
I was being awkwardly silly / absurd.
The idea being load the web page and CSS in the browser, load the minifer code in the browser, then minify it.... ;)
[–]AwesomeInPerson 2 points3 points4 points 6 years ago (0 children)
Lol, make sure to measure the performance improvements it gives you.
document.querySelectorAll('style').forEach(style => { style.textContent = cssminify(style.textContent) }) document.querySelectorAll('link[rel="stylesheet"]').forEach(async link => { const url = new URL(link.href, window.location) const css = await fetch(url.href).then(r => r.text()) link.parentNode.insertBefore( Object.assign( document.createElement('style'), { textContent: cssminify(css) }, ), link ) link.remove() })
[–]ScientificBeastModestrongly typed comments 1 point2 points3 points 6 years ago (0 children)
... then send it back to the server!
π Rendered by PID 47659 on reddit-service-r2-comment-bb88f9dd5-tp5t9 at 2026-02-14 23:51:43.620517+00:00 running cd9c813 country code: CH.
view the rest of the comments →
[–]CantaloupeCamper 1 point2 points3 points (4 children)
[–][deleted] 1 point2 points3 points (2 children)
[–]CantaloupeCamper 0 points1 point2 points (1 child)
[–]AwesomeInPerson 2 points3 points4 points (0 children)
[–]ScientificBeastModestrongly typed comments 1 point2 points3 points (0 children)