/    Sign up×
Community /Pin to ProfileBookmark

Using Preload to transmit information to the server

Hi,

I’m thinking of using the image preload function to transmit browser information from the client to the server. The ‘SRC’ attribute of the image would simply compose the url of a script with the information as parameters.

Does anyone have example code of this ?

Thanks,
Hre

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@KorAug 30.2006 — you may use the [B]onload[/B] event placed inside the img tags, but, uppon my experience:

1. different type of browsers act in different ways

2. images might be interlaced or not, that means the onload might report a finished loading while the picture just started to "add" pixel lines.

In fact... [B]what[/B] type of information you want to send to the server and [B]when[/B]?
Copy linkTweet thisAlerts:
@MinHreauthorAug 31.2006 — Basically just a string about containg response time information, sent when onUnload is called. I need to know how to handle this on the server side.

Thanks,
×

Success!

Help @MinHre spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...