Taco Steemers

A personal blog.

Articles tagged with websites

  1. Dark and light web themes: consider using a hybrid CSS/JS implementation

    Instead of using either CSS media queries for operating system theme preferences or a Javacript-based theme selector we can use both. An automatic CSS-based switching and JS-based switching where the user can choose.

  2. The Twitter share button does not need javascript

    When we let Twitter generate a 'tweet this button' for our website, Twitter includes a javascript file. We don't need to include this javascript file. The share button can be just a hyperlink. Twitter uses the referrer header to determine which URL the user wants to tweet about.

    The javascript …

  3. Please use root relative URLs

    Resources with URLs that do not specify the root will not be loaded if the user visits a subpage directly.

  4. Creating a new website without breaking search engine results and bookmarks

    When moving our website to a different CMS or framework we might end up with a different URL structure. This is bad for search engine rankings and people's bookmarks. To avoid problems we can use rewrite rules and redirect rules.

  5. Notes on making drag-and-drop functionality with Javascript

    When I wanted to make drag and drop functionality I found there were plenty of tutorials out there. I am adding a few more words on the topic because I had to find workarounds for issues that I didn't find mentioned elsewhere.

  6. How to avoid displaying directory listings on your website

    Our websites contain directories with files that are not usually read by humans. Examples are directories containing Javascript files or files for XML feeds. Sometimes we want to disallow directory listings for these directory contents.

  7. How to include HTML documents inside HTML documents

    There are two good ways to include our static HTML documents inside the main HTML documents that make up our website. One is to include them server-side, before the server sends the main HTML document to the web browser. The other is client-side loading where we have Javascript on the …

  8. Programmatically creating scalable vector graphics (SVG)

    This is a small note on programmatically creating scalable vector graphics. For this we use Python with svgwrite which was simply the first tool I found. We will not be comparing different tools.

    When creating graphics for posters, programs, or the web there are some advantages in using scalable vector …

  9. Switched from Wordpress to Pelican

    Over the past two years I've posted some writing on a different domain. That is a shared Wordpress site which hasn't been seeing much love (the other party hasn't made any posts). I've been thinking of also writing some smaller notes, things that I tend to forget and then have …

  10. Something to think about when storing or processing files in your web app

    Recently I saw code that looked like the following:

    function handleFileRequest
        variable file = getFile('storage/${params.filename}')
        send file

    This code readily accepts a user-supplied piece of information to retrieve a file. This is very wrong, luckily it was caught in a code review.

    It is wrong because it allows …