- How to refresh, reset, or restore your PC
- Before you start to refresh or reset your PC
- Refresh, reset, or restore
- To refresh your PC
- To reset your PC
- To restore your PC to an earlier point in time
- How to Refresh and Hard Refresh your web page in a browser
- Refresh and Hard Refresh web page in a browser
- 3] Server Cache
- 4] Force Clear Browser Cache
- Refresh a page using JavaScript or HTML [duplicate]
- 8 Answers 8
- Javascript Page Refresh with Examples
- Refreshing (or Reloading) a Webpage
- Example 1 – A Simple Page Refresh
- Example 2 – Using a Clickable Image to Refresh
- Example 3 – Refreshing Automatically
- Example 4 – Using a Button to Refresh
How to refresh, reset, or restore your PC
Note: For information about this topic in Windows 10, see Recovery options in Windows 10.
If you’re having problems with your PC, you can:
Refresh your PC to reinstall Windows and keep your personal files and settings. Refresh also keeps the apps that came with your PC and the apps you installed from the Microsoft Store.
Reset your PC to reinstall Windows but delete your files, settings, and apps—except for the apps that came with your PC.
Restore your PC to undo recent system changes you’ve made.
If you’re having trouble starting (booting) your PC, see Windows Startup Settings (including safe mode), and go to the “Get to Windows Startup Settings in the Windows Recovery Environment” section. You can refresh, reset, or restore your PC from the Windows Recovery Environment.
If you want to back up and restore your personal files using File History, see Set up a drive for File History.
Before you start to refresh or reset your PC
In most cases, once you start to refresh or reset your PC, it’ll finish on its own. However, if Windows needs missing files, you’ll be asked to insert recovery media, which is typically on a DVD disc or thumb drive. If that happens, what you’ll need depends on your PC.
If your PC came with Windows 8.1 or Windows RT 8.1, you’ll need the discs or thumb drive that came with your PC. Check the info that came with your PC to see if your PC manufacturer provided these discs or media. In some cases, you might have created them when you first set up your PC.
If you don’t have either of those, you can make them if you have a USB thumb drive of 16 GB or larger. Having a recovery drive can help you troubleshoot and fix problems with your PC, even if it won’t start. For more info, see Create a USB recovery drive.
If you upgraded your PC to Windows 8.1 or Windows RT 8.1 with a DVD, use that disc. If you don’t have Windows 8.1 or Windows RT 8.1 media, contact Microsoft Support.
Refresh, reset, or restore
Select any of the following for more detailed info.
If your PC isn’t performing as well as it once did, and you don’t know why, you can refresh your PC without deleting any of your personal files or changing your settings.
Note: If you upgraded your PC from Windows 8 to Windows 8.1 and your PC has a Windows 8 recovery partition, refreshing your PC will restore Windows 8. You’ll need to upgrade to Windows 8.1 after the refresh has finished.
Warning: Apps you installed from websites and DVDs will be removed. Apps that came with your PC and apps you installed from Microsoft Store will be reinstalled. Windows puts a list of removed apps on your desktop after refreshing your PC.
To refresh your PC
Swipe in from the right edge of the screen, tap Settings, and then tap Change PC settings.
(If you’re using a mouse, point to the upper-right corner of the screen, move the mouse pointer down, click Settings, and then click Change PC settings.)
Tap or click Update and recovery, and then tap or click Recovery.
Under Refresh your PC without affecting your files, tap or click Get started.
Follow the instructions on the screen.
If you want to recycle your PC, give it away, or start over with it, you can reset it completely. This removes everything and reinstalls Windows.
Note: If you upgraded your PC from Windows 8 to Windows 8.1 and your PC has a Windows 8 recovery partition, resetting your PC will restore Windows 8. You’ll need to upgrade to Windows 8.1 after the reset has finished.
Warning: All of your personal files will be deleted and your settings will be reset. All apps that you installed will be removed. Only apps that came with your PC will be reinstalled.
To reset your PC
Swipe in from the right edge of the screen, tap Settings, and then tap Change PC settings.
(If you’re using a mouse, point to the upper-right corner of the screen, move the mouse pointer down, click Settings, and then click Change PC settings.)
Tap or click Update and recovery, and then tap or click Recovery.
Under Remove everything and reinstall Windows, tap or click Get started.
Follow the instructions on the screen.
Note: You’ll be asked to choose whether you want to erase data quickly or thoroughly. If you choose to erase data quickly, some data might be recoverable using special software. If you choose to erase data thoroughly, this will take longer but it makes recovering data less likely.
If you think an app or driver that you recently installed caused problems with your PC, you can restore Windows back to an earlier point in time, called a restore point. System Restore doesn’t change your personal files, but it might remove recently installed apps and drivers.
System Restore isn’t available for Windows RT 8.1.
Windows automatically creates a restore point when you install desktop apps and new Windows updates, if the last restore point is older than 7 days. You can also create a restore point manually at any time.
To restore your PC to an earlier point in time
Swipe in from the right edge of the screen, and then tap Search.
(If you’re using a mouse, point to the upper-right corner of the screen, move the mouse pointer down, and then click Search.)
Enter Control Panel in the search box, and tap or click Control Panel.
Enter Recovery in the Control Panel search box, and then tap or click Recovery.
Tap or click Open System Restore, and then follow the instructions.
If you need additional help refreshing, resetting, or restoring your PC, check out the Repair and Recovery community pages in the Windows forum for solutions that other people have found for problems they’ve experienced.
How to Refresh and Hard Refresh your web page in a browser
Caching is typical behavior of any browser. Whenever you visit a website, it downloads the file and keeps it. So next time you visit the same site, it doesn’t download those files again. Technically, every site can suggest the browser when to download those files back. So if there is a change in the website, your browser will not notice the changes. In this post, we will learn how to refresh and hard refresh your web page in the browser to see the changes.
Refresh and Hard Refresh web page in a browser
We will cover the following topics:
- Simple Refresh
- Hard Refresh
- Server Cache
- Force Clear Browser Cache
1] Simple Refresh in Browser
When you press the F5 key on your keyboard when the browser is open, it sends a request to the brows with an If-Modified-Since header. If the website has set the expiry date for cache high, the browser will load the site from the cache.
2] Hard Refresh in Browser
In the case of a Hard Refresh, the browser does not use anything in the cache and is forced to re-download everything. To carry out a Hard Refresh, press the Ctrl+F5 keys or, while holding down the Ctrl key, click on the Refresh button near the address bar. You can also use Ctrl+Shift and then press R.
It works in Microsoft Edge, Internet Explorer, Chrome and Firefox too.
3] Server Cache
Here is a deal. The server may ignore the no-cache header, and send a server-side cached page. Thus even Ctrl+F5 may return an old version of the page if the server ignores the no-cache header. It is not much you can do about server caching as its a technique used by many websites to speed up. Only when the webmaster decides to clear the server cache, you may see the new version of the website.
4] Force Clear Browser Cache
If the hard refresh doesn’t work, even though you can see a new version of the site in a different browser, then it’s the browser behaving unpredictably. The only way out is to clear the browser cache from browser settings.
In Chrome and Firefox, you can choose to delete cache for a specific website. If you are a Microsoft Edge user, then this browser does not let you delete cache for particular websites. You will have to remove the entire Browsing History & Cache.
You can also use the “Developer Tools” console in Google Chrome to get an Empty Cache & Hard Reload option. To delete cache, you need to choose Applications > Clear Storage > Clear data.
TIP: Google Chrome browser includes a feature that lets you Normal Reload, Hard Reload or Empty Cache and Hard Reload a web page. You might want to take a look at this post.
Refresh a page using JavaScript or HTML [duplicate]
How can I refresh a page using JavaScript or HTML?
8 Answers 8
window.location.reload(); in JavaScript
in HTML (where 1 = 1 second).
Here are 535 ways to reload a page using javascript, very cool:
Here are the first 20:
and the last 10:
If false, the page will be reloaded from cache, else from the server.
should work however there are many different options like:
You can also use
It works fine for me.
If it has something to do control updates on cached pages here I have a nice method how to do this.
- add some javascript to the page that always get the versionnumber of the page as a string (ajax) at loading. for example: www.yoursite.com/page/about?getVer=1&__[date]
- Compare it to the stored versionnumber (stored in cookie or localStorage) if user has visited the page once, otherwise store it directly.
- If version is not the same as local version, refresh the page using window.location.reload(true)
- You will see any changes made on the page.
This method requires at least one request even when no request is needed because it already exists in the local browser cache. But the overhead is less comparing to using no cache at all (to be sure the page will show the right updated content). This requires just a few bytes for each page request instead of all content for each page.
IMPORTANT: The version info request must be implemented on your server otherwise it will return the whole page.
Example of version string returned by www.yoursite.com/page/about?getVer=1&__[date] : skg2pl-v8kqb
To give you an example in code, here is a part of my library (I don’t think you can use it but maybe it gives you some idea how to do it):
If you are using version independent resources like javascript or css files, add versionnumbers (implemented with a url rewrite and not with a query because they mostly won’t be cached). For example: www.yoursite.com/ver-01/about.js
For me, this method is working great, maybe it can help you too.
Javascript Page Refresh with Examples
JavaScript is the language that adds interactivity to a web page. Before JavaScript, web pages weren’t interactive. For example, whenever you had to fill out a web form, you had to fill out your information, hit the submit button and then wait for the webpage to reload. You would then be informed whether the form had been accepted by the server. If you had made a mistake in the form somewhere, you had to rectify it and then submit it again. Now, however, most websites use JavaScript, which make the process much simpler. JavaScript has made forms interactive. As soon as you’re finished filling in a blank field in the form, for example, a small tick might appear next to it if the information has been filled correctly. If you haven’t filled it correctly, a red cross might appear next to it. When you now hit the submit button, the entire web page doesn’t reload – only a part of it reloads. These are only a few simple examples of what you can do with JavaScript. Learn more about other ways you can use JavaScript in your web development with this course.
JavaScript allows a web page to communicate asynchronously with a server. Your web page doesn’t have to reload to send and retrieve data from a server. This saves a lot of time and reduces the load on a server. JavaScript is a simple language to learn, especially if you have programming experience. You can sign up for this course to learn how to program with JavaScript.
In this tutorial, we’re going to see how JavaScript can be used to refresh a webpage. This tutorial has been written for beginners – you should be able to understand it even if you have very little experience with JavaScript.
Refreshing (or Reloading) a Webpage
The reload () method in JavaScript is used to reload the webpage. The refresh button in your browser acts exactly like the reload method. The syntax of the reload method is as follows:
If you call this method from anywhere in the web page, the web page will reload. This reload will occur through the web cache. What is a cache exactly? It’s a temporary space your browser reserves to store documents, images and other data that it retrieves from a server. Caching of data allows a browser to speed up your browsing and lets you reload often-visited sites faster.
You can change the default cache reload by setting a forceGet parameter. This will cause the browser to reload the webpage by fetching the data from the server anew instead of using the cache. This can be accomplished by using the following code:
By default, the value of the forceGet parameter is false. This means that the location.reload method always looks like this:
Let’s take a few examples so you can see how the location.reload method is used.
Example 1 – A Simple Page Refresh
You can call the location.reload () method from within a hyperlink. Let’s write a simple program that creates a hyperlink that reloads the web page you’re on when you click on it:
This code will create simple hyperlink with the text “Refresh Page”. When you click on “Refresh Page”, the location.reload method will get executed by your browser and the entire page will reload. Try typing the program out and running it on your browser to see how it works. If you’re unsure of how to run a HTML program in your browser, take a look at our tutorials on HTML. Alternatively, you can just sign up for this course to learn how to run HTML programs that you can use to build a great website.
Example 2 – Using a Clickable Image to Refresh
You can also call the location reload method using an image. You can have a small icon that says “refresh” and refreshes the webpage when the user clicks on it, for example. The code for doing that is as follows:
Here, the “refresh1.jpg” image that was present on your webpage will get turned into a clickable link. When the user clicks on it, the webpage will get refreshed.
Example 3 – Refreshing Automatically
The location.reload () method can also be set to automatically run after every few seconds. For example, you can get your web page to refresh after every 30 seconds. Let’s write a program that does just that:
This code will create a self-refreshing webpage. The reload will happen every 30 seconds. We’ve used the setTimeout () JavaScript function here. This function executes the function included in its parameters after a set time, which you can change to whatever’s convenient. In our program, the setTimeout () function is set to 30,000 milliseconds (30 seconds) and it points to the location.reload method.
Example 4 – Using a Button to Refresh
You can also link the location.reload method to a button, like you do other JavaScript functions. The code to do that is as follows:
This will create a simple clickable button with the text “Refresh Page” on it. Clicking the button will call the location.reload () method, which will refresh the page.
The reload method can also be called in response to a mouse click. You can use this code to do that: