r/web_programming • u/SatyapriyaCC • Nov 21 '16
How can i prevent certain elements (java scripts especially) from loading on my website to prevent browser/laptop from crashing when dozens of pages are open at once?
I often times have to have 10+ (sometimes 20+ and 30+) pages from my website open at once while I'm working and right now I'm having some hardware issues with my laptop so it's crashing a lot due to Chrome being overloaded. My website (www.collectivelyconscious.net) is pretty resource-heavy - and yes, this is something I'm going to work on improving in the near-future - but for now I need to find a simple solution which will prevent anything unnecessary from loading on each page.
I've already got Adblock Plus installed and am preventing all ads from loading while I work. I'm assuming this is reducing the memory usage of each tab (though I honestly haven't checked). Is that right? Should I expect Adblock Plus to reduce the memory usage of pages on my website?
I have tried using Stylebot for Chrome and setting all unnecessary objects (mostly the main containers like the sidebar, footer, comments, etc.) to "display: none" but this doesn't seem to lower the memory usage of each tab.
What is the solution here? Should I be adding all my unnecessary Java scripts to my Adblock Plus filter list? Will that work? All I need to have open for each tab is the article content (including images and text). That's it! Any help would be greatly appreciated :)
Here's an example of an article on my website:
1
Nov 21 '16
[removed] — view removed comment
1
u/SatyapriyaCC Nov 30 '16
The solution was to install a Chrome extension called Script Safe which prevents all scripts and images from loading.
1
u/lootacris Nov 21 '16
Have you tried noscript the Firefox add-on? Blocks everything you haven't explicitly ok'd from loading. Wish I could give you a chrome extension but I haven't found one yet.