Broken link issue

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
12/12/2014 6:23:28 AM
Gravatar
Total Posts 36

Broken link issue

We are using a mojoPortal version 2.4.0.2.

I ran a spider simulation tool to check broken links. And we got broken link issue for //ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/themes/south-street/jquery-ui.css link.

This is happening because it seems that tool is appending  site URL in front of //ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/themes/south-street/jquery-ui.css. This is the way most of the tool available on net is doing.

To investigate further I compared old code which was version 2.3.7.2 and found there is difference in the code

2.4.0.2: jQueryUIBasePath = "//ajax.googleapis.com/ajax/libs/jqueryui/"  + jQueryUIVersion + "/";
2.3.7.2: jQueryUIBasePath = protocol + "://ajax.googleapis.com/ajax/libs/jqueryui/"  + jQueryUIVersion + "/";

I did not ran the tool using the old version since I have already upgraded to latest version. What I feel is because of this code change there could be the issue.

Could you please let us know your inputs and suggest why this change was made in latest version. And can this be achieved without making code change.

Thanks,

Mahua Banerjee

12/12/2014 7:40:12 AM
Gravatar
Total Posts 18444

Re: Broken link issue

for external resources loaded from external urls we use protocol relative urls that start with  // instead of http:// or https://

this is a standard practice to leave out the protocol for such resources. Using a protocol relative url, the web browser will decide the protocol for that resources based on the protocol used by the containing page, so if the page url uses https it will use https if the page url uses http it will use http. It simplifies the code and it prevents errors on secure pages about insecure items

If your analysis tool doesn't understand protocol relative urls I suggest talk to the vendor of the tool, they are after all valid url formats

we have been using protocol relative urls for quite a while now, it was not a change in the latest version

You must sign in to post in the forums. This thread is closed to new posts.