Best practices
General
Things to consider as the end result of a web site that keeps the users happy.
Analytics
Generally tracking what pages and functionality is used on a web site and analyzing the data to perform updates is a good idea. But it's important that the correct tracking is put in place. Historically Google Analytics has been the go to solution. And it's a very powerful solution when used correct. But you should be aware that implementing Google Analytics also intrudes on your users privacy and required consent of your users. There are more privacy focused solutions like Fathom Analytics.
Also, implementing tracking scripts might cause negative performance. Always consider the winnings of tracking your users over a potential worse user experience.
Social media sharing
Having a attractive preview of your web site when shared on social media can be an important factor too attract visitors. Most social media platforms tries to fetch information from the page being shared by scraping the first content (text and image). But it is possible to manage this and if a CMS is used this information should be possible to override.
OG tags
To provide the social media platforms with information on how to preview your page, you use Open Graph (OG) tags. Read more on the Open Graph protocol
<head> <meta property="og:title" content="The title of the page" /> <meta property="og:type" content="website" /> <meta property="og:image" content="https://www.itiden.se/static/itiden-share.jpg" /></head>
Browser support
Using modern technology can greatly benefit both your users when it comes to accessability and performance. And the developers by making it possible to use functionality that can speed up development and keeping the code base clean.
Most browser today are being updated to keep up with the newest functionality.
But depending on where the web site is viewed, there might be devices that are not updated. It is important to agree on that browsers to support, both for functionality (everything works) and finish (some styling issues might be OK on older browsers).
To keep your codebase updated but still support older browser we recommend writing your code with modern JavaScript/TypeScript and transpile will Babel and make sure that it uses a preset that matches current browser metrics using Browserslist. This way, when updating your code a year later, some functionality might be built in to most used browsers and the code delivered to the browser can be more performant.
Cache
You do not want to ask your web site visitors to clear their cache. Different file types are cached in the browser for separate timespans (see Performance / Browser cache).
When you need to make sure that a new file is loaded by the browsers, you would either need the users to clear their cache. Or just use a new file name for that file. Make sure often updated files are not cached for a long time in the browser, and if there are a few files that needs updates - use a new file name.
404 page
When a user enters a non existing page on your web site, a "404 page" is shown. This can be caused by a user entering a faulty URL or if a page has been removed or renamed and the user clicks a old link. Make sure that the 404 page shows relevant information and maybe guides the user to find what they might be looking for.
Redirects
If an old site is updated or if the structure of your site is changed, make sure old URL's is redirected to a new page that has similar content. If there is no new page - a 404 page might make better sense. But remember that search engines might have indexed the old URL and that other sites might have links to the page.
To do
Analytics are implemented.
Pages look attractive in social media sharing preview.
The page supports most used browsers.
Potential browser cached files are taken care of.
There is a 404 page.
Required redirects has been added.