UI / UX
October 13, 2018
How to Enable Text Selection in PDF.JS
By default PDF.JS does not enable text selection in rendered PDFs. To enable text selection, another method needs to be called that renders the PDF text in a separate text layer.
October 8, 2018
July 6, 2018
The very useful PDF.JS library makes it possible to show a preview of the PDF before uploading to server.
July 4, 2018
Showing a preview of the image before being uploaded to server provides a good user experience. You can show a preview image using the URL.createObjectURL method on the selected file.
June 28, 2018
The Useful <time> HTML Element
The time tag defines date and time in a HTML document. This tag is helpful in making the markup more structured, so that it becomes easier for machines to interpret the page.
June 26, 2018
June 19, 2018
June 18, 2018
This tutorial explains how you can change url parameters - edit, add or delete, using the URL and URLSearchParams objects.
June 13, 2018
The feature of copying something to the OS clipboard is quite useful for the end user. In a web page it can be implemented with the Selection API.
June 11, 2018
The URL and URLSearchParams objects makes it very easy to get parameters in a url.
June 7, 2018
June 5, 2018
Typing effect is a good way to grab user attention. To implement typing effect, you can start by showing the first character initially; after a few milliseconds you can show the first 2 characters; and so on till the whole sentence has been shown.
June 3, 2018
February 12, 2018
Width and height of an image can be found using the "naturalWidth" and "naturalHeight" properties of the image DOM element.
February 6, 2018
February 4, 2018
November 6, 2017
Changing Size of Iframe Automatically to Fit Content
You can inform the parent about the changed size of the iframe page by passing messages from the iframe to the parent. This is helpful in preventing scrollbars from coming up.
November 5, 2017
Tracking Downloads with Google Analytics using Custom Events
November 3, 2017
Setting HTTP Headers in a Beacon Request
The Beacon API extracts the type of the transmitted data, and sets this as the Content-Type for the HTTP request.
November 2, 2017
Sending AJAX Data when User Moves Away / Exits from Page
It is sometimes required that your application sends an AJAX to the server before the user moves away from the page (goes to another page, reloads the page, closes the browser etc). The tutorial explains how to do this.
© UsefulAngle.com 2018. All code MIT license.
About / Contact