Help:Purge
Purging is a way to force Commons to recreate a page from its database, rather than relying on a "cached" version of the page. Caching makes Commons display pages more quickly, but occasionally makes it show copies of pages which are not up to date.
- Manual
- Purging can be done manually, by adding the text
?action=purge
at the end of the URL in the address bar of the browser, and then pressing ↵ Enter or clicking "Go" to tell the browser to go to that revised URL. Using this method, you will see a confirmation request.[1] If you have a url such ashttp://commons.wikimedia.org/w/index.php?title=Commons:Undeletion_requests
, you have to append&action=purge
. If there is already an?action=…
specified in the URL, replace it with the purge action. - In some cases so called null edits have to be executed, instead.
- Gadget
- Purging can also be done with the assistance of gadgets which can be activated in your Preferences.
- Page Purge adds in the standard Commons skin ("Vector") a "Purge" option in the "More" drop-down tab at the top of the page. This tab appears in the drop-down menu next to the search bar, accessible by clicking the arrow icon (). In skins other than Vector, the tab is labelled simply "*". In Timeless skin you find this, instead, in the sidebar.
- ExtraTabs2 includes a "Purge" tab along with other useful links.
- Thumbnail Purge adds a "Generate thumbnail" tab which regenerates the thumbnails of an image (for example, after uploading a new version of a file).
- UTCLiveClock and LocalLiveClock also contain a link to update the server cache.
Null edit
If a category isn't showing linked pages known to exist, or it is showing pages it should not display anymore, the affected page may be null-edited (refreshed) and will then show all properly linked pages. The same issue sometimes applies to display of link usages ("What links here", or in Commons most often "File usage on Commons") and can be solved with null edits, as well.
A null edit purges the target page (including category and backlink pages) if the page can be edited:
- Click the "Edit source" tab at the top of the page, i.e. start the source editor.
- Click "Publish changes" at the bottom of the edit box without making any changes.
With a null edit, nothing is saved, and no edit is recorded. If you leave text in the edit summary, it will be discarded. Adding new blank lines only to the end of the page is also usually a null edit. Trailing blank lines are largely ignored. Section edits, however, sometimes result in changes, and get saved.
A page move or protection counts as a null edit as well, although an edit is recorded in the page history.
- Advantage
- All other purge methods do not apply to categorisation and "What links here" changes from template edits, but a null edit does.
- Disadvantage
- If you can't edit the page, you can't do a null edit, obviously. If what you want is category or backlink updates but you can't null edit, just wait or ask an administrator. Usually, changes in category links are put into the job queue, and recached when the server load is low. Depending on how busy the server is, the page may take days, or even months, to be updated.
Do not confuse null edit with dummy edit. A dummy edit does modify the source, even though slightly.
Advanced manual thumbnail purging
Sometimes thumbnail purging can be a problem, even with the use of the Thumbnail Purge gadget. Here are some further steps to try.
- Try clearing your cache and hitting the refresh button. Be sure to hold "Ctrl" (IE) or "Shift" (Firefox) when you refresh (hard refresh). Sometimes there is a delay in generating a new thumbnail for a newer version of an image.
- Right click on the thumbnail to get to its page, append
?action=purge
to the URL, and press ↵ Enter or click "Go". - You can try to force a new thumbnail to be generated by using this trick:
- Visit http://commons.wikimedia.org/w/thumb.php?f=Per_Stig_M%C3%B8ller.jpg&w=450 (copy your image name from the URL bar - so non-latin characters are escaped - into the ?f= and change the w= value to the width of the thumbnail you want to regenerate) ... this is forcing a new thumbnail to be rendered. Do this for all the size thumbnails you want to be re-rendered. You can also add a
p
parameter for the page number of the file, if multipaged. - Open the image page. In the URL, change "action=edit" to "action=purge". Now repeatedly do a hard refresh on this URL until the new thumbnail is generated.
- Please purge your browser’s cache or enable JavaScript in your Browser's settings. (You only need to do it once.)
- Visit http://commons.wikimedia.org/w/thumb.php?f=Per_Stig_M%C3%B8ller.jpg&w=450 (copy your image name from the URL bar - so non-latin characters are escaped - into the ?f= and change the w= value to the width of the thumbnail you want to regenerate) ... this is forcing a new thumbnail to be rendered. Do this for all the size thumbnails you want to be re-rendered. You can also add a
Operating system Browser |
Microsoft Windows or Linux | macOS |
---|---|---|
Chrome | Press Ctrl+F5 or ⇧ Shift+F5 or hold down ⇧ Shift while clicking Reload |
Press ⌘ Cmd+F5 or ⇧ Shift+F5 or hold down ⇧ Shift while clicking Reload |
Mozilla Firefox | Hold down ⇧ Shift while clicking Reload (or press Ctrl+F5 or Ctrl+⇧ Shift+R) |
Press ⌘ Cmd+R (reload page) or ⌘ Cmd+⇧ Shift+R (reload page and rewrite cache) |
Safari | Hold down ⇧ Shift+Alt while clicking Reload | |
Press Ctrl+R | Press ⌘ Cmd+⌥ Option+E (clear browser cache) or ⌘ Cmd+R (update) | |
Opera | Press Ctrl+F5 or ⇧ Shift+F5 | |
Konqueror | ||
Internet Explorer | Press Ctrl+F5 |
- An alternative solution is to append to the URL an arbitrary string to the thumbnail image (append a question mark, then some string: ?random). It should force the image scalers to regenerate the thumbnail.
- You can also use the {{Regenerate thumbnail}} template to create the URL:
Type this | To get this |
---|---|
{{Regenerate thumbnail|1=California wind resource map 50m 800.jpg|2=79}} | https://commons.wikimedia.org/w/thumb.php?f=California+wind+resource+map+50m+800.jpg&w=79 |
- If you are having persistent problems with a thumbnail updating, one workaround trick you can use is to use a thumbnail of an unusual size. Instead of allowing the default/user-specified size, request an unusual size like 199px or 201px. Because this size is not usually used, the software will have to create a brand new thumbnail, and thus will use the new updated image, instead of supplying the existing thumbnail based on an old version of the image.
- The default thumb sizes, and thus the ones most likely to have problems, are (from Special:Preferences): 120, 150, 180, 200, 250, 300 + the thumbnail for the image page (if the image is larger than this space) -- you can figure out what size this image is by right-clicking on it and choosing save as... - it will save as something like 450px-Properimagename.jpg - so the prefix tells you).
- When there is a foolproof method for updating thumbnails or forcing them to re-render, rest assured, we will let you know.
- If nothing of the above helps, simple renaming of a file would also solve the problem with outdated thumbnails.
Bugs
There are some known issues preventing proper thumbnail display or generation.
- COM:MAXTHUMB
- Thumbnails not generating for some PDFs (phab:T72734)
- Image cache issue when 'over-writing' an image on commons (varnish: phab:T119038 browser: phab:T38380)