A blog about tech & coding

Get your browser view space back

By Marco on Tue Apr 10 20181 min readtips & tricks

Ever wonder where all your precious view space went on websites like Medium and Hackernoon? On your average full HD display, your reading experience looks somewhat like this:

Take a look at all the distractive elements hindering your reading experience

Thankfully, this can easily be fixed. Simply create a bookmark with the following code and place it in your bookmarks bar:

javascript:(function(){var i,elements=document.querySelectorAll('body *');for(i=0;i<elements.length;i++){if(getComputedStyle(elements[i]).position==='fixed'){elements[i].parentNode.removeChild(elements[i]);}}})();

The following code searches for all the HTML elements that have a style attribute "position:fixed", and removes these elements. If you want the elements back, simply reload the page.

Credits to a HackerNews comment I read sometime ago.

Screenshot of the same article as above after applying the above code snippet. Much better.

Check if gzip support is enabled on your webserver

Gzip is a file format used for file compression and decompression. It is commonly used in HTTP compression to speed up websites. However, this compression technique can be exploited using the BREACH attack. For security reasons, it may be beneficial to disable gzip compression. However, it is not always easy to determine whether gzip support is enabled or disabled. The following curl command provides a simple command-line solution to check whether your webserver supports gzip compression: $ cu

Wed Apr 11 2018