Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6935935
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:10:05+00:00 2026-05-27T12:10:05+00:00

in an app I’m programming I use javascript to add external image references to

  • 0

in an app I’m programming I use javascript to add external image references to a site.

So something like this:

<img src="${IMG_URL}" alt="picture"/>

The IMG_URL gets replaced by the javascript and it’s content is always in a valid HTTP Request form, like

http://www.domain.de/content/image/324233.jpg

And it works perfectly on every browser (iPhone, iPad and Android 2.2 included). But the Android 2.3.x browser sends a request like this:

GET /http://www.domain.de/content/image/324233.jpg

When I pass an absolute URL the browser always prepends a slash when requesting the image.
I even tried to kill the slash with an regex replacement, but it didn’t work. If I hardcode the url everything works fine. So it must be the scripts fault.

Since it’s a pretty big script (because everything works together you couldn’t pick twenty lines and say this is it) it’s hard to write down the code for illustration.

I can tell you that the JSON holding the img_url (which comes from a xml) is returned by functions two times and gets finally inserted into the DOM (via jQuery).

Is it possible that somehow the script prepends the slash? But the same script works in Android 2.2 so I really do not have an idea where the problem could be.

I hope you can help somehow.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T12:10:06+00:00Added an answer on May 27, 2026 at 12:10 pm

    I found the solution.
    The browser isn’t prepending a slash but the whole domain of the server. So I killed that (before appending to the DOM) with a regular expression and it finally works.

    Still weird that it’s prepending it (and only that browser….)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

app.js: app.use(express.compiler({ src: __dirname + '/public', enable: ['less']})); app.use(express.static(__dirname + '/public')); In my jade
App Engine only allows you to use these formats for XMPP addresses: app-id@appspot.com anything@app-id.appspotchat.com
My app uses a WebRequest at certain points to get pages from itself. This
App A has this BroadcastReceiver in its manifest (within <application>): And this receiver: public
My app needs to use a library which is only available for Python and
App is in prism/mvvm/mef and uses loading by attribute like StockTraderRI. My shell window
App_1 has a view and a template for this view. It would like to
App.config: <add key=SaveDraftPath value=C:\Drafts\/> C#: var saveDraftPath = ConfigurationManager.AppSettings[SaveDraftPath]; var sfDialog = new SaveFileDialog();
Web app is being written in classic ASP with a MSSQL backend. On this
My app has a select box for users to choose a venue. This select

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.