The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Prevent audio or images from being saved (Save Page As)
Terminator
post Dec 25 2015, 11:27 PM
Post #1


Advanced Member
****

Group: Members
Posts: 218
Joined: 19-March 15
Member No.: 22,398



As you know, you can go to File, then "Save Page As" in most browsers and save the entire webpage you are viewing. Then you can look in the folder from the page you just saved, and take anything you want. Images, Audio, etc.

However I have seen many sites where you Save Page As, and a lot of the stuff you see on the current "saved" webpage does not come in the folder. They are blocking certain directories from showing up with the entire page download.

Any ideas how this can be done? Either blocking a directory or certain files, especially audio files?

I think the biggest culprit in the "Save Page As" is Firefox. Because I tested some pages in Firefox and got everything including audio, but those same pages did not have much in the folder when saved with Chrome and IE

thanks

This post has been edited by Terminator: Dec 25 2015, 11:37 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Dec 26 2015, 12:25 AM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



Can you link to one of those pages?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Terminator
post Dec 26 2015, 11:16 AM
Post #3


Advanced Member
****

Group: Members
Posts: 218
Joined: 19-March 15
Member No.: 22,398



Yeah, its http://www.broadcitysoundboard.com/season-1.html

I have no idea what that TV show is, but I like how they hid their audio files from being downloaded in firefox and would like to do the same thing.

Their audio files are in both mp3 and ogg format, so maybe they did something with JavaScript to call the file type when you click the sound button. I see they did use jQuery on something.

Often in Firefox, a website like this you would just "Save Page As" and then you could have all their audio files. I am trying to prevent that like they did.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Dec 26 2015, 11:53 AM
Post #4


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



I don't neither see nor hear anything playing at that page. unsure.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Terminator
post Dec 26 2015, 12:00 PM
Post #5


Advanced Member
****

Group: Members
Posts: 218
Joined: 19-March 15
Member No.: 22,398



If you click the image boxes on that site you can hear audio. They hid those files from being included when you "Save Page As". When you view source you can see they coded their audio coded like this:

CODE

<a href="#" class="grid-item" data-audio="audio/season-1/Lincoln_102_IBakedAWholeCake">


I'm not sure what data-audio is, or if it has anything to do with how they hide their audio files.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Dec 26 2015, 02:35 PM
Post #6


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



Nope. Nothing happens. But I expect that streamed auto and video isn't saved when you do a Save Page As. Which doesn't mean it's impossible to get to it. I regularly download movies and programs from the TV stations sites so I can watch in the player of my choice and without ads if it's a commercial channel.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Dec 26 2015, 03:42 PM
Post #7


.
********

Group: WDG Moderators
Posts: 9,656
Joined: 10-August 06
Member No.: 7



QUOTE(Terminator @ Dec 26 2015, 06:00 PM) *

I'm not sure what data-audio is, or if it has anything to do with how they hide their audio files.

It's an HTML5 custom data attribute: http://www.w3.org/TR/html5/dom.html#embedd...ta-*-attributes

Maybe the value "audio/season-1/Lincoln_102_IBakedAWholeCake" is a URL used by javascript. Perhaps streaming like pandy suggested, otherwise I'd guess a file would end up in your browser cache.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Sumeet Shroff
post Dec 27 2015, 03:46 AM
Post #8





Group: Members
Posts: 9
Joined: 26-November 08
From: India
Member No.: 7,197



Hi...

Basically if u do not want to allow "save as" images or media then you need to use Javascript to load the content. You can use Javascript's "document.write" to include the files and the "Save as" toolr will not detect the loaded graphics or media.

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Dec 27 2015, 10:59 AM
Post #9


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



I don't think that's true. Even external JS is saved when you do a Save Page As and choose Web Page Complete (or whatever it may be called). unsure.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Dec 27 2015, 05:51 PM
Post #10


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



I think all they did was strip the .mp3 filename extension, strip the http and the domain name, and then include the rest in the data-audio attribute of the link. For example,
data-audio="audio/season-1/Bevers_103_Chicken"
maps to the audio file
http://www.broadcitysoundboard.com/audio/s...103_Chicken.mp3
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Dec 27 2015, 06:49 PM
Post #11


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



Ha ha!
Custom data attributes are intended to store custom data private to the page or application, for which there
are no more appropriate attributes or elements.These attributes are not intended for use by software that is
independent of the site that uses the attributes.

http://www.w3.org/TR/html5/dom.html#custom-data-attribute

Well good luck with that! IPB Image
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Terminator
post Dec 27 2015, 09:47 PM
Post #12


Advanced Member
****

Group: Members
Posts: 218
Joined: 19-March 15
Member No.: 22,398



And they also have the same audio files as ogg in that directory as a backup for mobile devices.

They probably don't know that data attribute isn't supposed to be used for that. Or maybe that was coded for them by some start up web company who only cares if the code works at the time.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Dec 28 2015, 10:32 AM
Post #13


.
********

Group: WDG Moderators
Posts: 9,656
Joined: 10-August 06
Member No.: 7



QUOTE(pandy @ Dec 28 2015, 12:49 AM) *

Ha ha!
Custom data attributes are intended to store custom data private to the page or application, for which there
are no more appropriate attributes or elements.These attributes are not intended for use by software that is
independent of the site that uses the attributes.

http://www.w3.org/TR/html5/dom.html#custom-data-attribute

Well good luck with that! IPB Image

I don't think they mean "private" as in "protected content", rather that such data shouldn't be relied upon by other software, and that the site owner has no obligation to make it useful to others (as opposed to other HTML content, that's meant to be useful by all). In Terminator's case we're just lucky to find the audio files that way.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Dec 28 2015, 01:31 PM
Post #14


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



Yeah, but that site obviously tries to use it that way.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Dec 28 2015, 01:34 PM
Post #15


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



Besides, I've seen another wording of that passage, possibly in an older version of the spec. More like well-behaved software shouldn't...
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Dec 28 2015, 05:40 PM
Post #16


.
********

Group: WDG Moderators
Posts: 9,656
Joined: 10-August 06
Member No.: 7



QUOTE(pandy @ Dec 28 2015, 07:31 PM) *

Yeah, but that site obviously tries to use it that way.

Or maybe they wanted to make the pages portable? unsure.gif For example, by excluding the file extension the script can easily serve both mp3 and Ogg files.

QUOTE
Besides, I've seen another wording of that passage, possibly in an older version of the spec. More like well-behaved software shouldn't...

Yes that's what I meant, a bit like the robots.txt directives. In either case the good luck wishes are sorely needed. happy.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 24th April 2024 - 04:32 AM