Help:Purge: Difference between revisions

4,606 bytes added ,  5 years ago
Created page with "{{Help page}} '''Purge''' is a function that tells the server to clear its cache for a page. This causes the server to rebuild the page..."
imported>Duskey
m (Created page with ' ')
 
(Created page with "{{Help page}} '''Purge''' is a function that tells the server to clear its cache for a page. This causes the server to rebuild the page...")
Line 1:
{{Help page}}
 
'''Purge''' is a function that tells the server to clear its [[wikipedia:Web cache|cache]] for a page. This causes the server to rebuild the page completely, which can be used to update the page in case it is outdated or not showing correctly.
 
Purging can be used when a [[Help:Templates|template]] that is being used on a page gets changed. Because the server caches pages for better performance, the page that is using the template may appear to continue showing the old version of the template. This can be fixed by [[Help:Editing|editing]] the page, which will cause the server to rebuild it when you save the edit. The purge function can be used to achieve the same effect without having to edit the page.
 
Purging is harmless and you can't break anything by doing it. Purging does require slightly more processing power to complete, though, so don't overuse the purge function.
 
==How to purge==
:''Purging usually happens almost immediately, although it may sometimes take a couple of minutes.''
===Purge request to server===
[[File:Meta Miraheze purge command.jpg|thumb|You can purge the cache of a page by adding <code>?action=purge</code> to the URL.]]
# At the end of the URL of the page, add the text <code>?action=purge</code>. For example, if the URL of the page is <code>{{SERVERNAME}}/wiki/Foo</code>, the URL to purge the page would be <code>{{SERVERNAME}}/wiki/Foo?action=purge</code>.
# Then, simply visit that page by pressing {{Key|Enter}}. You will be taken to a confirmation page; just click '{{int:Confirm purge button}}' to continue.
 
You can also simplify the process by doing the following:
 
# Click on the '{{int:Edit}}' or '{{int:History}}' tabs at the top of the page.
# Change the last portion of the URL's [[wikipedia:query string|query string]] from <code>action=edit</code> or <code>action=history</code> to <code>action=purge</code>. If there is anything after that part of the URL, simply remove it.
 
{{Note|If the URL of the page contains <code>index.php</code> in it, the above method will not work because a question mark has already used in the URL. You will need to add <code>&action{{=}}purge</code> instead of <code>?action{{=}}purge</code> in that case. For example, if the URL of the page is <code>{{SERVERNAME}}/w/index.php?title{{=}}Foo</code>, the URL to purge the page would be <code>{{SERVERNAME}}/w/index.php?title{{=}}Foo&action{{=}}purge</code>.}}
 
===Null edit===
While purging should do the trick in most cases, there may be times where purging is not enough. For example, if you added a page to a [[Help:Category|category]], but that page isn't showing up on the category page, purging might not be enough. To fix this problem, you will need to edit the page. You don't actually have to make any changes to the page. All you have to do is:
 
# Click on the '{{int:Edit}}' button at the top of the page.
# Click '{{int:Savearticle}}' without making any changes.
 
This is called a '''null edit'''. It will tell the server to rebuild the page and update the link tables, so category pages will be updated to show the page, but since you did not actually make any changes to the page content, nothing gets recorded in the [[Help:Page history|page history]]. If you only add blank lines to the end of the page, the software will ignore those and will also count it as a null edit.
 
If you ''do'' make changes to the page, an edit will be recorded in the page history like normal, but all the other effects of doing a null edit will be applied as well. As such, if you want to make any changes to the page you want to null edit, you can simply edit the page and make those changes without having to do a null edit before or after.
 
==For images==
To refresh thumbnails for an image that is being used on a page, you may have to purge both the image description page and the page the image is being used on. If the image is from the Wikimedia Commons, you may need to go to the description page on Commons before purging.
 
If the thumbnails still do not regenerate successfully, it is probably because the server has cached an error page with the URL of a thumbnail, but the page was not purged because the actual thumbnail doesn't exist. The solution is to request the thumbnail with an unusual URL, say by appending "<code>?1</code>" to the end, then do a usual purge.
 
==See also==
* [[Help:Bypass your cache|Bypassing your browser cache]]
* [[wikipedia:Wikipedia:Purge|Wikipedia:Purge]] on the English Wikipedia
* [[c:Help:Purge|Help:Purge]] on the Wikimedia Commons
* [[mw:Manual:Purge|Manual:Purge]] on MediaWiki.org—technical documentation