Yasmine
Yasmine

Reputation: 2019

How to identify the source that opened an aspx file?

I have an aspx file, this file will be called from inside a flash. Is there anyway I could if this file is being directly accessed through the browser or being accessed by the flash?

Thanks in advance

Upvotes: 0

Views: 100

Answers (2)

seanb
seanb

Reputation: 6954

If you are calling it from the flash file, you could embed a querystring parameter into the flash file.

So, inside the flash, where it calls the resource
change from "[yourfile].aspx"
to "[yourfile].aspx?fla=1"
then read the querystring in the aspx file.

This may or may not be appropriate to your set up, but is often a quick and easy way of working out what called what in simple scenarios.

Upvotes: 1

David
David

Reputation: 218960

Generally for something like this you'd use the Referrer to see where the user came from. I'm not sure what it'll look like from within a Flash, though. Worth testing. Note also that it's up to the user's browser to send a Referrer in the first place. Some don't, by default or by a user setting.

Note that this is generally the behavior of the web. How is the Flash "calling" the "aspx file"? If it's just telling the user's browser to request that resource, then the browser is essentially creating a whole new request. That request, by the nature of the web, can be re-created any time the user wants. So if you're doing everything through the browser then you're at the whim of the browser's settings.

Upvotes: 0

Related Questions