Forum Moderators: open

Message Too Old, No Replies

Effect of externally loaded javascript files on Google

         

born2drv

4:52 am on Aug 25, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Does Google care how much javascript you cram into externally loaded javascript files? Like if I have 1,000,000 lines of code in an external file, will Google not care as long as it is not in the actual HTML file and not indexed as well?

Thanks.

startup

5:23 am on Aug 25, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The bot will crawl the file even though it can't actually read it. How it is eventually read I don't know but, there may be a size limit. I wouldn't make the file larger than the page it is associated with and would try to keep it smaller. If there is no form of deception being used I won't worry about it.
I am not a JS fan.

Macguru

5:29 am on Aug 25, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi born2drv,

No and yes.

If you have very large JS or CSS files you better keep them offpage for both the bots and to save your bandwith.

Some people believe some SE dislike external JS and CSS files because they could hide potential "tricks". I have no clear indication of this since I have no first hand experience at it. I use external files, leave access open them and get good results.

born2drv

6:39 am on Aug 25, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I don't intend to trick the SE's at all, just get rid of the "bloat" on the page, and bring the content up higher. So it's good to hear they don't mind :)

By the way, when you say, "leave access open" to the files, is there a way to block them for users (so they can't download your code) but leave them free for SE's to see so they don't think you're hiding something??

dcheney

6:47 am on Aug 25, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'd hate to be a user of a web site with a 1,000,000 line javascript.

jatar_k

6:48 am on Aug 25, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



born2drv,

>>block them for users

not so far as I know. You can always get the path from the script src and jack the code if you really want it.

Macguru

6:49 am on Aug 25, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Else than cloaking, I dont know of any way to do this. There are some htaccess experts in the Perl and PHP CGI Scripting [webmasterworld.com] forum who might already discussed this.

Try the site search feature, you might get lucky.

<added>jatar_k beat me! 3 am time to go to bed...</added>