Popup windows are not always desirable but there may be a genuine need for opening links in a popup window in web applications. In this post, I will show how to open link in a popup window. Open Link in a Popup Window Normally links get opened in the same window in which they are clicked in. To open them in a new window, we add target=”_blank” attribute to links. …
Ping the Sitemap to Search Engines after update the Site
It is advisable that you submit the updated sitemap to the search engines like Google & Bing to tell them about the updated content, when you publish a new post, or make changes to your site structure which updates the sitemap of your website. In this post, I will show how to ping the sitemap to Search Engines after update the site manually. If you are running a WordPress site …
Prevent scrolling on body in iOS
When we develop a web page for mobile and we are creating a drawer to hold the content that will scroll separately, we can use overflow: hidden; on the body tag is sufficient to prevent scrolling a web page. However, this doesn’t work in iOS6. I have found a best solution for this to set position: fixed.
Sort an Array Alphabetically in Javascript
To Sort an Array Alphabetically, we have a sort() method in JavaScript arrays that sorts the array items into an alphabetical order. The sort() method accepts an optional argument as a function that compares two elements of the array. Following is the syntax of the sort() method: If we leave the compare function, then the sort() method will sort the array based on the array values. Following are the rules …
How to improve web page speed in Mobile
There are several benefits of website page speed optimization. Fast sites rank better in search engines. Google has specifically stated that one of their ranking factors is site performance, especially for mobile users. Speed optimization reduces server load. A fast website increases conversions. Fast page loads make happy customers, and happy customers buy more. To improve page speed in mobile, please follow below very easy steps before make website live. …
How to Get the Length of an Object in JavaScript
Everything in JavaScript is an Object. You can simply use the Object constructor in JavaScript to create an object or you can define a string object, an array object and add properties and values to it. Sometimes we require to know the length of an object for any specific reason, there is a simplest and quickest way to get the length of a given object in JavaScript is by using …
Get only URL of the Previous and Next Post in WordPress
When we want to configure links between a blog’s next and previous pages, there is absolutely no function to return ONLY the URLs of the next and previous pages. To save the time below simple thing will help. To return the URL of the previous page, use the following php code: To return the URL of the next page, use the following php code: To use them, simply echo the …
How to get week dates from week number and year
In this tutorial I will show you how to get week dates from week number and year. We will calculate ISO week number (1-53) and represent the start of the week “Monday”. There is a setISODate() method with DateTime extension that accepts the year (4-digit year) and ISO week number. Example of get week dates from week number and year The output of above code is following: