CSS - trying to set local image URL in remote loaded page

647 views
Skip to first unread message

Roberto Saccon

unread,
May 20, 2008, 9:54:25 AM5/20/08
to Firebug
I load a page from a server and with firebug, I change the url of a
background image to an image on my local filesystem (file://
example.jpg). Now if I hover over the changed CSS settings in firebug,
I can see the changed image in the firebug tooltip. But in the actual
browser I cannot see it (except of the old image disappearing).

Is there an easy way I can make the image actually change in the
browser ?

or if the answer is no, how deep do I have to digg to make that
happen, would a pure Javascript Firebug extension be enough (any
pointer where exactly I need to start to look at ?) or do I have to
change the underlying Firefox internals with an extension containing
parts written in C/C++ ?

and in case you are asking why this is useful, I want to edit an image
and see it immediately in the page I am working on, without uploading
the image first to the server. After all this is the way we do it with
"simple" CSS properties, so there should be a way, a developer can do
it with background images as well.

regards
--
Roberto Saccon
http://rsaccon.com

John J Barton

unread,
May 20, 2008, 10:02:34 AM5/20/08
to Firebug
Loading files from both a server and from a local file system would be
"cross-site" browsing, an area that browsers have not quite mastered.
But it is an area they are struggling with. After overcoming the
security controls, the main issue would be the load model. Pages load
by 'running' the web page. Changing CSS is essentially a live edit.
You could change an image url, but when should it load and what events
should be triggered? Some things would have to be worked out.

John.

Roberto Saccon

unread,
May 20, 2008, 1:02:38 PM5/20/08
to Firebug
John,

thanks, but CSS and Images can be loaded cross site, at least from
different domains, so what is the special deal with trying to mix file://...
and http://... ?

Or is there a browser limitation like "cross-protocol" ?

And what is different between firebug and Firefox, that Firebug
actually does display a cross-protocol loaded CSS image ?

regards
--
Roberto Saccon
http://rsaccon.com

On May 20, 11:02 am, John J Barton <johnjbar...@johnjbarton.com>
wrote:
Reply all
Reply to author
Forward
0 new messages