14 September 2012

A bookmarklet for jumping between dev and production

Here's a bookmarklet for jumping between different hosts while maintaining the same path. It’s really useful for navigating between the same pages on your development servers, staging servers, and productions servers.

javascript:(function(domain)%7Bvar%20url=window.location.href.split('/');url%5B2%5D=domain;url=url.join('/');window.open(url);%7D)('localhost:8080')

I put the most useful text right at the end, so you can easily change it for any host you like! I have two variations of this bookmarklet in a folder in my bookmarks bar called “onLocal” and “onProd”.


If copy and paste isn’t your bag, then use this nifty tool to generate your own versions of the bookmarklet…

Enter a hostname and a title for your bookmarklet and drag the resulting link to your bookmarks bar:

Also, if you’d rather write your own bookmarklets, then give my bookmarklet generator a try.




Interested in working with me at Superset to help shape the future of virtual fitness and to empower people to launch their own businesses online? We’re hiring a full-stack engineer. 💪🤓💻 Apply online



Did you find this helpful or fun? paypal.me/mrcoles
comments powered by Disqus

Peter Coles

Peter Coles

is a software engineer living in NYC who is building Superset 💪 and also created GoFullPage 📸
more »

github · soundcloud · @lethys · rss