Category: Coding

  • Resolved: TWA App not working fullscreen when downloaded from Play Store

    To hide the address bar in a TWA app, you must have setup and asset links file on our server with valid SHA certificate fingerprint. Sometimes the app works fine when we test it by directly installing through apk, but address bar is shown when we download the app from play store. The reason for […]

  • How to track if a web page is opened in TWA app

    The Trusted Web Activity (TWA) in Chrome has made it so easy to package and publish any website as an app. But the problem arises when we want to track when your website was opened inside the TWA app. Usually we can easily do this in a webview app by appending a custom string to […]

  • How to persist state through query string in url

    In some cases when you do not have the option of cookies to manage state, query string can be a good option. In this article, I am going to use some Javascript to persist state through a query string in the url. The Javascript code is added to head section of html when the desired […]

  • Modify page title tag in WordPress

    To change page title tag in WordPress, use the pre_get_document_title filter. Most of the answers on web have mentioned the filter wp_title, but do not use it as wp_title function will be deprecated in future and wp_title hook will not work. At present, wp_title filter does not work when modifying the title tag.

  • Prevent Form Resubmission on Page Refresh

    We face a common issue on many websites that whenever a form submits to the same page, and then we refresh the page, the form data is submitted again. Sometimes the browser asks for confirmation, sometimes it does not. It becomes really frustrating if it causes an operation to happen twice. To prevent this on […]

  • Make Javascript sequential with “async” and “await”

    Javascript code can be easily made sequential with the help of two simple, yet very powerful keywords “async” and “await”.

  • Javascript: Loop over querySelectorAll without error

    Javascript code

    In Javascript, there are a lot of instances when you want to find multiple elements on a page to apply a common operation to all of them. Suppose you want to hide elements of a particular class present on your web page. To do this, first get an array of all such elements using querySelectorAll […]