Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.

Thread Tools Display Modes
Share |
Old 07-29-2010, 09:42 AM
marc_gfx marc_gfx is offline
Contributing Member
Join Date: 07-01-06
Posts: 126
iTrader: 0 / 0%
same origin policy, images

I'm developing a very image intense application in javascript. So I decided it would be a nice idea to use Amazon S3 to upload all my images. This workds like a charm. The thing is I need to be able to manipulate the pixels in the images, thanks to the same origin policy this is not so easy. A call to getImageData will always result in a security error.

website : domain.com
images : img.domain.com -> amazon

I then found out, you can't simply use subdomains, the origin must be same. I then read you can set document.domain to an upper level domain. so clever me decided to move all my images to domain.com and have my main page on www.domain.com

website : www.domain.com -> set document.domain to domain.com

Unfortunately the setting of document.domain does not seem to affect images. I still received security errors (same origin policy).

I then decided to make a static page from my generic php page, that I could upload also to S3. So I would have all my stuff on S3. Worked with Chrome, not with Firefox, but had so many other drawbacks I stopped this approach.

Now I'm back to square one, uploading everything to my sucky virtual server. I've been wasting my last two days, but still can't believe there is no solution.

Redirecting domain.com/img -> amazon/img ? would that work? I believe same origin would again be involved and kick me down below ...

I would be glad just to find some sensible information on same origin involving images. so far I just get loads of hack-stuff, how to use the image request for bypassing same origin. just I need the images...

any ideas?
Reply With Quote



Go Back   Webmaster Forum > Web Development > Coding Forum


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I have different images based on the origin of site traffic? ChumpChange Marketing Forum 1 03-04-2009 04:56 PM
Identifying country of origin UVBoy Coding Forum 39 12-11-2007 01:48 PM
Traffic by Origin John Scott SEO Forum 10 10-30-2006 03:20 AM

V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory

All times are GMT -7. The time now is 02:42 AM.
Powered by vBulletin
Copyright 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2018 VIX-WomensForum LLC