When building web applications, it’s often necessary to access and manipulate the current URL in the web browser. JavaScript provides a simple and easy way to get the current URL in the browser, which can be useful for a wide range of purposes, from tracking user behavior to implementing dynamic navigation menus. In this article, we’ll explore how to get the current URL in the web browser using JavaScript. We’ll cover two methods: using the window.location property and using the document.URL property. Method 1: Using the window.location Property The “window.location” property provides information about the current URL in the browser.…
Author: Rahul
Linux/Unix systems keep the details of the system uptime. You may also need to know when the server is running. This tutorial we will use Linux uptime command. What is Uptime? The uptime is the amount of time a system is continuously running since the last start/restart. Check System Uptime in Linux You can use the uptime command to find the system uptime. Uptime command is available under procps package. This command also provides the current system time, number of logged in users and current CPU load. uptime 07:33:31 up 174 days, 5:12, 2 users, load average: 0.17, 0.14, 0.17…
Apache Maven is a powerful project management tool used for managing a project’s build, reporting, and documentation from a central piece of information. If you’re working on Java projects, Maven can help streamline your development process. This guide will walk you through the process of installing Apache Maven on a Windows system. Requirements Before we begin, ensure you have the following prerequisites installed on your system: Java Development Kit (JDK): Maven requires JDK to be installed on your system. You can download it from the official Oracle website or use an OpenJDK version. Ensure that you install JDK, not just…
Cross-Origin Resource Sharing (CORS) is an essential security feature for modern web applications, allowing web browsers to request resources from different domains securely. By default, web browsers enforce the same-origin policy, which prevents web pages from making requests to a different domain than the one that served the web page. However, sometimes it is necessary to allow cross-origin requests for web applications to function correctly. In this article, we will guide you through enabling CORS in Apache, a widely-used web server, to allow cross-origin requests for your web applications. Step 1: Enable Apache Headers Module To enable CORS in Apache,…
Python 3.6.10 is the latest stable version at the time of writing of tutorial. This Python version is available to download and install. This article will help you to install Python 3.6.10 on Ubuntu and Linuxmint operating system. To know more about this version visit Python official website. Step 1 – Prerequsities Use the following command to install prerequisites for Python before proceeding to the next steps. sudo apt-get install build-essential checkinstall sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev Step 2 – Download Python 3.6 Download Python using following command from python official site. You can…
PostgreSQL is an open source object-relational database system. It is one of leading database server used for production servers. This tutorial will help you to install the PostgreSQL database server on Debian 8 Jessie systems. How to Install PostgreSQL on Ubuntu Step 1 – Prerequsities First, you need to import PostgreSQL packages signing key on your system. Use the below command to import the key. wget -q https://www.postgresql.org/media/keys/ACCC4CF8.asc -O – | sudo apt-key add – Now add PostgreSQL apt repository in your system as per your operating system. These are suggested on official PostgreSQL website using following command. sudo sh…
Checking the system reboot history is an important task for system administrators in Linux. Knowing when the system was last rebooted can help in troubleshooting issues and planning for maintenance tasks. One of the ways to check system reboot history in Linux is by using the last command. The last command displays a list of all system logins and logouts, including system reboots. By default, the last command displays the information in reverse chronological order, with the most recent events at the top of the output. Check Last Reboot History Mostly Linux/Unix systems provide the last command, which provides us…
PHP 7.2 is the latest stable release available for the installation. This tutorial will help you with the installation of multiple PHP versions on your system. Now follow this tutorial to Install PHP on Debian 8 Jessie. Prerequisites Login to your Debian 8 system using shell access. For remote systems connect with SSH. Windows users can use Putty or other alternatives applications for SSH connection. ssh root@debian8 Run below commands to upgrade the current packages to the latest version. sudo apt update sudo apt upgrade Enable PHP PPA on Debian 8 Let’s execute the following commands to install the required…
Apache Maven is a software project management and comprehension tool. Maven can manage a project’s build, reporting, and documentation from a central piece of information. This tutorial will help you to install Apache Maven on your Ubuntu 19.10 LTS, 18.04 LTS, and 16.04 LTS systems. You may like: How to Install Gradle on Ubuntu 18.04 Step 1 – Prerequisites First of all, you make sure that you installed appropriate Java on your system.Java is the primary requirement of installing Apache Maven on nix systems. So firstly you need to install Java on your system also make sure you have installed…
Keepalived is used for IP failover between two servers. Its facilities for load balancing and high-availability to Linux-based infrastructures. It worked on VRRP (Virtual Router Redundancy Protocol) protocol. In this tutorial, we have configured IP failover between two Linux systems running as a load balancer for load balancing and high-availability infrastructures. You may also intrested in our tutorial How to Setup HAProxy on Ubuntu & Linuxmint . Network Scenario: 1. LB1 Server: 192.168.10.111 (eth0) 2. LB2 Server: 192.168.10.112 (eth0) 3. Virtual IP: 192.168.10.121 I hope you get a better understanding of the setup with the above structure. Let’s move to…