×
Namespaces

Variants
Actions

Window.location does not include port number in BrowserNG/7.1 (Known Issue)

From Nokia Developer Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

The article is believed to be still valid for the original topic scope.


Article Metadata
Tested with
Devices(s): All devices using BrowserNG/7.1
Compatibility
Platform(s): S60 3rd Edition FP 2, S60 5th Edition
S60 5th Edition
S60 3rd Edition FP2
Article
Keywords: window.location
Created: User:Kbwiki (17 Sep 2009)
Last edited: hamishwillee (01 Aug 2012)

Contents

Overview

Port number is not returned when querying window.location in JavaScript.

Description

The JavaScript query window.location does not include the port number in BrowserNG releases prior to 7.1.17291.

How to reproduce

Create a HTML page on a server running some other port than 80:

 <html>
<head>
<script type="text/javascript">
alert("Found window location: " + window.location);
</script>
</head>
<body>
<h1>Location test</h1>
</body>
</html>

Solution

Fixed in upcoming firmware updates.

Possible workaround:

 url = window.location.protocol + "//" + window.location.host + window.location.pathname + 
window.location.search
This page was last modified on 1 August 2012, at 07:41.
43 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×