Jump to content

Wikipedia:Reference desk/Archives/Computing/2018 November 20

From Wikipedia, the free encyclopedia
Computing desk
< November 19 << Oct | November | Dec >> November 21 >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


November 20

[edit]

Can't access iPhone because of "activation error"

[edit]

My iPhone is insisting that I go through activation again, even though I've been using it for years. However, every time I try to go through the process, I keep on getting an activation error. The device won't connect to iTunes, yet its still remembers my password and can receive phone calls. Does anyone have any clue of what could be wrong with the device, and how I can force it to be functional again? Spirit of Eagle (talk) 02:22, 20 November 2018 (UTC)[reply]

This or this can help you. Ruslik_Zero 13:23, 20 November 2018 (UTC)[reply]
Ok, thanks a lot. Spirit of Eagle (talk) 04:04, 21 November 2018 (UTC)[reply]

Reloading an html page

[edit]

I have a python file and a html file. I would like to know how I can make the html page to reload every 10 minutes(For eg.https://tools.wmflabs.org/fireflytools/emptypages/enwiki). Adithyak1997 (talk) 15:54, 20 November 2018 (UTC)[reply]

@Adithyak1997: Something like this? [1]. Modify it from 30 seconds to 600 seconds. RudolfRed (talk) 20:04, 20 November 2018 (UTC)[reply]
Alternatively (you can do this within the HTML page, without needing access to the server config) you could use a meta refresh, i.e. adding
<meta http-equiv="refresh" content="300" >
to the header of the HTML page. Andy Dingley (talk) 20:14, 20 November 2018 (UTC)[reply]
@RudolfRed:But when I reload a html page, how can the query present in the python file gets reloaded? Because it is that query with which the page needs to be refreshed with.Adithyak1997 (talk) 07:36, 21 November 2018 (UTC)[reply]
I have actually added the statement mentioned by you. But it doesn't make any difference. I have changed that in my github file. But the changes I made to html files are not yet been changed in the main display page I guess. I have used git pull command. It shows that everything is up to date in terminal.Adithyak1997 (talk) 07:44, 21 November 2018 (UTC)[reply]
What do you mean by "I have a python file"? Is this a web resource (just a file, store on a web server)? Or is it being executed on that web server (under Django, Flask etc) and you want to refresh the document it returns?
In both cases, serving the HTTP response header should have the right effect. But as it's not HTML (in the first case) you can't embed a <meta> refresh in there (if you do, the client won't recognise it or know what to do with it).
In the second case, are you using a server-side Python script to generate a HTML document? If so, then either method should work. Andy Dingley (talk) 14:11, 21 November 2018 (UTC)[reply]
@Andy Dingley:I have a tool named Fireflytools([link]) which was adopted recently from the owner Firefly. The tool is currently hosted in toolforge. I am able to update/ schedule 3 of the tasks present in that tool. Remaining many are to be updated but I think I have failed due to lack of knowledge I guess. Among them, one is a "long redirects" page which has almost the same code as that of "empty pages" which makes difference mainly in the way that the "empty pages" contains an extra separate dump file which is not seen in the case of "long redirects" file. Due to this, in the cron job file, "long_redirects" was called using its python file whereas the "empty pages" was called by its .sh file which is not currently seen in the case of "long redirects" file. So, I was trying to do a reload so that the sql query present in the py file could update by reloading the html file(I thought). For reference, please check [this].Adithyak1997 (talk) 18:12, 21 November 2018 (UTC)[reply]
  • Thanks for the URL. I've just tried it with Firefox. I'm not getting a HTTP response for Refresh, but I am getting a <meta> in the document and I am seeing it refresh every 30 seconds.
I wouldn't do this though. Setting stuff to auto-refresh can be a nuisance for server load. This is the sort of page that doesn't need to update automatically. Better is to send the Expires header, with a time a reasonable point into the future. That way the browser knows when the page is to be considered "stale", so can reload it if needed, but you won't find every unwatched browser tab in the known universe all hammering on your server uselessly. It can also sometimes be better for caching to set Expires rather than Refresh, as a (dumb!) cache may keep returning the same page after the refresh. All caches will respect Expires, but not all see a Refresh header as implying staleness. Andy Dingley (talk) 19:58, 21 November 2018 (UTC)[reply]