views:

18

answers:

2

Hello, This is regarding my developmnent stage and the practice of testing all the JS before releasing it.

Unfortunatly we have some hardcoded references in our code. and this is the reason why there is no way for me to test a new version of test.js on the Stage server. and you only see the effects when it goes live.

Now, I know I should use relative paths etc.. but I was wondering if there is a Firefox plugin that could maybe substitute http://remote.site/test.js with /dev_path/to/test.js during pageload ?

I have also tried using hosts file for this purpose but it doesn't work in my scenario as I only need to map it to this 1 reference and not the whole domain.

A: 

Is there anything stopping you from changing the hard-coded references? That's really the easiest answer to your problem.

Run a find-and-replace on your files to replace the absolute links to relative ones. So long as the site hierarchy is the same for development and production, there shouldn't be any problems.

Ben S
A: 

@Ben S, I an afraid changing the code to use relative-path is impossible in my scenario

qwerty