How to refresh page with jQuery?

Five ways to reload page, using jQuery, with code example
31 October 2017   50263

Feel free to use location.reload():

$('#something').click(function() {
    location.reload();
});

The reload() function takes an optional parameter that can be set to true to force a reload from the server rather than the cache. The parameter defaults to false, so by default the page may reload from the browser's cache.

You can also use these ways:

  1. history.go(0)
  2. location.href = location.href
  3. location.href = location.pathname
  4. location.replace(location.pathname)

 

Frontend News Digest 1 - 7.02

How to Create a WP Site with JAMstack, formatting dates in JS with Intl.DateTimeFormat, Edge DevTools now supports more languages and more
07 February 2020   438

Greetings! I hope your week went great! Here's new frontend technologies news digest.

Check the MongoDB One-to-Many Relationship tutorial with Mongoose examples, the CO2 emission of the websites new NodeJS update and other interesting things

Guides

  • How To Create A Headless WordPress Site On The JAMstack

Tutorial on simple way to create a WordPress site

  • MongoDB One-to-Many Relationship tutorial with Mongoose examples

Guide about Mongoose - the most popular way to use MongoDB from Node.js.

  • Formatting dates in JavaScript with Intl.DateTimeFormat

Check the modern way to format dates in a region friendly way using native APIs, as now supported all major browsers and both Node

Articles

  • CO2 emissions on the web

Learn the lever of CO2 emissions websites produce by consuming a lot of energy for its activity

  • Bringing the Microsoft Edge DevTools to more languages

Now Edge's DevTools support more languages

Video

  • Chrome 80 - What’s New in DevTools

Updates

  • massCode

Snippets manager for developers

  • micro-jaymock

Tiny API mocking microservice for generating fake JSON data

  • Node v13.8.0 (Current)

Another update of popular solution

  • Electron 8.0.0

Major release of popular JS based solution