website development

HTTP 404 response causes forced downloads to fail

An interesting gotcha that I stumbled across recently, sending a 404 response code with a download forced by Content-Disposition: attachment will fail but inline content will still be displayed. This behaviour was tested in both Chrome and FireFox. Of course the appropriate response code should always be sent; this 404 response code was being sneaked in by WordPress and led to hours of frustration.… Read the rest “HTTP 404 response causes forced downloads to fail”

Yoast’s Google Analytics for WordPress plugin rewrites links bug

So Yoast’s Google Analytics for WordPress plugin has a somewhat annoying “bug”, or oversight rather , where it rewrites relative link URLS to full URLs, including anchors. For example, <a href="#anchor"> becomes <a href="https://planetjon.ca/blah/#anchor">. There is more information about this on the wordpress forums.… Read the rest “Yoast’s Google Analytics for WordPress plugin rewrites links bug”