Only you can help us build a free scout media repository!
Please create an account to start uploading your images now.

Help:Purge

From ScoutMedia, the free scout media repository

<languages/> <translate> 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. </translate>

File:MediaWiki-Purging-URL.png
<translate> Example of editing a URL to manually purge a page, by adding the text <tvar name="1">?action=purge</tvar></translate>
<translate> Manual</translate>
<translate> Purging can be done manually, by adding the text <tvar name="1">?action=purge</tvar> at the end of the URL in the address bar of the browser, and then pressing <tvar name="2"> Enter</tvar> or clicking "Go" to tell the browser to go to that revised URL. Using this method, you will see a [[<tvar name="3">:File:MediaWiki-Purging-for-IPs.png</tvar>|confirmation request]].<tvar name="ref">[1]</tvar> If you have a url such as <tvar name="4">http://commons.wikimedia.org/w/index.php?title=Commons:Undeletion_requests</tvar>, you have to append <tvar name="5">&action=purge</tvar>. If there is already an <tvar name="6">?action=…</tvar> specified in the URL, replace it with the purge action.</translate>
<translate> In some cases so called null edits have to be executed, instead.</translate>
<translate> Gadget</translate>
<translate> Purging can also be done with the assistance of [[<tvar name="1">Special:Preferences#mw-prefsection-gadgets</tvar>|gadgets]] which can be activated in [[<tvar name="1">Special:Preferences#mw-prefsection-gadgets</tvar>|your Preferences]].</translate>
  • <translate> Page Purge adds in the standard Commons [[<tvar name="1">Special:Preferences#mw-prefsection-rendering</tvar>|skin]] ("Vector") a "Purge" option in the "<tvar name="2">More</tvar>" 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 (<tvar name="3">MediaWiki Vector skin action arrow.svg</tvar>). In skins other than Vector, the tab is labelled simply "*". In Timeless skin you find this, instead, in the sidebar.</translate>
  • <translate> [[<tvar name="1">Special:MyLanguage/Help:Gadget-ExtraTabs2</tvar>|ExtraTabs2]] includes a "Purge" tab along with other useful links.</translate>
  • <translate> Thumbnail Purge adds a "Generate thumbnail" tab which regenerates the thumbnails of an image (for example, after uploading a new version of a file).</translate>
  • <translate> UTCLiveClock and LocalLiveClock also contain a link to update the server cache.</translate>

<translate>

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 ("<tvar name="1">What links here</tvar>", or in Commons most often "<tvar name="2">File usage</tvar>") 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: </translate>

  1. <translate> Click the "<tvar name="1">Edit source</tvar>" tab at the top of the page, i.e. start the source editor.</translate>
  2. <translate> Click "<tvar name="1">Publish changes</tvar>" at the bottom of the edit box without making any changes.</translate>

<translate> 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. </translate>

<translate> Advantage</translate>
<translate> All other purge methods do not apply to categorisation and "<tvar name="1">What links here</tvar>" changes from template edits, but a null edit does.</translate>
<translate> Disadvantage</translate>
<translate> 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.</translate>

<translate> 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. </translate>

  • <translate> 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.</translate>
  • <translate> Right click on the thumbnail to get to its page, append <tvar name="1">?action=purge</tvar> to the URL, and press <tvar name="2"> Enter</tvar> or click "Go".</translate>
  • <translate> You can try to force a new thumbnail to be generated by using this trick:</translate>
  1. <translate> Visit <tvar name="1">http://commons.wikimedia.org/w/thumb.php?f=Per_Stig_M%C3%B8ller.jpg&w=450</tvar> (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 <tvar name="2">p</tvar> parameter for the page number of the file, if multipaged.</translate>
  2. <translate> 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.</translate>
  3. Note: After publishing, you may have to bypass your browser's cache to see the changes.
  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
<translate> 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.</translate>
<translate> You can also use the <tvar name="1">{{Regenerate thumbnail}}</tvar> template to create the URL:</translate>
<translate> Type this</translate> <translate> To get this</translate>
{{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
<translate> 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.</translate>
<translate> The default thumb sizes, and thus the ones most likely to have problems, are (from <tvar name="1">Special:Preferences</tvar>): 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).</translate>
<translate> When there is a foolproof method for updating thumbnails or forcing them to re-render, rest assured, we will let you know.</translate>
<translate> If nothing of the above helps, simple renaming of a file would also solve the problem with outdated thumbnails.</translate>

<translate>

Bugs

There are some known issues preventing proper thumbnail display or generation. </translate>

  • COM:MAXTHUMB
  • <translate> Thumbnails not generating for some PDFs (<tvar name="1">phab:T72734</tvar>)</translate>
  • <translate> Image cache issue when 'over-writing' an image on commons (varnish: <tvar name="1">phab:T119038</tvar> browser: <tvar name="2">phab:T38380</tvar>)</translate>

<translate>

See also

</translate>

<translate>

References

</translate>

[[Category:Commons help{{#translation:}}]]