Tips for (Static) Website Optimization

Tips for (Static) Website Optimization

Too long, didn’t read

  • Try to keep page load smaller than 50KB per request if you’re not dealing with images, a webpage should never be larger than a copy of Doom . Don’t add 10MB images to your site, generate thumbnails and compress them; link to the bigger images if needed.
  • Try to serve progressive JPEG images and stay away from Google’s WebP format.
  • Self-host everything.
  • Use HTTPS if you have login forms, process user data and such.
  • DO NOT use Javascript to manage links. Linking in HTML is a solved problem, don’t add an extra unnecessary layer.
  • DO NOT track your website visitors or if you must do it, get consent.
  • Load everything from the same domain or subdomain.
  • Have a responsive design for your website as a lot of people use smartphones now.
  • DO NOT geoblock your visitors.
  • Keep in mind that some people have Javascript disabled in their browser; plan accordingly for a failsafe and do not greet them with a blank page. It’s rude.
  • Inline critical CSS in a <style> tag.
  • Try to inline images/js smaller than 4KB. Favicons are a good candidate for that.
  • Minify and compress everything. Use gzip. Leverage browser caching.
  • DO NOT override scroll events.
  • Basically a webpage should load in 300ms or less.
  • Please for the love of your favorite divinity do not use Cloudflare. Your visitors don’t need to prove they are not robots while robots get free access to your website anyway. Just don’t.

Let’s begin.

The Russia Discourse is More Reckless and Dangerous Than Ever

But over the last four years, Americans, particularly those who feed on liberal media outlets, have been drowned in so much mythology about the U.S. and Russia that they have no capacity to critically assess the claims being made, and — just as they were led to believe about “Russia’s 2016 interference in Our Sacred Elections” — are easily convinced that what Russia did is some shocking and extreme crime the likes of which are rarely seen in international relations. In reality, their own government is the undisputed world champion in perpetrating these acts, and has been for years if not decades.

[…]

What we have here, yet again, is the classic operation of the intelligence community feeding serious accusations about a nuclear-armed power to an eagerly gullible corporate media, with the media mindlessly disseminating it without evidence, all toward ratcheting up tensions between these two nuclear-armed powers and fortifying a mythology of the U.S. as grand victim but never perpetrator.

Glenn Greenwald

Dawn of Man

Dawn of Man

Introduction

Dawn of Man is a survival and city-builder that takes place during the Stone Age that is being developed by Madruga Works .

Players take control of a settlement of the first modern humans, to guide them through the ages in their struggle for survival. The game starts during the Stone Age, and takes builds up to the Iron Age, spanning more than 10,000 years of human prehistory. Players will need to get their people to survive, expand and evolve, just like our ancestors, face challenges that nature will throw at them. Wikipedia

Docker project template for local development

Docker project template for local development

Sometimes I need to spin a Docker container really quick so I can test stuff locally and the quickest way (for me) is to keep a project template somewhere on the disk so I can quickly copy it, add the web app and test it. Ofc there are other alternatives. Ofc some are better. Ofc some are faster. But this one is mine.

The container will be configured with:

  • latest Apache web server with SSL and mod_rewrite.
  • PHP 7.4 with bz2, iconv, intl, gettext, mbstring, mysqli, pdo_mysql, soap, zip, gd, exif.
  • MySQL database server version 8.0

The directory structure of the project template is the one below:

.
├── Dockerfile
├── certs
├── config
│   └── default-ssl.conf
├── db
├── docker-compose.yml
└── www
	└── index.html

Law Enforcement Is Accessing Locked Devices Quite Well, Thank You

But a new report shows the widespread use by law enforcement of tools that circumvent those technical barriers. The report from Upturn, a Washington, D.C.-based civil society organization, zeroes in on law enforcement use of mobile device forensic tools (MDFTs).

These hardware and software tools collect forensic data from mobile phones: the texts, emails, and photos stored on the phone; data regarding when the texts and emails were sent and where the photos were taken; the locations—if location tracking tools are turned on—where the phone and, presumably, the user have been; and when they were there.

According to the report, 2,000 of the United States’s 18,000 law enforcement agencies, including 50 of the nation’s largest police departments, either have purchased MDFTs or have access to these tools.

Susan Landau