Namespaces
Variants
Actions

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

Jump to: navigation, search
Archived.png
Archived: 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

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.
83 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved