This command is useful for scripts that are frequently changed. By assigning a hotkey to this command, you can easily restart the script after saving your changes in an editor. By default, the script can also be reloaded via its tray icon or main window. Any command-line parameters passed to the original script are not passed to the new. Load testing – real, serious load testing – is hard. In a perfect world, you want to exactly simulate the kinds of queries that the end users will be throwing at your SQL Server. However, in the words of a timeless philosopher, ain’t nobody got time for that. Instead, let’s use the neato open source tool.
I have a web page that is certainly loading a script from a 3rd party (news give food to). The
src
web link for the script is definitely assigned dynamically on load up (per third party code).The script loaded from
http://oneBigHairyURL
after that creates and loads elements with the various things from the news give food to, with very formatting, etc. intodiv1287
(the Id 'div1287' is definitely handed down inhttp://oneBigHairyURL
so the script knows where to load the content).The only problem is certainly, it just lots it as soon as. I'g like it to reload (and hence display brand-new content) every d seconds.
So, I believed I'd test this:
I obtain the forewarning, the div clears, but no dynamically-generated Code is reloaded to it.
Any concept what I'michael doing incorrect?
Jonathan M
Jonathan MetersJonathan M
5 Solutions
How about including a new script tag to lt;headgt; with the script to (re)load? Something like below:
The primary point can be placing a fresh script label - you can get rid of the outdated one without outcome. You may need to add a timestamp to the issue chain if you have got caching issues.
KellyKelly
Right here's a technique which is definitely similar to Kelly's i9000 but will get rid of any pre-existing script with the exact same supply, and uses jQuery.
Notice that the 'kind' feature is simply no longer required for scripts as of Code5. (http://www.w3.org/html/wg/drafts/html/master/scripting-1.html#the-script-element)
HenryLuke
Possess you attempted removing it from the DOM, then inserting it back again again?
I simply do, that doesn'testosterone levels work. Nevertheless, creating a new script label and duplicating the material of the existing script tag, then incorporating it, works well.
Notice my illustration http://jsfiddle.net/mendesjuan/LPFYB/
This was the winner't function if you anticipate the script to alter every period, which I think can be your case. You should adhere to Kelly't suggestion, simply remove the previous script tag (simply to maintain the DOM slim, it earned't impact the result) and reinsert a brand-new script tag with the same src, plus a cachebuster.
Juan MendesJuan Mendes
Small tweak to Luke's response,
and call it like,
This will not really have got any route related issues.
Maleen AbewardanaMaleen Abewardana
Use this functionality to discover all script components filled with some word and refresh them.
stomystomy