Hacker News new | past | comments | ask | show | jobs | submit login

"Last year, Grammarly was loading a 1.3 MB Grammarly.js file on every page. Now on most websites only a 112 KB Grammarly-check.js script is loaded. Only if, for example, the user focuses on a text area does the extension load the full Grammarly.js file." I have to wonder if this could be somehow avoided...



You can bundle js files in extensions… That being said parsing 1.3 of cached JS every site hit is pretty silly. No clue why their “check” js is even 100k. That’s a lot of minified js!


> "only a 112 KB Grammarly-check.js script"

Just that requires 112KB? Seems easily an order of magnitude bigger than it ought to be.


Can you expand on this? You make it seem obvious but I'm really not sure what you're referring to.


it's comparable to website frontend and backend. While there's a single, big instance of the server in the back, there are many clients rendering their small part in the front.

Each time you refresh, only the client is reloaded. To reduce loading times, you should have small clients and let the server so the heavy lifting.


An extension consists of a thin content script loaded into each page that exchanges messages with a long-running background script. Normally you'd make the content script as thin as possible and make the background script do the real work.


I avoid it by not installing Grammarly?


It could've been cached once and used repeatedly if only the Web had not become so hostile that browsers were forced to enforce same-origin...


What makes you think that it's being loaded over the network? It's most likely loading it from fs directly.


Parsing a blob that huge does impact performance though.


It does, but caching/same-origin policies wouldn't change anything in this case.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: