Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Setup for IIS Virtual dir linkage to html HREF=

edited March 2022 in General

Sorry, it was easier for me to create the environment, then ask the question.



In folder c:\revsoft\web\OIApps\fesmobile if have:
Default.htm
Which shows when url used is localhost/fesmobile
In default.htm there is e.g.:
. <script type="text/javascript" src="/javascripts/application.js" ></script> <link rel="stylesheet" href="/stylesheets/application.css" />

Now, as you can workout , for app fesmobile get /javascripts it is going to use the physical path to the stylesheets folder under \pbcmobile. Which is not realy ideal as I will explain.

The issue I want to overcome to future proof this is, what if javascripts/application.js is needed to be changed only for pbcmobile and fesmobile is to keep using the original.

What do I change the HREF= references to ; and what do I change/setup in the IIS Manager.?
I did look at this and tried what I thought, plus IIS changes, but totally screwed up.

So, now I am after some professional help.

Hope you understand what I am trying to achieve.

BTW: When have changed IIS and default.htm, then go to browser to renter (say) localhost/fesmobile – iis changes did not appears to take. Is any buffer done that need a ‘restart’ or clear anywhere for changes to effect.?

Comments

  • You need to refresh the browser cache (ctrlf-f5 in chrome) to see changes to css or javascript files.

    Not sure what your other point is about...
  • Barry,

    You have a couple of options to have different versions of application.js. Without a better understanding of the architecture of your application it's difficult to advise in depth but given that you're getting this working the simplest solution is in pbcmobile\default.htm to change:

    <script type="text/javascript" src="/javascripts/application.js" ></script>

    to

    <script type="text/javascript" src="/javascripts/application.pbc.js" ></script>

    You could also put a version number in the file name. If you put the PBC only changes in application.pbc.js then it will be separate from the freshmobile application.js folder.

    You could also move the stylesheets and javascripts folder into the pbcmobile and freshmobile folder. Then each site would have their separate copy and you would be assured that both are separate but then you have two copies of the file to maintain. I can show you what your default.htm file would look like if you want to consider this.

    Regarding the refresh. You could have server-side caching in IIS or browser side caching causing issues. My recommendation is to work with the developer tools open and disable page caching. This will allow you to work without having to force reloads of the page.
  • Awesome info.
    Thank you so much.
Sign In or Register to comment.