I've got a mobile version of my website which i come with an problem with. My primary website is (let us say) domain.com and my mobile website is (let us say) m.dom.com

I've common js/css and pictures I personally use for and I'd rather not duplicate the files either to both sites. if I have to update I'd rather not copy again and again or simply forget to upload another file.

My mobile website is setup inside a sub folder of my primary site /mobile and so i have domain.com/mobile is equivalent to m.dom.com

can there be a good way not to duplicate/copy again and again the picturesOrjs?

Create symblink in the parent folder:

Using ssh or plesk or cpanel:

shell:/path/to/www/mobile> ln -s ../js/
shell:/path/to/www/mobile> ln -s ../images/
shell:/path/to/www/mobile> ln -s ../css/
etc...

This can produce a symbolic link out of your primary site which means you just uploads the file out of your primary site and instantly the mobile can get up-to-date.

Then when you access the /js/file.js inside your mobile site it'll search for the symblink the primary /js/file.js.

Also I would suggest to make use of this rule (out of your primary site - .htaccess) just in case the /mobile/ is utilized from the bot or perhaps a user.

RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain.com$ [NC]
RewriteRule ^mobile/?$ http://m.dom.com/ [R=301]

Use CSS to change this content which means you that it's not necessary to produce the same factor two times